[gdal-dev] invalid data in spatial file

jratike80 jukka.rahkonen at maanmittauslaitos.fi
Wed Jan 15 22:43:27 PST 2020


Hi,

Your GeoJSON does not tell in what coordinate reference system the
geometries are:

{ "type": "Feature", "properties": { "scalerank": 2, "featurecla":
"waterfall", "name": "Niagara Falls"}, "geometry": { "type": "Point",
"coordinates": [ -643212.061818000385017, 5765.686896063275327 ] } }

Do you know the correct CRS of the source data? If you know you must tell it
to GDAL with parameter -s_srs EPSG:xxxx.

-Jukka Rahkonen-


Ravi Teja Krishna Wuyyuru wrote
> Hello,
> 
> The geojson file before conversion and csv file after conversion are
> attached below.
> 
> 
> the ogr2ogr command line used isĀ 
> 
> java -cp :gdal.jar -Djava.library.path=libs/ ogr2ogr "-f" "CSV" "-t_srs"
> "CRS:84" gdaltampered.csv gdaltampered.geojson "-lco" "GEOMETRY=AS_WKT"
> 
> 
> thanks.
> 
> 
> 
> ---- On Thu, 16 Jan 2020 05:44:36 +0530 Even Rouault <

> even.rouault@

> > wrote ----
> 
> 
> Hello, 
>  
>> I am trying to convert a geojson file to csv file. but that coordinates
>> were 
>> tampered i.e 32.76543 is changed as 2333432.76543. Is there a way that 
>> ogr2ogr conversion util will throw an error for such cases that data is 
>> invalid. It would be of great help if such error throwing is possible. 
>  
> You should provide a sample csv file and the exact ogr2ogr command line to 
> reproduce the issue 
>  
> Even 
>  
> -- 
> Spatialys - Geospatial professional services 
> http://www.spatialys.com
> _______________________________________________
> gdal-dev mailing list

> gdal-dev at .osgeo

> https://lists.osgeo.org/mailman/listinfo/gdal-dev
> 
> gdaltampered.csv (175 bytes)
> <http://osgeo-org.1560.x6.nabble.com/attachment/5427475/0/gdaltampered.csv>
> gdaltampered.geojson (514 bytes)
> <http://osgeo-org.1560.x6.nabble.com/attachment/5427475/1/gdaltampered.geojson>





--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html


More information about the gdal-dev mailing list