[postgis-users] Odp: parsing postgis answers

Michał Drożdż michufoc at wp.pl
Mon Dec 5 03:44:49 PST 2011


Sorry for HTML in previous e-mail
> 
> 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







More information about the postgis-users mailing list