[gdal-dev] Error using ogr2ogr to create SpatiaLite database
even.rouault at mines-paris.org
Sun Mar 28 09:30:37 EDT 2010
I also reproduce the problem. It is not platform related. There are various
problems in the way the spatial_ref_sys is handled, that I'm currently
fixing. The problem is that the SRS of the shapefile is not properly
recognized and translated in the spatial_ref_sys table.
You can workaround it by adding -a_srs EPSG:4326 on the command line.
Le Sunday 28 March 2010 14:23:14 Simon O'Keefe, vous avez écrit :
> (I posted this issue to the FWTools mailing list a week ago, but have
> not yet received a response.)
> I'm attempting to create a new SQLite database from a SHP file using
> FWTools2.4.7 on Windows 7. The following command:
> ogr2ogr -f SQLite C:\Data\db.sqlite C:\Data\states.shp -dsco SPATIALITE=yes
> generates the following error:
> ogr2ogr.exe has stopped working
> A problem caused the program to stop working correctly. Windows will
> close the program and notify you if a solution is available.
> The example uses 'states.shp' from the GeoServer sample data, but the
> error occurs with other SHP files as well.
> I'm able to create a SQLite file by leaving out SPATIALITE=yes, but
> when I open the resulting file in SpatiaLite-GIS, it complains of
> "Missing or invalid Spatial Metadata tables: spatial_ref_sys,
> Is anyone able to create a proper SpatialLite database from a SHP file
> using ogr2ogr?
> Simon O'Keefe
> Geospatial Systems Developer
> Groundtruth Mapping Systems
> Level 2, 140 Queen Street
> Melbourne VIC 3000 Australia
> phone: +61 409 413 890
> email: simon.okeefe at groundtruth.com.au
> web: http://www.groundtruth.com.au
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
More information about the gdal-dev