[postgis-tickets] [PostGIS] #2417: pgsql2shp doesnt see SRID

PostGIS trac at osgeo.org
Sun Sep 22 09:48:05 PDT 2013


#2417: pgsql2shp doesnt see SRID
----------------------------+-----------------------------------------------
  Reporter:  darkblueb      |       Owner:  pramsey        
      Type:  defect         |      Status:  reopened       
  Priority:  medium         |   Milestone:  PostGIS Future 
 Component:  documentation  |     Version:  2.0.x          
Resolution:                 |    Keywords:  srid, pgsql2shp
----------------------------+-----------------------------------------------

Comment(by darkblueb):

 another aspect to this is..
 Using the general technique of
 {{{
 CREATE TABLE new_table AS
 SELECT
   pkey, ST_SetSRID( ST_Transform( geom, 4326), 4326)
 FROM
   existing_valid_table;
 }}}

 new_table's geometry is internally marked SRID=4326
 (via {{{lwgeom_set_srid()}}} but new_table geom has no typemod,
 so new_table geom does not appear in geometry_columns, or
 generally behave as expected.

 A second step, explicitly calling {{{UpdateGeometrySRID( new_table, geom,
 4326)}}}
 sets things right.

 An general improvement would to create some single SQL line that would fit
 into the CREATE TABLE as SELECT .. mold and document it.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2417#comment:7>
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