[postgis-users] parsing postgis answers

Birgit Laggner birgit.laggner at vti.bund.de
Mon Dec 5 03:58:27 PST 2011


Hi Michal,

you could use a combination of st_xmin, st_ymin, st_xmax and st_ymax 
instead of st_extent. They will provide you with the same coordinates as 
st_extent but in a numeric data type.

Hope that helps,

Birgit.


Am 05.12.2011 12:26, schrieb Micha? Droz.dz.:
>
> Hi List!
>
> I am fresh Postgis user and have a problem with ST_EXTENT. I am using 
> it to get data for map.zoomToExtent in openLayers.
>
> The problem is that zoomToExtens takes parameters as 
> zoomToExtent(value,value,value,value)
>
> http://dev.openlayers.org/docs/files/OpenLayers/Map-js.html#OpenLayers.Map.zoomToExtent
>
> from ST_EXTENT a receive WKT like this:
>
> "BOX(2294970.88258299 6588308.80462897,2295532.89622321 6588616.7042758)"
>
> How to parse that answer to get paremeters for OpenLayers in 
> appropirate format?
>
> I checked that OpenLayers is able to parse WKT but it is impossible 
> with BOX type.
>
> http://dev.openlayers.org/docs/files/OpenLayers/Format/WKT-js.html
>
> Thank for help!
>
> Michal
>
>
>
>
> _______________________________________________
> 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/20111205/cf79372a/attachment.html>


More information about the postgis-users mailing list