On Fri, 14 Jul 2023 20:47:42 +0200, Thomas Larsen Wessel wrote:
> Command for creating spatialite file:
>
> ogr2ogr -f SQLite spatialite.db
> WFS:"
https://foobar.io/wfs/foo@bar/baz/25832 [1]"
> foolayer
> -nln foolayer
> -t_srs EPSG:25832
>
Hi Thomas,
this question has nothing to do with SpatiaLite,
it should rather be placed on the GDAL mailing list.
as far as I can see your use of og2ogr seems wrong,
because just specifying "-f SQLite" is not enough to
select SpatiaLite, it should be instead
-f SQLite -dsco SPATIALITE=YES
remember: there are many different spatial formats
based on SQLite, and you can never assume that
SpatiaLite should be automatically selected.
you alway have to explicitly request for this.
> Is there a tool for testing the validity of spatialite files?
>
you can simply execute the following SQL query:
SELECT DISTINCT IsGeometryBlob(geom)
FROM my_table;
- if it return 1 (TRUE) all your geometries
are correctly encoded in the internal binary
BLOB format adopted by SpatiaLite
- otherwise some different format has been adopted
bye Sandro