I dont think so Bob.<div><br></div><div>Check this out:</div><div><br></div><div>In this case the table still exists</div><div><br></div><div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

create table srid_inexistent_test(<br>id serial not null);<br>select * from addgeometrycolumn('public','srid_inexistent_test','the_geom',999999,'POINT',2);<br>NOTA:  CREATE TABLE criará sequência implícita "srid_inexistent_test_id_seq" para coluna serial "<a href="http://srid_inexistent_test.id">srid_inexistent_test.id</a>"<br>

ERRO:  AddGeometryColumns() - invalid SRID<br>CONTEXT:  SQL statement "SELECT AddGeometryColumn('', $1 , $2 , $3 , $4 , $5 , $6 )"<br>função PL/pgSQL "addgeometrycolumn" linha 4 em comando SQL<br>

********** Erro **********<br>ERRO: AddGeometryColumns() -<b> invalid SRID<br></b>SQL state: P0001<br>Contexto: SQL statement "SELECT AddGeometryColumn('', $1 , $2 , $3 , $4 , $5 , $6 )"<br>função PL/pgSQL "addgeometrycolumn" linha 4 em comando SQL</blockquote>

</div><div><br></div><div><br></div><div>In this particular table I've dropped it:</div><div><br></div><div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

drop table spatial_ref_sys;<br>create table srid_inexistent_test(<br>id serial not null);<br>select * from addgeometrycolumn('public','srid_inexistent_test','the_geom',999999,'POINT',2);<br>

ERRO:  relação "spatial_ref_sys" não existe<br>LINE 1: SELECT SRID FROM spatial_ref_sys WHERE SRID =  $1 <br>                         ^<br>QUERY:  SELECT SRID FROM spatial_ref_sys WHERE SRID =  $1 <br>CONTEXT:  PL/pgSQL function "addgeometrycolumn" line 74 at comando SQL<br>

comando SQL "SELECT AddGeometryColumn('', $1 , $2 , $3 , $4 , $5 , $6 )"<br>PL/pgSQL function "addgeometrycolumn" line 4 at comando SQL<br>********** Erro **********<br>ERRO: relação "spatial_ref_sys" não existe<br>

SQL state: 42P01<br>Contexto: PL/pgSQL function "addgeometrycolumn" line 74 at comando SQL<br>comando SQL "SELECT AddGeometryColumn('', $1 , $2 , $3 , $4 , $5 , $6 )"<br>PL/pgSQL function "addgeometrycolumn" line 4 at comando SQL</blockquote>

</div><div><br></div><div>PostGIS uses spatial_ref_sys table to verify, when you create a geometry table, if the projection you're using is available.</div><div><br></div><div>If I've made any mistakes, experts, please correct me :D</div>

<div><br></div><div>George</div><div><br><div class="gmail_quote">On Tue, Mar 6, 2012 at 3:32 PM, Bob Basques <span dir="ltr"><<a href="mailto:Bob.Basques@ci.stpaul.mn.us" target="_blank">Bob.Basques@ci.stpaul.mn.us</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  

  
  <div style="margin-right:4px;margin-top:4px;margin-left:4px;margin-bottom:1px;line-height:normal;font-variant:normal">
    <p style="margin-bottom:0;margin-top:0">
      <font face="Comic Sans MS" size="3">Ok, it looks like I may not have PROJ support compiled in, but wouldn't the existence of the SPATIAL_REF_SYS mean that PROJ is installed??</font>    </p>
<br>      
    <p style="margin-bottom:0;margin-top:0">
      <font face="Comic Sans MS" size="3">bobb</font>    </p><div><div>
