[gdal-dev] OGR Spatialite to geopackage

jratike80 jukka.rahkonen at maanmittauslaitos.fi
Wed Jun 13 01:36:18 PDT 2018


Even Rouault-2 wrote
> There isn't a concept of view in the OGR model, so they are presented as 
> tables and converted as such. In that case this is a technical Spatialite 
> table that makes no sense in GPKG, so you should exclude it from the 
> conversion by explicitly listing the tables/views you want to convert.

Hi,

Sorry, but this time your answer does not make sense. I can convert with
success a full featured SpatiaLite database (created by GDAL) with two
tables and a spatial view (that gets converted into a normal spatial table)
into GPKG with a simple command

ogr2ogr -f gpkg output.gpkg input.sqlite.

My source SpatiaLite db does include the "geom_cols_ref_sys" view, with this
DLL

CREATE VIEW geom_cols_ref_sys AS
SELECT f_table_name, f_geometry_column, geometry_type,
coord_dimension, spatial_ref_sys.srid AS srid,
auth_name, auth_srid, ref_sys_name, proj4text, srtext
FROM geometry_columns, spatial_ref_sys
WHERE geometry_columns.srid = spatial_ref_sys.srid

So my GDAL can handle the system view  "geom_cols_ref_sys" while the GDAL
that Luc has obviously can't. I suppose we have somehow different builds,
mine comes from the gisinternals developer builds.

-Jukka Rahkonen-



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


More information about the gdal-dev mailing list