问题
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?
回答1:
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:
SELECT * FROM geometry_columns;
回答2:
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)
来源:https://stackoverflow.com/questions/45992529/does-spatialite-mysql-support-3d-point