Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support options on FILE_TABLE #1336

Open
ebocher opened this issue Jan 20, 2023 · 2 comments
Open

Support options on FILE_TABLE #1336

ebocher opened this issue Jan 20, 2023 · 2 comments

Comments

@ebocher
Copy link
Member

ebocher commented Jan 20, 2023

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

@nicolas-f
Copy link
Member

Hello,
Is it related to flatgeobuffer too ?

@ebocher
Copy link
Member Author

ebocher commented Jan 20, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants