Recently, I was studying spatialite.I can write 2D data(like this:POINT(1 1)) into the spatial data table,but I can't write 3D data(like this:POINT(1 1 1) ) into the spatial data table. Who can tell me spatialite whether support 3D? If support ,how can I write a 3D data?
Does spatialite/mysql support 3D point?
2.7k views Asked by firewang At
2
There are 2 answers
0
On
To add points with three 3 dimensions you have to use the correct WKT expression: POINTZ(x,y,z).
(see also: https://www.gaia-gis.it/gaia-sins/spatialite-cookbook/html/wkt-wkb.html)
You also have to make sure, that you geometry column is correctly defined as XYZ column. (see functions: Dimension CoordDimension Is3D). GeometryType should therefore return POINTZ
(see also: http://www.gaia-gis.it/gaia-sins/spatialite-sql-4.2.0.html)
Yes, Spatialite supports 3D geometries (actually 2.5D geometries).
On why it does not work for you, probably your geometry column is not defined as
XYZ. You can check geometry metadata with the query: