Does srid 4326(wgs-84) is the only supported srid in Geography(not Geometry)?

There are two kinds of geo data: Geometry and Geography. I am often confused with them.

Geometry represents objects on a flat surface, which isn’t terribly accurate on the surface of Earth, which is considered to be an “oblate spheroid”. Geometry would be fine for use where the objects being considered really exist on a plane, but Geography is far better for shapes on Earth’s surface.

It looks like Geography is only compatible with SRIDs which use a (latitude, longitude) base coordinate system. So far, SRID 4326 is the only such SRID I’ve found, but I’ve only tried a few of them so far.

1 Like

In pkg/geo/geoprojbase/projections.go, the srids whose IsLatLng is true are geography srid.

Also, to get a list of all SRIDs which would work with GEOGRAPHY, you could run this (apologies for my previous response where I only knew of one such SRID value):

select srid from spatial_ref_sys where proj4text like '%+proj=longlat%';

There appear to be 761 of these SRID values.

2 Likes