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 for spatialite in sqlite in osgeo/gdal:ubuntu-small-latest #5657

Closed
theroggy opened this issue Apr 25, 2022 · 5 comments
Closed

Support for spatialite in sqlite in osgeo/gdal:ubuntu-small-latest #5657

theroggy opened this issue Apr 25, 2022 · 5 comments
Assignees

Comments

@theroggy
Copy link
Contributor

theroggy commented Apr 25, 2022

I noticed that the osgeo/gdal:ubuntu-small-latest does support sqlite vector drivers (as documented here), but when running a dialect="SQLITE" query on a native sqlite file (a Geopackage), it is not possible to use spatialite functions. Using dialect='INDIRECT_SQLITE' it is possible to use them, but with a significant performance impact.

Is it a conscious choice not to enable spatialite within sqlite?

@jratike80
Copy link
Collaborator

There is the "full" version if "small" is not enough.

@theroggy
Copy link
Contributor Author

There is the "full" version if "small" is not enough.

Yes, I'm aware of that.

@jratike80
Copy link
Collaborator

Do you think it would be better choice for the majority of the users of the ubuntu-small to include spatialite? Many dependencies that spatialite requires (proj, geos...) are already included so it might not be a big difference. The alpine-normal that includes Spatialite is 242 MB while ubuntu-small is 280 MB.

It seems that geopandas somehow depends on osgeo/gdal:ubuntu-small-latest. It may not be a sustainable decision because I think that the GDAL project does not promise that the docker builds will remain the same. I wonder if the geopandas project could modify the build recipes and make an own dockerfile that is optimal for the project. For example by removing the proj gridshift files from the ubuntu-full the file size would go down from 1.5 GB to maybe 900 MB.

@theroggy
Copy link
Contributor Author

Difficult to judge for me what the majority of users need, but because spatialite is already linked within gdal I supposed that adding this cannot have a large impact on the image size.
I don't know what the general scoping idea is in the "small" images, but I'd guess that the general principle is to include a reduced number of drivers, but that the drivers included are fully functional?
Anyway it is a pity that some functionalities on geopackages are available and some are not and you need to use kind of obscure tricks to get things working.

For the geopandas/pyogrio project it is not strictly necessary that this is added, as the CI builds run both on a conda based image, where the gdal installation does support spatialite within sqlite, and on the osgeo/gdal:ubuntu-small-latest image.

@jratike80
Copy link
Collaborator

GeoPackage standard actually defines only 5 functions: ST_IsEmpty, ST_MinX, ST_MaxX, ST_MinY, and ST_MaxY but I agree that the functions coming from SpatiaLite are very usable extra.

@rouault rouault self-assigned this May 2, 2022
@rouault rouault closed this as completed in 05e57ef May 2, 2022
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

3 participants