[postgis-users] lat/long to coordinate conversion
Shaun Collins
shaunkeng at yahoo.com
Sat Jan 14 23:31:10 PST 2006
Thanks!
--- Michael Fuhr <mike at fuhr.org> wrote:
> On Sat, Jan 14, 2006 at 10:20:54PM -0800, Shaun
> Collins wrote:
> > is there a function in postgis that will convert
> > lat/long to coordinates with a known srid?
>
> Use one of the geometry constructors to create a
> geometry object
> from the lat/lon with an appropriate SRID (e.g.,
> 4326), then use
> Transform() to convert the coordinates to another
> SRID. Example:
>
> test=> SELECT
>
AsEWKT(Transform(GeomFromEWKT('SRID=4326;POINT(-118.2923
> 36.5785)'), 32611));
> asewkt
> ----------------------------------------------------
> SRID=32611;POINT(384381.795377305 4048892.7545226)
> (1 row)
>
> --
> Michael Fuhr
>
More information about the postgis-users
mailing list