SlideShare a Scribd company logo
Bringing Spatial Love to Your
          Java Application

     Steven Citron-Pousty
     PaaS Dust Spreader, Red Hat
     @TheSteve0


1
Agenda
    • Learn a little spatial
    • Load some spatial data into mongo
    • Do a query or two

              SIGN UP CODE:
                mongosv12


2
Assumptions
    1) You already know Java
    2) You can use the command line
    3) You are comfortable with Mongo command line
    4) Please ask questions – though since we only have 30
       minutes they may have to wait until the end or after
       the session




3
What is OpenShift?

    Red Hat’s free platform as a service for applications in the cloud.




4
5
    Dalbera on Flickr
Kind of like Amazon, right? Nope.




6
Cook24v on Flickr
 7
8
What’s supported?




9
There’s more? What’s the catch?

• We are really in Developer Preview
• OpenShift is free-as-in-beer & free-as-in-freedom
• Three 512 MB RAM / 1 GB storage gears
• Need more resources, just ask!




10
On to spatial!




11
Spatial is fun
 The only spatial functionality Mongo currently has is:
 1) Near
 2) Containment


 All of it is laid out on one page:
 http://www.mongodb.org/display/DOCS/Geospatial+Inde
 xing
 First link on a google search for “mongodb spatial
 indexing”

12
Caveats
 1. Assumes coords. are between -180 and 180
 2. Can handle any 2D coordinates
 3. Has methods to handle curvature of the earth
    (spherical)




13
How to make it work
 1) Put your coordinates into an arrary
     { loc : [ 50 , 30 ] } //SUGGESTED OPTION
     { loc : { x : 50 , y : 30 } }
     { loc : { foo : 50 , y : 30 } }
     { loc : { lon : 40.739037, lat: 73.992964 } }

 2) Make a 2d index
     db.places.ensureIndex( { loc : "2d" } )




14
Demo
 1. I have an JEE6 app and a mongo instance running
 2. Loaded some spatial data in JSON format
 3. Made the 2d index
 4. Do some fun spatial and MongoDB work
 5. Show you the web services




15
Conclusion
 1. Spatial is easy and fun on Mongo
 2. You can now build your own FourSquare or other
    checkin application.
 3. You can also build your own field data entry system.
 4. You can build and deploy your application quickly
    without having to think about infrastructure.
                  SIGN UP CODE:
                    mongosv12
        http://openshift.redhat.com
16

More Related Content

Similar to Bringing Spatial Love to Your Java Application (20)

PPTX
Spatial Mongo and Node.JS on Openshift JS.Everywhere 2012
Steven Pousty
 
PPTX
Spatial MongoDB, Node.JS, and Express - server-side JS for your application
Steven Pousty
 
PPT
Mongo sf spatialmongo
Steven Pousty
 
PPTX
Spatial mongo for PHP and Zend
Steven Pousty
 
PPT
Openshift GeoSpatial Capabilities
Steven Pousty
 
PDF
Mongo db bangalore
MongoDB
 
PDF
Social IRC bots in the Cloud with OpenShift - Mongo London presentation by Ma...
OpenShift Origin
 
PDF
Building Social IRC Bots with Node.js and MongoDB
MongoDB
 
PDF
Bringing spatial love to your python application
Shekhar Gulati
 
PDF
Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin ...
OpenShift Origin
 
PDF
Java(ee) mongo db applications in the cloud
Shekhar Gulati
 
PPTX
Free Mongo on OpenShift
Steven Pousty
 
KEY
MongoDB on CloudFoundry
Yohei Sasaki
 
KEY
MongoDB on CloudFoundry
Yohei Sasaki
 
PDF
ROS - An open source platform for robotics software developers (lecture).pdf
Amine Bendahmane
 
PDF
Silicon Valley Code Camp 2014 - Advanced MongoDB
Daniel Coupal
 
PDF
ROS Workshop Proposal
codingstudio
 
PPTX
[150824]symposium v4
yyooooon
 
PPTX
OpenShift with Eclipse Tooling - EclipseCon 2012
Steven Pousty
 
PDF
Philadelphia MongoDB User Group - Your First MongoDB Application
Michael Lynn
 
Spatial Mongo and Node.JS on Openshift JS.Everywhere 2012
Steven Pousty
 