<br>      
    <p style="margin-bottom:0;margin-top:0">
      <br>
      <br>
      >>> "Bob Basques" <<a href="mailto:Bob.Basques@ci.stpaul.mn.us" target="_blank">Bob.Basques@ci.stpaul.mn.us</a>> wrote:<br>    </p>
    <table bgcolor="#f3f3f3" style="font-size:1em;margin-right:0;margin-top:0;margin-left:15px;margin-bottom:0" border="0">
      <tbody><tr>
        <td>
          <div style="border-left:solid 1px #050505;padding-left:7px">
            <p style="margin-bottom:0;margin-top:0">
              <font face="Comic Sans MS" size="3">All,</font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <br>
                          </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Comic Sans MS" size="3">made nice progress from Simon's suggestions, but . . .</font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <br>
                          </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Comic Sans MS" size="3">Ok, I'm probably trying to push this harder than I need to, but, I'm trying to ST_Transform the data from 4326 to 200068 (Our private projection) in the construction of the view, but I keep hitting permission errors.  </font>            </p>



            <p style="margin-bottom:0;margin-top:0">
              <br>
                          </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Comic Sans MS" size="3">NOTE: we use the 200068 projection for all of our data, have for years.  It's definition in SPATIAL_REF_SYS is correct.  </font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <br>
                          </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Comic Sans MS" size="3">This works fine:</font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <br>
                          </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Courier New" size="3">select</font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Courier New" size="3">           ST_SetSRID(ST_MakePoint(part3::numeric, part4::numeric),4326) as geom,</font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Courier New" size="3">           ST_AsText(ST_SetSRID(ST_MakePoint(part3::numeric, part4::numeric),4326)) as geom_text</font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Courier New" size="3">      from</font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Courier New" size="3">          (select rxtime,</font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Courier New" size="3">                  split_part(cmd, ',', 3) as part3,</font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Courier New" size="3">                  split_part(cmd, ',', 4) as part4</font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Courier New" size="3">             from </font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Courier New" size="3">                  cmdstpinfo</font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Courier New" size="3">            where cmd </font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Courier New" size="3">             like '>Plot:%') AS first_pass;</font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <br>
                          </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Comic Sans MS" size="3">But this give me an error, do I have the ST_Transform in the right spot, is 8.4.2 too old of a release? :</font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <br>
                          </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Courier New" size="3">select</font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Courier New" size="3">           ST_SetSRID(ST_MakePoint(part3::numeric, part4::numeric),4326) as geom,</font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Courier New" size="3">           ST_AsText(ST_SetSRID(ST_MakePoint(part3::numeric, part4::numeric),4326)) as geom_text,</font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Courier New" size="3">           ST_AsText(ST_Transform(ST_SetSRID(ST_MakePoint(part3::numeric, part4::numeric),4326)), 200068) as geom_city</font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Courier New" size="3">      from</font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Courier New" size="3">          (select rxtime,</font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Courier New" size="3">                  split_part(cmd, ',', 3) as part3,</font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Courier New" size="3">                  split_part(cmd, ',', 4) as part4</font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Courier New" size="3">             from </font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Courier New" size="3">                  cmdstpinfo</font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Courier New" size="3">            where cmd </font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Courier New" size="3">             like '>Plot:%') AS first_pass;</font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <br>
                          </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Comic Sans MS" size="3">Like:</font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <br>
                          </p>
            <div>
              <p style="margin-bottom:0;margin-top:0">
                <font face="Courier New">ERROR:  function st_transform(geometry) does not exist<br style="font-family:Courier New">LINE 4:            ST_AsText(ST_Transform(ST_SetSRID(ST_MakePoint(pa...<br style="font-family:Courier New">


                             ^<br style="font-family:Courier New">HINT:  No function matches the given name and argument types. You might need to add explicit type casts.</font>              </p>
            </div>
            <div>
              <p style="margin-bottom:0;margin-top:0">
                <font face="Courier New"> </font>              </p>
            </div>
            <div>
              <p style="margin-bottom:0;margin-top:0">
                <font face="Courier New">********** Error **********</font>              </p>
            </div>
            <div>
              <p style="margin-bottom:0;margin-top:0">
                <font face="Courier New"> </font>              </p>
            </div>
            <div>
              <p style="margin-bottom:0;margin-top:0">
                <font face="Courier New">ERROR: function st_transform(geometry) does not exist<br style="font-family:Courier New">SQL state: 42883<br style="font-family:Courier New">Hint: No function matches the given name and argument types. You might need to add explicit type casts.<br style="font-family:Courier New">


Character: 212</font>              </p>
            </div>
            <p style="margin-bottom:0;margin-top:0">
              <br>
              <br>
                          </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Comic Sans MS" size="3">Thanks</font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <br>
                          </p>
            <p style="margin-bottom:0;margin-top:0">
              <font face="Comic Sans MS" size="3">bobb</font>            </p>
            <p style="margin-bottom:0;margin-top:0">
              <br>
              <br>
            </p>
          </div>
        </td>
      </tr>
    </tbody></table>
  </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><br clear="all"><div><br></div>-- <br>George R. C. Silva<br><br>Desenvolvimento em GIS<br><a href="http://geoprocessamento.net" target="_blank">http://geoprocessamento.net</a><br><a href="http://blog.geoprocessamento.net" target="_blank">http://blog.geoprocessamento.net</a><div style="line-height:130%;text-align:left;font-size:10px;overflow:hidden;margin-left:0px;word-wrap:break-word;margin-top:0px;padding:0px">


</div><div style="line-height:130%;text-align:left;font-size:10px;overflow:hidden;margin-left:0px;word-wrap:break-word;margin-top:0px;padding:0px"></div><div style="line-height:130%;text-align:left;font-size:10px;overflow:hidden;margin-left:0px;word-wrap:break-word;margin-top:0px;padding:0px">


</div><br>
</div>