Search code examples
postgis

Postgis 4326 geometry vs geography


After looking through web and Postgis in action book I still don't get 4326 geometry vs geography idea.

As I understand geometry is a projection of a map to a surface, and geography is 3d representation (WGS86 Model).

If both of them are 4326, what are benefits of using one over the other and what would be such cases.

I know that geometry is having more functions, and as they state , those functions can be much faster than geography, but then what is use for geography model if you can use 4326 geometry?

Edit: When I speak about geometry, I only mean 4326, not other ones.


Solution

  • The documentation should answer most of your questions, and even has a FAQ section on this specific topic. Choosing which type to use really depends on what you are doing with your data.

    But to clear up some misconceptions in your question: no, geography is not necessarily a 3D representation. Both types support 2D and 3D geometric representations.