I'm trying to take advantage of the many functions available in Postgis for dealing with latitude and longitude coordinate systems.
However, I would like to add some altitude information to my database and I can't find the proper answer for which datatype should be used for properly holding Latitude, Longitude and Altitude in Postgis?
I have found that Geometry type is capable of X, Y and Z, but the Geography type only holds Latitude and Longitude.
Is there and differences between both?
Best Answer
I don't see why geography can't hold Z. Did you try it?
As per the docs:
CREATE TABLE testgeog(gid serial PRIMARY KEY, the_geog geography(POINTZ,4326) );