Opened 10 years ago

Last modified 9 years ago

#2941 closed defect

Geography can create a non-4326 geography but geography typmod won't allow it — at Version 1

Reported by: robe Owned by: pramsey
Priority: medium Milestone: PostGIS 2.1.6
Component: postgis Version: 2.1.x
Keywords: Cc:

Description (last modified by robe)

Both Paul and I recall that the geography type had support for other long-lat spatial reference systems when 2.1.0 was released.

http://lists.osgeo.org/pipermail/postgis-devel/2014-September/024532.html When trying this it fails:

CREATE TABLE test(gid serial,geog geography(multilinestring,4269));

However I can do this:

SELECT geography(ST_GeomFromText('POINT(1 1)', 4269));

and this:
SELECT geography(ST_GeomFromText('POINT(1 1)', 4269)) As geog
INTO test3;

SELECT ST_SRID(geog::geometry) from test3;

--yields 4269 as expected.

-- this correctly rejects as expected

SELECT geography(ST_GeomFromText('POINT(1 1)', 26986)) As geog;

erros out with;
ERROR:  Only lon/lat coordinate systems are supported in geography.

I thought it was a regression bug, but trying the above on a 2.1.0 install I found lying around yields the same results. So it seems while the geography type supports non-4326 lon lat spatial reference systems, you can't insert these into a geography table.

Change History (1)

comment:1 by robe, 10 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.