[postgis-users] Working with multilinestring data - figuring out coordinates

Paul Ramsey pramsey at cleverelephant.ca
Fri Sep 11 13:01:16 PDT 2009


Given those coordinates and your proj4 definition, it looks like the
data is in SRS 2269, which this test seems to confirm:

geog=# select st_astext(st_transform(st_geomfromtext('LINESTRING(7509930.12510756
776667.642310877,7509924.12502675 776694.329928875)',2269),4326));
                                     st_astext
-----------------------------------------------------------------------------------
 LINESTRING(-123.212720672425 45.7650955901238,-123.212747680646
45.7651681862228)
(1 row)

If your data does not have an SRID already set, set it to 2269, thusly:

update yourtable set yourgeomcolumn = st_setsrid(yourgeomcolumn,2269);

Now you can pull out other projections (like 4326 (lonlat)) using the
st_transform function.

select st_astext(st_transform(the_geom)) from yourtable limit 1;

Paul

On Fri, Sep 11, 2009 at 12:34 PM, Mac Martine <martine at adobe.com> wrote:
> Hello-
>  I'm a total newbie with this stuff so bare with me. I have a shape
> files that I got into Postgres. Now I'm pulling it out and it's giving
> me MULTILINESTRINGS with numbers that look like:
> 7509930.12510756 776667.642310877,7509924.12502675 776694.329928875
>
> Now, I get the feeling those are correct, but that I need to convert
> them to Longitude and Latitude, and that's where I'm stuck.
>
> I'm pretty sure it's SRID 4326 but I can't find any info on doing
> conversions from here. Maybe I'm wrong. I also found this info which
> may be of help.
>
> +proj=lcc +lat_1=44.33333333333334 +lat_2=46 +lat_0=43.66666666666666
> +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=GRS80 +to_meter=0.3048
> +no_defs
>
> I'd really appreciate some guidance. I've googled all kinds of things
> and am not figuring it out.
> Thanks!
> _______________________________________________
> 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