2021年1月12日星期二

qgis bug : CRS not recognized when saving vector to SQlite or Spatialite

 CRS not recognized when saving vector to SQlite or Spatialite

 

 In pure SQLite output, 

ogr2ogr   out.db   poly.shp    -a_srs      EPSG:25831

ogrinfo on out.db reports a SRS that is EPSG:25831


In Spatialite output, 

ogr2ogr out.db poly.shp -a_srs EPSG:25831 -dsco spatialite=yes

ogrinfo on out.db reports a SRS that is a bound CRS of EPSG:25831. 

The reason is that the spatial_ref_sys table is initalized by Spatialite itself,

and it contains a WKT1 definition with a TOWGS84[] clause, 

thus interpreated on reading as a BoundCRS

Yet another issue with the transition between the old and the new world. 

Not sure if a software change is needed there 

(apart that an hypothetical future release of spatialite removes TOWGS84[] from its CRS definitions)

BoundCRS 

没有评论: