Geographic Information Systems Asked by Kliver Max on August 23, 2021
I have a gpkg file. I trying to open it with spatial_lite gui
and cast geometry to GML.
select AsGML(geom) from MyTable
but i got null
. I tried another functions AsText(), AsWKT(), st_asText()...
but anyway i got null. BTW function ST_GeometryType(geom) returns LINESTRING
, but other functions don’t work.
My final goal is to cast geometry from gpkg to GML on c#. But it’s looks impossible because I cannot even select geometry in spatial_lite gui
.
Do I use wrong queries? What can be wrong here?
The binary format for geometry in GeoPackages is not compatible with the format used in Spatialite. That's (partly) why GDAL has separate drivers.
When I start the Spatialite GUI it helpfully displays this:
And that means instead of querying the table d
I can query vgpkg_d
and the Spatialite geometry functions will work:
If I query from the original table I get NULL, like you.
If your spatialite GUI doesn't show that message or create the virtual tables then you need to upgrade or install some other components.
Correct answer by Spacedman on August 23, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP