[postgis-users] PostgreSQL 9.3.4/PostGIS 2.1.1 function

Stephen Mather stephen at smathermather.com
Fri Dec 5 13:30:34 PST 2014


Hi Freddie,

select st_astext(st_setsrid(st_scale('POINT(1
1)'::geometry,180.0/pi(),180.0/pi()),4326)) FROM table_containing_polygon;

Best,
Steve


On Fri, Dec 5, 2014 at 3:33 PM, Burgess, Freddie <FBurgess at radiantblue.com>
wrote:

> How would I do this on a polygon?
>
> Thanks
> ________________________________________
> From: postgis-users-bounces at lists.osgeo.org [
> postgis-users-bounces at lists.osgeo.org] on behalf of Paul Ramsey [
> pramsey at cleverelephant.ca]
> Sent: Thursday, December 04, 2014 6:51 PM
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] PostgreSQL 9.3.4/PostGIS 2.1.1 function
>
> I would think that scaling by 180/pi should do the trick in general?
>
> select st_astext(st_setsrid(st_scale('POINT(1
> 1)'::geometry,180.0/pi(),180.0/pi()),4326));
>
> P
>
> On Thu, Dec 4, 2014 at 3:24 PM, Burgess, Freddie
> <FBurgess at radiantblue.com> wrote:
> > Given a polygon geometry with no SRID, the vertices actually in radians,
> but
> > since the SRID is zero, it looks like Cartesian coordinates, I want the
> lat
> > long in degrees and not rads.
> >
> > Does anyone provide of a function/custom that will return lat/long in
> > degrees given the conditions described?
> >
> > thanks
> >
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at lists.osgeo.org
> > http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20141205/cc2da83b/attachment.html>


More information about the postgis-users mailing list