Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#3902 closed defect (fixed)

What SRIDs are currently supported with PostGIS Geography?

Reported by: just7460 Owned by: robe
Priority: medium Milestone: PostGIS 2.4.1
Component: documentation Version: 2.4.x
Keywords: postgis, geography, srid Cc: jshim@…

Description

The most recent documentation states, "One restriction [of PostGIS geography] is that it only supports WGS 84 long lat (SRID:4326)":


4.2. PostGIS Geography Type http://postgis.net/docs/manual-2.4/using_postgis_dbmanagement.html#PostGIS_Geography


However, I have tested creating data with a few other SRIDs, and it seems to function properly. In addition, other related OSGeo pages suggests that there have been other supported SRIDs since PostGIS 2.1.6:


2.4.0RC1 News https://git.osgeo.org/gogs/postgis/postgis/raw/2.4.0rc1/NEWS *Search for #2941

Geography can create non-4326 geography but geography typmod won't allow it https://trac.osgeo.org/postgis/ticket/2941


Can you provided a list of SRIDs in which PostGIS Geography supports if it is not limited to WGS 1984. In addition, if PostGIS Geography supports other SRIDs other than 4326, can the documentation be updated to reflect so?

Change History (11)

comment:1 by robe, 7 years ago

It's any longlat based projections defined in your spatial_ref_sys.

I'll update the docs to reflect — see my blog post

http://www.bostongis.com/blog/index.php?/archives/266-geography-type-is-not-limited-to-earth.html

comment:2 by robe, 7 years ago

In 15983:

try to modernize the geography section a bit.
References #3902

comment:3 by pramsey, 7 years ago

Component: postgisdocumentation
Owner: changed from pramsey to robe

comment:4 by pramsey, 7 years ago

postgis24=# select 'SRID=4269;POINT(-123 34)'::geography;
                     geography                      
----------------------------------------------------
 0101000020AD1000000000000000C05EC00000000000004140
(1 row)

postgis24=# select 'SRID=4267;POINT(-123 34)'::geography;
                     geography                      
----------------------------------------------------
 0101000020AB1000000000000000C05EC00000000000004140
(1 row)

postgis24=# select 'SRID=26910;POINT(-123 34)'::geography;
ERROR:  Only lon/lat coordinate systems are supported in geography.
LINE 1: select 'SRID=26910;POINT(-123 34)'::geography;

comment:5 by robe, 7 years ago

In 15988:

Add Paul Ramsey's example, get rid of more obsolete statements about 4326 is only srid supported for geography
References #3902 for PostGIS 2.5.0

comment:6 by robe, 7 years ago

In 15990:

More cleanup. Get rid of word "new" in reference to geography type, it's not so new anymore
Minor grammar and formatting corrections.
References #3902 for PostGIS 2.5.0

comment:7 by robe, 7 years ago

Resolution: fixed
Status: newclosed

In 15991:

Backport geography changes to PostGIS 2.4.1
Closes #3902
Changed Changed to Enhanced for tiger zcta
References #3815 for PostGIS 2.4.1

comment:8 by just7460, 7 years ago

Thanks for updating the documentation! This is a great help for us!

Do you have a link for the 2.4.1 changes? I can't seem to find your changes when I look at the 2.4.1 doc, but it shows up for 2.5.

Thanks again! Justin

comment:9 by robe, 7 years ago

In 15992:

Fix xml parse error in docs
References #3902 for PostGIS 2.4.1

comment:10 by robe, 7 years ago

In 15993:

Fix xml parse error in docs
References #3902 for PostGIS 2.5.0

comment:11 by robe, 7 years ago

Sorry about that, I had an xml unbalanced tag so the docs build job failed. Should show up here: in about an hour or less

http://postgis.net/docs/manual-2.4/using_postgis_dbmanagement.html#PostGIS_Geography

Last edited 7 years ago by robe (previous) (diff)
Note: See TracTickets for help on using tickets.