[postgis-users] Unprojected lat/long to 3081?

Aren Cambre aren at arencambre.com
Thu Feb 3 20:00:16 PST 2011


Thank you. That was it!

I did some more online reading and finally realized I'm dealing with a
conversion from a spherical projection to Cartesian.

Aren

On Thu, Feb 3, 2011 at 7:24 PM, Francis Markham <fmarkham at gmail.com> wrote:

> EPSG 3081 is a metre projection, so you need to transform your points from
> lat long into the appropriate projection.  Try something like this:
>
> *UPDATE event_table*
> *SET the_geom = ST_Transform(ST_SetSRID(ST_Point(event_location[1],
> event_location[0]), 4326), 3081)
> *
>
>
> This assumes your input latlons use the WGS84 datum.
>
> Cheers,
>
> Francis
>
> On 4 February 2011 09:33, Aren Cambre <aren at arencambre.com> wrote:
>
>> I have a database containing a Postgres native point data type *event*that has the latitude and longitude for certain events. An example value of
>> *event* is *(32.7748777996749,-96.7680574022233)*. Note: this is *not* a
>> PostGIS data type. It's a native Postgres type.
>>
>> I tried to convert this into a PostGIS gemoetry field *the_geom* and
>> project into 3081 at the same time using this:
>>
>> *UPDATE event_table*
>> *SET the_geom = ST_SetSRID(ST_Point(event_location[1],
>> event_location[0]), 3081)*
>>
>> (This derived from the example at
>> http://postgis.refractions.net/docs/ST_Point.html and reinforced by some
>> Google searching.)
>>
>> 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.
>>
>> Am I doing something wrong with the conversion? I assumed that there
>> really is not a projection *per se* because the input is pure lat/long?
>>
>> Aren
>>
>> _______________________________________________
>> postgis-users mailing list
>> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110203/20d90236/attachment.html>


More information about the postgis-users mailing list