h2gis
h2gis copied to clipboard
Support options on FILE_TABLE
FILE_TABLE engine permits to link file format to H2GIS database as dbf or shp. Often the shapefile format is distributed with a prj file which is not standardized and does not contain information to find the SRID code. However the SRID is used by the view GEOMETRY_COLUMNS to store geo metadata and the SRID is required by to build the corresponding CRS.
A simple solution to fix this problem will be to force the SRID via the FILE_TABLE function
CALL FILE_TABLE('/tmp/myshape.shp', 'tableName', options)
where options will be 'SRID=2154, ENCOCING=UTF8'
@nicolas-f
Hello, Is it related to flatgeobuffer too ?
Hello, Nope because the header of FGB contains informations about the CRS : https://github.com/flatgeobuf/flatgeobuf/blob/master/src/fbs/header.fbs
But options can be used to set other arguments than srid.. It's just an optional string with key=value.