As of 2.0 the whole question will be moot, as geometry_columns will be a view and will accurately reflect the state of the tables... so a table with no known srid will show up with unknown srid, and a table with known srid will have an entry... but since it will not be possible to insert an unknown srid geometry into a known srid table, your case won't ever arise.<div>
<br></div><div>P.<br><br><div class="gmail_quote">On Sun, Feb 19, 2012 at 1:00 PM, Aren Cambre <span dir="ltr"><<a href="mailto:aren@arencambre.com">aren@arencambre.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I hear you and am OK with reclassifying as an enhancement. However, what's the purpose of public.geometry_columns?<div><br></div><div>If it's just ephemeral, then I accept your "do-what-I-mean-not-what-I-say" point.</div>


<div><br></div><div>If it's supposed to be accurate metadata, then if some functionality needs this metadata <i>and</i> its missing from the geometry field, why not consult public.geometry_columns?<span class="HOEnZb"><font color="#888888"><div>
<br></div></font></span><div><span class="HOEnZb"><font color="#888888">

Aren</font></span><div><div class="h5"><br><br><div class="gmail_quote">On Sun, Feb 19, 2012 at 2:35 PM, Paul Ramsey <span dir="ltr"><<a href="mailto:pramsey@opengeo.org" target="_blank">pramsey@opengeo.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

A bug is unspecified or unexpected behavior, and I'm afraid your case is neither: the system is operating exactly as I would expect. You have outlined what might be considered a legitimate enhancement, but it's on the edge, because do-what-I-mean-not-what-I-say behavior can cause other people problems from time to time.<span><font color="#888888"><div>



<br></div></font></span><div><span><font color="#888888">P.</font></span><div><div><br><br><div class="gmail_quote">On Sun, Feb 19, 2012 at 12:29 PM, Aren Cambre <span dir="ltr"><<a href="mailto:aren@arencambre.com" target="_blank">aren@arencambre.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
OK, I figured out the second error. The TIGER places dataset for Texas has both POLYGON and MULTIPOLYGON types, hence violating the <b>enforce_geotype_the_geom_3081</b> constraint.<div><br></div><div>However, I think the original issue is a bug. If the geometry object has no SRID specified, as in my case, then ST_Transform should use whatever's specified in <b>public.geometry_columns</b>. I should not be getting errors about SRID of -1 if something is specified in 
<b>public.geometry_columns</b>.<span><font color="#888888"><br></font></span><div><span><font color="#888888"><div><br></div><div>Aren</div></font></span><div><div><br><div class="gmail_quote">
On Sun, Feb 19, 2012 at 9:13 AM, Aren Cambre <span dir="ltr"><<a href="mailto:aren@arencambre.com" target="_blank">aren@arencambre.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Nope. BTW, there is an extraneous parenthesis in your example. Here's what I used:<div><div><b>UPDATE gis."gz_2010_48_160_00_500k"</b></div>





<div><b>SET "the_geom_3081" = ST_Transform(ST_Setsrid(the_geom, 4629),3081);</b></div>
<div><br></div><div>(BTW, I said 4326 earlier, but I should have been using 4269. Not sure that explains the errors, however.)</div><div><br></div><div>Now I get this:</div><div><b>ERROR: new row for relation "gz_2010_48_160_00_500k" violates check constraint "enforce_geotype_the_geom_3081"</b><br>






<div><br></div><div>This is just bizarre because the source and destination column are POLYGON types.</div><div><br></div><div>Here's what I get when running <b>ST_AsEWKT(the_geom)</b>:</div><div><div><div>

<b>"POLYGON((-94.940569 29.330815,-94.93334 29.329038,-94.930971 29.327708,-94.929679 29.32634,-94.938834 29.320412,-94.946644 29.323065,-94.946988 29.326066,-94.94085 29.330469,-94.940569 29.330815))"</b></div>






</div><div><br></div></div><div>I just double-checked, and there are no other rows in public.geometry_columns describing anything in the <b>gz_2010_48_160_00_500k</b> table besides the two rows I pasted earlier.</div><div>





<br></div>
<div>Here's that constraint:</div><div><b>enforce_geotype_the_geom_3081 CHECK (geometrytype(the_geom_3081) = 'POLYGON'::text OR the_geom_3081 IS NULL);</b></div><div><br></div><div>Aren</div><div><div>

<div><br><div class="gmail_quote">
On Sun, Feb 19, 2012 at 2:10 AM,  <span dir="ltr"><<a href="mailto:pcreso@pcreso.com" target="_blank">pcreso@pcreso.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">






<table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font:inherit">Does this work?<br><br><div>
        <div><b>UPDATE gis."gz_2010_48_160_00_500k"</b></div>
        <div><b>SET "the_geom_3081" = ST_Transform<span style="background-color:rgb(255,255,0)">(</span>(ST_Setsrid(the_geom, 4326),3081);</b></div>
      </div><br>ie:: is the problem finding the srid from geometry_columns or finding it but ST_Transform() fails even when given the srid?<br><br>Even if there is a bug, this may work for you until fixed?<br><br>Brent Wood<br>






<br>--- On <b>Sun, 2/19/12, René Romero Benavides <i><<a href="mailto:ichbinrene@gmail.com" target="_blank">ichbinrene@gmail.com</a>></i></b> wrote:<br><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px">






<br>From: René Romero Benavides <<a href="mailto:ichbinrene@gmail.com" target="_blank">ichbinrene@gmail.com</a>><br>Subject: Re: [postgis-users] Bogus unknown geometry error from ST_Transform<br>To: <a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br>






Date: Sunday, February 19, 2012, 8:37 PM<div><div><br><br><div>
  

    
  
  <div>
    El 18/02/2012 11:29 p.m., Aren Cambre escribió:
    <blockquote type="cite">ST_Transform is returning a bogus error of<b> Input
        geometry has unknown (-1) SRID</b>.
      <div><br>
      </div>
      <div>Here's the query:</div>
      <div>
        <div><b>UPDATE gis."gz_2010_48_160_00_500k"</b></div>
        <div><b>SET "the_geom_3081" = ST_Transform(the_geom, 3081);</b></div>
      </div>
      <div><br>
      </div>
      <div>I said "bogus" because the database's <b>public.geometry_columns</b>
        table has valid values for these two columns, and neither has
        SRID of -1:</div>
      <div>
        <div><b>34281;"''";"gis";"gz_2010_48_160_00_500k";"the_geom";2;4326;"POLYGON"</b></div>
        <div><b>34276;"''";"gis";"gz_2010_48_160_00_500k";"the_geom_3081";2;3081;"POLYGON"</b></div>
      </div>
      <div><br>
      </div>
      <div>What gives?</div>
      <div><br>
      </div>
      <div>Aren</div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
postgis-users mailing list
<a rel="nofollow" href="http://mc/compose?to=postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a>
<a rel="nofollow" href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a>
</pre>
    </blockquote>
    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.<br>
    <div>-- <br>
      <a rel="nofollow" href="http://sharingtechknowledge.blogspot.com/" target="_blank">
        http://sharingtechknowledge.blogspot.com/</a></div>
  </div>

</div><br></div></div>-----Inline Attachment Follows-----<div><br><br><div>_______________________________________________<br>postgis-users mailing list<br><a href="http://mc/compose?to=postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br>






<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br></div></div></blockquote></td></tr></tbody></table><br>_______________________________________________<br>







postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br></blockquote></div><br></div></div></div></div></div>
</blockquote></div><br></div></div></div></div>
<br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br></blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br></blockquote></div><br></div></div></div></div>
<br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br></blockquote></div><br></div>