Spatial MongoDB, Node.JS, and Express - server-side JS for your application
Steven Pousty
 
Mongo sf spatialmongo
Steven Pousty
 
Spatial mongo for PHP and Zend
Steven Pousty
 
Openshift GeoSpatial Capabilities
Steven Pousty
 
Mongo db bangalore
MongoDB
 
Social IRC bots in the Cloud with OpenShift - Mongo London presentation by Ma...
OpenShift Origin
 
Building Social IRC Bots with Node.js and MongoDB
MongoDB
 
Bringing spatial love to your python application
Shekhar Gulati
 
Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin ...
OpenShift Origin
 
Java(ee) mongo db applications in the cloud
Shekhar Gulati
 
Free Mongo on OpenShift
Steven Pousty
 
MongoDB on CloudFoundry
Yohei Sasaki
 
MongoDB on CloudFoundry
Yohei Sasaki
 
ROS - An open source platform for robotics software developers (lecture).pdf
Amine Bendahmane
 
Silicon Valley Code Camp 2014 - Advanced MongoDB
Daniel Coupal
 
ROS Workshop Proposal
codingstudio
 
[150824]symposium v4
yyooooon
 
OpenShift with Eclipse Tooling - EclipseCon 2012
Steven Pousty
 
Philadelphia MongoDB User Group - Your First MongoDB Application
Michael Lynn
 

More from MongoDB (20)

PDF
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB
 
PDF
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB
 
PDF
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB
 
PDF
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB
 
PDF
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB
 
PDF
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB
 
PDF
MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB
 
PDF
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB
 
PDF
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB
 
PDF
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB
 
PDF
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB
 
PDF
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB
 
PDF
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB
 
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB
 
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB
 
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB
 
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB
 
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB
 
MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB
 
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB
 
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB
 
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB
 
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB
 
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB
 
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB
 
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB
 
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB
 
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB
 
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB
 
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB
 
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB
 
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB
 
Ad

Recently uploaded (20)

PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
July Patch Tuesday
Ivanti
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Ad

Bringing Spatial Love to Your Java Application

  • 1. Bringing Spatial Love to Your Java Application Steven Citron-Pousty PaaS Dust Spreader, Red Hat @TheSteve0 1
  • 2. Agenda • Learn a little spatial • Load some spatial data into mongo • Do a query or two SIGN UP CODE: mongosv12 2
  • 3. Assumptions 1) You already know Java 2) You can use the command line 3) You are comfortable with Mongo command line 4) Please ask questions – though since we only have 30 minutes they may have to wait until the end or after the session 3
  • 4. What is OpenShift? Red Hat’s free platform as a service for applications in the cloud. 4
  • 5. 5 Dalbera on Flickr
  • 6. Kind of like Amazon, right? Nope. 6
  • 8. 8
  • 10. There’s more? What’s the catch? • We are really in Developer Preview • OpenShift is free-as-in-beer & free-as-in-freedom • Three 512 MB RAM / 1 GB storage gears • Need more resources, just ask! 10
  • 12. Spatial is fun The only spatial functionality Mongo currently has is: 1) Near 2) Containment All of it is laid out on one page: http://www.mongodb.org/display/DOCS/Geospatial+Inde xing First link on a google search for “mongodb spatial indexing” 12
  • 13. Caveats 1. Assumes coords. are between -180 and 180 2. Can handle any 2D coordinates 3. Has methods to handle curvature of the earth (spherical) 13
  • 14. How to make it work 1) Put your coordinates into an arrary { loc : [ 50 , 30 ] } //SUGGESTED OPTION { loc : { x : 50 , y : 30 } } { loc : { foo : 50 , y : 30 } } { loc : { lon : 40.739037, lat: 73.992964 } } 2) Make a 2d index db.places.ensureIndex( { loc : "2d" } ) 14
  • 15. Demo 1. I have an JEE6 app and a mongo instance running 2. Loaded some spatial data in JSON format 3. Made the 2d index 4. Do some fun spatial and MongoDB work 5. Show you the web services 15
  • 16. Conclusion 1. Spatial is easy and fun on Mongo 2. You can now build your own FourSquare or other checkin application. 3. You can also build your own field data entry system. 4. You can build and deploy your application quickly without having to think about infrastructure. SIGN UP CODE: mongosv12 http://openshift.redhat.com 16