[postgis-users] getting non-latlon extent as lat/lon
Brent Wood
pcreso at pcreso.com
Fri Aug 4 19:45:57 PDT 2006
Hi Steve....
--- Steve Benzo <steve_benzo at yahoo.com> wrote:
> Hi,
>
> I have a PostGIS database with multiple tables of varying projections (ie not
> lat/lon). I would like to be able to get the extent from each of the tables
> in the form of lat/lon (4326), instead of the extent in that native
> projection.
>
> I'm thinking it something as simple as, transform(results_of_extent,4326);
> but heretofore, no iteration of this has been successful. I went through the
> help and mail archive, without success. Any help/insight into this would be
> greatly appreciated.
Off the top of my head (but with some confidence :-)
select box2d(transform(<geom column>, 4326) from <table>;
It may need to be wrapped in astext if you want text instaed of WKB, but I'm
not sure.
Cheers,
Brent
More information about the postgis-users
mailing list