[postgis-users] Bogus unknown geometry error from ST_Transform

Stephen Woodbridge woodbri at swoodbridge.com
Sun Feb 19 06:54:11 PST 2012


SRID=-1 means that the geometry SRID is unknown or has no SRID. This is 
NOT synonym got 4326.

Also, every geometry has an SRID embedded in it. If all you did is 
change the value in the public.geometry_columns table then you have NOT 
changed the geometry's SRID and the SRID of the geometry is the only 
thing that is looked at by the ST_* functions.

-Steve


On 2/19/2012 3:10 AM, pcreso at pcreso.com wrote:
> Does this work?
>
> *UPDATE gis."gz_2010_48_160_00_500k"*
> *SET "the_geom_3081" = ST_Transform((ST_Setsrid(the_geom, 4326),3081);*
>
> ie:: is the problem finding the srid from geometry_columns or finding it
> but ST_Transform() fails even when given the srid?
>
> Even if there is a bug, this may work for you until fixed?
>
> Brent Wood
>
> --- On *Sun, 2/19/12, René Romero Benavides /<ichbinrene at gmail.com>/* wrote:
>
>
>     From: René Romero Benavides <ichbinrene at gmail.com>
>     Subject: Re: [postgis-users] Bogus unknown geometry error from
>     ST_Transform
>     To: postgis-users at postgis.refractions.net
>     Date: Sunday, February 19, 2012, 8:37 PM
>
>     El 18/02/2012 11:29 p.m., Aren Cambre escribió:
>>     ST_Transform is returning a bogus error of*Input geometry has
>>     unknown (-1) SRID*.
>>
>>     Here's the query:
>>     *UPDATE gis."gz_2010_48_160_00_500k"*
>>     *SET "the_geom_3081" = ST_Transform(the_geom, 3081);*
>>
>>     I said "bogus" because the database's *public.geometry_columns*
>>     table has valid values for these two columns, and neither has SRID
>>     of -1:
>>     *34281;"''";"gis";"gz_2010_48_160_00_500k";"the_geom";2;4326;"POLYGON"*
>>     *34276;"''";"gis";"gz_2010_48_160_00_500k";"the_geom_3081";2;3081;"POLYGON"*
>>
>>     What gives?
>>
>>     Aren
>>
>>
>>     _______________________________________________
>>     postgis-users mailing list
>>     postgis-users at postgis.refractions.net  </mc/compose?to=postgis-users at postgis.refractions.net>
>>     http://postgis.refractions.net/mailman/listinfo/postgis-users
>     I thought a SRID of -1 was a synonym for the default one (4326). But
>     don't take my word for it, I'm beginning with postgis.
>     --
>     http://sharingtechknowledge.blogspot.com/
>
>     -----Inline Attachment Follows-----
>
>     _______________________________________________
>     postgis-users mailing list
>     postgis-users at postgis.refractions.net
>     </mc/compose?to=postgis-users at postgis.refractions.net>
>     http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users




More information about the postgis-users mailing list