[postgis-devel] [PostGIS] #298: ST_GeographFromText to object with no SRID denoted is coming in with unknown SRID
PostGIS
trac at osgeo.org
Tue Nov 10 17:37:47 PST 2009
#298: ST_GeographFromText to object with no SRID denoted is coming in with
unknown SRID
---------------------+------------------------------------------------------
Reporter: robe | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: postgis 1.5.0
Component: postgis | Version: trunk
Keywords: |
---------------------+------------------------------------------------------
I was under the impression that if the SRID of a geography is unspecified
we assume its 4326, yet I get an error with the second.
{{{
SELECT
ST_AsText(ST_Intersection(ST_GeographyFromText('SRID=4326;POINT(1.2456
2)'),
ST_geographyFromText('SRID=4326;POINT(1.2456 2)')));
}}}
Give me the cutesy answer of
{{{
POINT(1.2456000000062 1.99999999999996)
}}}
But the below throws an error:
{{{
ERROR: Input geometry has unknown (-1) SRID
CONTEXT: SQL function "st_intersection" statement 1
}}}
{{{
SELECT ST_AsText(ST_Intersection(ST_GeographyFromText('POINT(1.2456 2)'),
ST_GeographyFromText('POINT(1.2456 2)')));
}}}
I can only assume this will break all our transform hacks. So we should
either not allow people to create geographies with no designated SRID or
assume it 4326 if not specified.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/298>
PostGIS <http://trac.osgeo.org/postgis/>
PostGIS
More information about the postgis-devel
mailing list