[geos-devel] GEOSEnvelope and getting Max/Min X/Y

Sandro Santilli strk at keybit.net
Wed Apr 11 11:36:10 EDT 2012


On Wed, Apr 11, 2012 at 11:33:42AM -0400, Alex Trofast wrote:
> Greetings,
> 
> When you have an envelope created from GEOSEnvelope (all using the
> CAPI) what is the best and easiest way to grab the max and min x/y?
> CoordSeq? I see in the C++ envelope class there is a getMaxX,
> GetMaxY and so on.
> Any help greatly appreciated.

Yeah, no ENVELOPE class in C-API, it's a normal geometry, so a polygon.
You'll have to loop over the coordinates and do the comparison yourself.

--strk; 

  ,------o-. 
  |   __/  |    Delivering high quality PostGIS 2.0 !
  |  / 2.0 |    http://strk.keybit.net - http://vizzuality.com
  `-o------'



More information about the geos-devel mailing list