[postgis-devel] [PostGIS] #347: Creating geography type is confusing

PostGIS trac at osgeo.org
Tue Dec 15 04:58:09 PST 2009


#347: Creating geography type is confusing
---------------------+------------------------------------------------------
 Reporter:  robe     |       Owner:  pramsey       
     Type:  defect   |      Status:  new           
 Priority:  medium   |   Milestone:  PostGIS Future
Component:  postgis  |     Version:                
 Keywords:           |  
---------------------+------------------------------------------------------
 I'm not quite sure how to express this and not sure if I consider it an
 issue or not, but someone brought it to my attention when I was
 demonstrating how to create a column.

 If you create a geography column as

 geography(POINT,4326)  vs. geography(POINT)

 They are different.  They don't have the same SRID and in order to convert
 a geography(POINT) to a geography(POINT,4326)  you have to do something
 goofy like this

 ALTER TABLE  sometable ALTER COLUMN the_geog TYPE (geography(POINT,4326))
 USING geography(ST_SetSRID(geometry(the_geog),4326) );

 Given that we don't support unknown SRID -- it seems kind of silly to have
 people do this and takes a long time for a large table.  Unfortunately not
 sure if there is anyway around this aside from enforcing the requirement
 of SRID (don't allow unknown for now, but allow it later when/if we
 support multiple SRIDs).  I'm not sure what the best resolution is for
 this since its technically not a bug, but an annoyance.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/347>
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-devel mailing list