MongoDB + GeoServer
description
Transcript of MongoDB + GeoServer
![Page 1: MongoDB + GeoServer](https://reader034.fdocuments.in/reader034/viewer/2022050702/55515b58b4c9059f768b4af7/html5/thumbnails/1.jpg)
MongoDB + GeoServer
![Page 2: MongoDB + GeoServer](https://reader034.fdocuments.in/reader034/viewer/2022050702/55515b58b4c9059f768b4af7/html5/thumbnails/2.jpg)
Why we use MongoDB
What is GeoServer
The MongoDB GeoServer Plugin
Lessons Learned
2
Outline
![Page 3: MongoDB + GeoServer](https://reader034.fdocuments.in/reader034/viewer/2022050702/55515b58b4c9059f768b4af7/html5/thumbnails/3.jpg)
Why we use MongoDB
3
Store Large Number of Documents
+
Store Mixed Document Metadata
+
Geospatial Support
![Page 4: MongoDB + GeoServer](https://reader034.fdocuments.in/reader034/viewer/2022050702/55515b58b4c9059f768b4af7/html5/thumbnails/4.jpg)
Why we use MongoDB
4
Small Team
+ =
![Page 5: MongoDB + GeoServer](https://reader034.fdocuments.in/reader034/viewer/2022050702/55515b58b4c9059f768b4af7/html5/thumbnails/5.jpg)
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
![Page 6: MongoDB + GeoServer](https://reader034.fdocuments.in/reader034/viewer/2022050702/55515b58b4c9059f768b4af7/html5/thumbnails/6.jpg)
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
![Page 7: MongoDB + GeoServer](https://reader034.fdocuments.in/reader034/viewer/2022050702/55515b58b4c9059f768b4af7/html5/thumbnails/7.jpg)
I love your data, but…
7
![Page 8: MongoDB + GeoServer](https://reader034.fdocuments.in/reader034/viewer/2022050702/55515b58b4c9059f768b4af7/html5/thumbnails/8.jpg)
I love your data, but…
8
How can I integrate it into my existing workflow?
![Page 9: MongoDB + GeoServer](https://reader034.fdocuments.in/reader034/viewer/2022050702/55515b58b4c9059f768b4af7/html5/thumbnails/9.jpg)
I love your data, but…
9
How can I integrate it into my existing workflow?
Answer: Open Geospatial Standards
![Page 10: MongoDB + GeoServer](https://reader034.fdocuments.in/reader034/viewer/2022050702/55515b58b4c9059f768b4af7/html5/thumbnails/10.jpg)
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?
![Page 11: MongoDB + GeoServer](https://reader034.fdocuments.in/reader034/viewer/2022050702/55515b58b4c9059f768b4af7/html5/thumbnails/11.jpg)
11
WFS WMS
![Page 12: MongoDB + GeoServer](https://reader034.fdocuments.in/reader034/viewer/2022050702/55515b58b4c9059f768b4af7/html5/thumbnails/12.jpg)
Examples
12
![Page 13: MongoDB + GeoServer](https://reader034.fdocuments.in/reader034/viewer/2022050702/55515b58b4c9059f768b4af7/html5/thumbnails/13.jpg)
13
GeoServer & MongoDB
http://repo.opengeo.org/org/geotools/gt-mongodb/
![Page 14: MongoDB + GeoServer](https://reader034.fdocuments.in/reader034/viewer/2022050702/55515b58b4c9059f768b4af7/html5/thumbnails/14.jpg)
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 "} }, }
![Page 15: MongoDB + GeoServer](https://reader034.fdocuments.in/reader034/viewer/2022050702/55515b58b4c9059f768b4af7/html5/thumbnails/15.jpg)
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/
![Page 16: MongoDB + GeoServer](https://reader034.fdocuments.in/reader034/viewer/2022050702/55515b58b4c9059f768b4af7/html5/thumbnails/16.jpg)
MongoDB + GeoServer
16
RES
T A
PI
Custom Web Client
Geo
Serv
er
WMS
WFS
Document Store
KML
![Page 17: MongoDB + GeoServer](https://reader034.fdocuments.in/reader034/viewer/2022050702/55515b58b4c9059f768b4af7/html5/thumbnails/17.jpg)
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…
![Page 18: MongoDB + GeoServer](https://reader034.fdocuments.in/reader034/viewer/2022050702/55515b58b4c9059f768b4af7/html5/thumbnails/18.jpg)
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