Opened 10 years ago
Closed 10 years ago
#2941 closed defect (fixed)
Geography can create a non-4326 geography but geography typmod won't allow it
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 )
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 typmoded geography table and the only way you can get a geography table with no srid (srid of 0) is to to a bulk insert.
Change History (5)
comment:1 by , 10 years ago
Description: | modified (diff) |
---|
comment:2 by , 10 years ago
Description: | modified (diff) |
---|
comment:3 by , 10 years ago
comment:4 by , 10 years ago
Milestone: | PostGIS 2.1.5 → PostGIS 2.1.6 |
---|
Done in trunk at r13027