mongodb + geoserver
DESCRIPTION
This presentation will dive into a development team’s use case for choosing MongoDB as their spatially enabled NoSQL solution. The talk will also cover how the integration of GeoServer can expand the accessibility of your data. GeoServer is the open source implementation of Open Geospatial Consortium (OGC) standards and a core component of the Geospatial Web.TRANSCRIPT
MongoDB + GeoServer
Why we use MongoDB
What is GeoServer
The MongoDB GeoServer Plugin
Lessons Learned
2
Outline
Why we use MongoDB
3
Store Large Number of Documents
+
Store Mixed Document Metadata
+
Geospatial Support
Why we use MongoDB
4
Small Team
+ =
Our Use of MongoDB
5
Original Files +
Metadata
Extracted Text +
Metadata
Document Processor { “_id”:
"metadata" : { “event”:”MongoDB DC 2013”, “url”:” http://www.10gen.com/events/mongodb-washington-dc-2013”, } "geo" : [ { “place” : “Newseum”, "location" : [-77.0194, 38.8930] }, { " place " : “Penn Quarter Sports Tavern", "location" : [ -77.0215, 38.8942] } ], ] }
spatial index created for geo.location
How we expose our data
6
Custom Web Client
Document Store
Do
cum
ent
Se
rvic
es
Spat
ial
Serv
ices
A
nal
ytic
Se
rvic
es
RES
T A
PI
I love your data, but…
7
I love your data, but…
8
How can I integrate it into my existing workflow?
I love your data, but…
9
How can I integrate it into my existing workflow?
Answer: Open Geospatial Standards
Open source software server that allows users to share geospatial data
Reference implementation of the Open Geospatial Consortium (OGC) standards WMS (Web Map Service) WFS (Web Feature Service) WCS (Web Coverage Service)
Open API allows integration of
back-end data stores 10
What is GeoServer?
11
WFS WMS
Examples
12
13
GeoServer & MongoDB
http://repo.opengeo.org/org/geotools/gt-mongodb/
Open sourced in 2011 by Data Tactics Corp.
Developed against MongoDB 1.8.x
Natively supports GeoJSON
documents
Supports all geometry types 14
Existing MongoDB Plugin
GeoJSON
{ "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": { "type": "Point", "coordinates": [-77.0194, 38.8930]}, "properties": {" place": “Newseum"} }, { "type": "Feature", "geometry": { "type": "Point", "coordinates": [-77.0215, 38.8942]}, "properties": {" place": " Penn Quarter Sports Tavern "} }, }
Skipped calculating full schema & geospatial extents
{ “_id”: "metadata" : { “event”:”MongoDB DC 2013” “url" : “http://www.10gen.com/events/mongodb-washington-dc-2013” } "geo" : [ { “place” : “Newseum” "location" : [-77.0194, 38.8930] }, { " place " : “Penn Quarter Sports Tavern", "location" : [ -77.0215, 38.8942] } ], ] }
Added support for multi-location documents
Authentication support
Configurable to work with your existing schema OR
Leveraged existing GeoServer MongoDB Plugin http://repo.opengeo.org/org/geotools/gt-mongodb/
MongoDB + GeoServer
16
RES
T A
PI
Custom Web Client
Geo
Serv
er
WMS
WFS
Document Store
KML
Translating MongoDB document results to GeoServer Feature Data is not 1:1
Challenging to filter bounding box results when location is within nested document
Challenging to provide accurate page limits
Not perfect, lots of room for improvement… but was worth it
Code provided to OpenGeo development team 17
Lessons Learned…
http://geoserver.org/display/GEOS/What+is+GeoServer
http://opengeo.org/publications/opengeo-architecture/
Getting Started: Download Plugin: http://repo.opengeo.org/org/geotools/gt-mongodb/
FOSS4G2011 Presentation: http://fosslc.org/drupal/content/integration-geoserver-nosql-databases
18
References