[postgis-tickets] [PostGIS] #2642: geography allows inputting geographies with different spheroids

PostGIS trac at osgeo.org
Fri Feb 7 12:50:19 PST 2014


#2642: geography allows inputting geographies with different spheroids
---------------------+------------------------------------------------------
 Reporter:  robe     |       Owner:  pramsey      
     Type:  defect   |      Status:  new          
 Priority:  medium   |   Milestone:  PostGIS 2.2.0
Component:  postgis  |     Version:  2.1.x        
 Keywords:           |  
---------------------+------------------------------------------------------
 I'm guess you are just taking the first spheroid.  Something like this I
 feel should be illegal.


 {{{
 SELECT ST_Distance('SRID=4326;POINT(-71.070168 42.370024)'::geography,
 'SRID=4267;POINT(-71.080168 42.370024)'::geography);

 823.690428176
 }}}

 Just as this is illegal


 {{{
 SELECT ST_Distance('SRID=4326;POINT(-71.070168 42.370024)'::geometry,
 'SRID=4267;POINT(-71.080168 42.370024)'::geometry);

 ERROR:  Operation on two GEOMETRIES with different SRIDs
 }}}

 Unless you are doing some voodoo behind the scenes to change the spheroid
 of one.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2642>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list