wavded / ogre

ogr2ogr geojson-focused web client
http://ogre.adc4gis.com
MIT License
266 stars 79 forks source link

Convert to GeoJSON #84

Closed vstepaniuk closed 4 years ago

vstepaniuk commented 4 years ago

How to convert this file to GeoJSON?

http://gis.yavapai.us/arcgis/rest/services/Districts/MapServer/2/6?f=json

{"errors":["ERROR 4: Failed to read GeoJSON data","FAILURE:","Unable to open datasource `/tmp/quD51F8BSaExmuSQ-v3mHm-q.json' with the following drivers.","  -> PCIDSK","  -> netCDF","  -> JP2OpenJPEG","  -> PDF","  -> ESRI Shapefile","  -> MapInfo File","  -> UK .NTF","  -> OGR_SDTS","  -> S57","  -> DGN","  -> OGR_VRT","  -> REC","  -> Memory","  -> BNA","  -> CSV","  -> NAS","  -> GML","  -> GPX","  -> LIBKML","  -> KML","  -> GeoJSON","  -> Interlis 1","  -> Interlis 2","  -> OGR_GMT","  -> GPKG","  -> SQLite","  -> OGR_DODS","  -> ODBC","  -> WAsP","  -> PGeo","  -> MSSQLSpatial","  -> OGR_OGDI","  -> PostgreSQL","  -> MySQL","  -> OpenFileGDB","  -> XPlane","  -> DXF","  -> Geoconcept","  -> GeoRSS","  -> GPSTrackMaker","  -> VFK","  -> PGDUMP","  -> OSM","  -> GPSBabel","  -> SUA","  -> OpenAir","  -> OGR_PDS","  -> WFS","  -> HTF","  -> AeronavFAA","  -> Geomedia","  -> EDIGEO","  -> GFT","  -> SVG","  -> CouchDB","  -> Cloudant","  -> Idrisi","  -> ARCGEN","  -> SEGUKOOA","  -> SEGY","  -> XLS","  -> ODS","  -> XLSX","  -> ElasticSearch","  -> Walk","  -> Carto","  -> AmigoCloud","  -> SXF","  -> Selafin","  -> JML","  -> PLSCENES","  -> CSW","  -> VDV","  -> TIGER","  -> AVCBin","  -> AVCE00","  -> HTTP",""]}
vfonsecaz commented 4 years ago

that's not a issue with OGRE because that's not a valid geojson file! that's "ArcGIS JSON" format

you could use the query tool to generate the geojson you want

http://gis.yavapai.us/arcgis/rest/services/Districts/MapServer/2/query

e.g.

http://gis.yavapai.us/arcgis/rest/services/Districts/MapServer/2/query?where=OBJECTID+%3D+6&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=&returnGeometry=true&returnTrueCurves=false&maxAllowableOffset=&geometryPrecision=&outSR=&having=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&historicMoment=&returnDistinctValues=false&resultOffset=&resultRecordCount=&queryByDistance=&returnExtentOnly=false&datumTransformation=&parameterValues=&rangeValues=&quantizationParameters=&featureEncoding=esriDefault&f=geojson

vstepaniuk commented 4 years ago

Thanks!