PostGIS Geometry vs Geography: What is the Real Difference?
🧠 Question (by MapMaker88):
"What's the real difference between the geometry and geography types in PostGIS?"
✅ Answer (by Admin):
Great question! Both geometry
and geography
In PostGIS, spatial data is stored, but it handles coordinate systems differently:
-
Geometry treats coordinates as points on a flat Cartesian plane. It’s faster, ideal for small areas, and uses units like meters or feet based on the projection.
Example:
-
Geography assumes the Earth is a sphere (WGS 84) and calculates great-circle distances over curved surfaces — ideal for achieving global-scale accuracy.
Example:
💡 Bonus Tip:
Use geometry
for city-level maps or local analysis. Use geography
When working with global datasets or cross-country distances.
Comments
Leave a Reply