ngageoint / elasticgeo

ElasticGeo provides a GeoTools data store that allows geospatial features from an Elasticsearch index to be published via OGC services using GeoServer.
GNU General Public License v3.0
169 stars 85 forks source link

OpenStreetMap support #49

Closed HarelM closed 6 years ago

HarelM commented 6 years ago

I'm not sure this is the right place to ask this but I'm going to anyway :-) I'm looking into a solution to generate a map based on OpenStreetMap data pushed into an elastic search engine presented by GeoServer. I was wondering if you guys ever tried it? Are you using a third party tool to convert the OSM data into elastic search and what would be the configuration on the GeoServer to support such import. I don't mind helping writing some code and sending a pull request if needed.

sjudeng commented 6 years ago

Sorry for the late response. If you haven't looked at it already GDAL/OGR supports some OSM formats and also supports Elasticsearch. Once you have the data in Elasticsearch you can expose it in GeoServer either using the OGR extension or ElasticGeo.

http://wiki.openstreetmap.org/wiki/OGR http://www.gdal.org/drv_osm.html http://www.gdal.org/drv_elasticsearch.html http://docs.geoserver.org/maintain/en/user/extensions/ogr.html

HarelM commented 6 years ago

Thanks for the references but the GDAL manuals are just horrible :-/ I'm trying to index a pbf file into elastic search. This is the command I tried and it didn't work: "C:\Program Files\GDAL\ogr2ogr.exe" CONFIG_FILE=osmconfig.ini -progress --config WRITE_MAPPING map.txt -f "ElasticSearch" http://localhost:9200 ..\israel-and-palestine-latest.osm.pbf

The GDAL version I installed is from here: gdal-202-1500-x64-core.msi http://www.gisinternals.com/query.html?content=filelist&file=release-1500-x64-gdal-2-2-1-mapserver-7-0-6.zip

Am I missing anything? the osmconfig.ini is the one referenced in the manual. The error is cryptic: ERROR 4: Failed to read GeoJSON data

Any thoughts and guides are welcome, I'm running on windows...

HarelM commented 6 years ago

Spoken too soon. Seems like the following command does something: "C:\Program Files\GDAL\ogr2ogr.exe" -progress -lco CONFIG_FILE=.\osmconf.ini -f "ElasticSearch" http://localhost:9200 ..\israel-and-palestine-latest.osm.pbf After renaming osmconfig.ini to osmconf.ini it started working...