Thank you. That was it!<div><br></div><div>I did some more online reading and finally realized I'm dealing with a conversion from a spherical projection to Cartesian.<div><br></div><div>Aren<br>
<br><div class="gmail_quote">On Thu, Feb 3, 2011 at 7:24 PM, Francis Markham <span dir="ltr"><<a href="mailto:fmarkham@gmail.com" target="_blank">fmarkham@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


EPSG 3081 is a metre projection, so you need to transform your points from lat long into the appropriate projection.  Try something like this:<br><br><blockquote style="margin:0pt 0pt 0pt 40px;border:medium none;padding:0px">






<div><b><font face="'courier new', monospace">UPDATE event_table</font></b></div><div><b><font face="'courier new', monospace">SET the_geom = ST_Transform(ST_SetSRID(ST_Point(event_location[1], event_location[0]), 4326), 3081)<br>




</font></b></div>

</blockquote><br>This assumes your input latlons use the WGS84 datum.<br><br>Cheers,<br><br>Francis<br><br><div class="gmail_quote"><div><div></div><div>On 4 February 2011 09:33, Aren Cambre <span dir="ltr"><<a href="mailto:aren@arencambre.com" target="_blank">aren@arencambre.com</a>></span> wrote:<br>




</div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><div><div></div><div><div>I have a database containing a Postgres native point data type <b>event</b> that has the latitude and longitude for certain events. An example value of <b>event</b> is <b>(32.7748777996749,-96.7680574022233)</b>. Note: this is <i>not</i> a PostGIS data type. It's a native Postgres type.</div>






<div><br></div><div>I tried to convert this into a PostGIS gemoetry field <b>the_geom</b> and project into 3081 at the same time using this:</div><blockquote style="margin:0pt 0pt 0pt 40px;border:medium none;padding:0px">






<div><b><font face="'courier new', monospace">UPDATE event_table</font></b></div><div><b><font face="'courier new', monospace">SET the_geom = ST_SetSRID(ST_Point(event_location[1], event_location[0]), 3081)</font></b></div>






</blockquote><div>(This derived from the example at <a href="http://postgis.refractions.net/docs/ST_Point.html" target="_blank">http://postgis.refractions.net/docs/ST_Point.html</a> and reinforced by some Google searching.)</div>




<div><br>

</div><div>The problem is when I import this layer into a QGIS project with several 3081-projected layers, all of my event points are ending up in the Pacific Ocean just off Mexico's west coast. 3081 is a projection for Texas, and that's where all my other data is.</div>






<div><br></div><div>Am I doing something wrong with the conversion? I assumed that there really is not a projection <i>per se</i> because the input is pure lat/long?</div><div><br></div><font color="#888888"><div>Aren</div>





</font><br></div></div>_______________________________________________<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>_______________________________________________<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>