[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    Re: [postgis-users] Getting the exact extent of a geometry
From:       Pierre Racine <Pierre.Racine () sbf ! ulaval ! ca>
Date:       2009-12-17 16:05:01
Message-ID: 87A96661E65C5541AB4D20721C2DD7F84D014C87DE () EXCH-MBX-A ! ulaval ! ca
[Download RAW message or body]

Why not? This is what ST_Box2D() does and ST_Envelope() returns exactly the same \
values...

But again: Is there a non aggregate function which returns the exact extent (float8s) \
of a geometry? If not, why not?

Pierre

> -----Original Message-----
> From: postgis-users-bounces@postgis.refractions.net [mailto:postgis-users-
> bounces@postgis.refractions.net] On Behalf Of Mark Cave-Ayland
> Sent: 17 décembre 2009 05:22
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] Getting the exact extent of a geometry
> 
> Pierre Racine wrote:
> 
> > Hi,
> > 
> > ST_Envelope(geometry) returns a kind of degenerated version (float4s instead of \
> > float8s) of the
> extent of a geometry based on the cached BOX2D and ST_Extent(geometry) is an \
> aggregate.
> > 
> > Is there a non aggregate function which returns the exact extent (float8s) of a \
> > geometry? 
> > Try:
> > 
> > SELECT ST_AsText(ST_Envelope('LINESTRING(0 0, 1.00000000000001 1)'::geometry))
> > UNION ALL
> > SELECT ST_AsText(ST_Box2D('LINESTRING(0 0, 1.00000000000001 1)'::geometry))
> > UNION ALL
> > SELECT ST_AsText(ST_Extent('LINESTRING(0 0, 1.00000000000001 1)'::geometry));
> > 
> > Thanks,
> > 
> > Pierre
> 
> Uggg. Nothing should *ever* return the contents of a BOX2DFLOAT4 back to
> the user. If ST_Envelope() does, then this is definitely a bug.
> 
> 
> ATB,
> 
> Mark.
> 
> --
> Mark Cave-Ayland - Senior Technical Architect
> PostgreSQL - PostGIS
> Sirius Corporation plc - control through freedom
> http://www.siriusit.co.uk
> t: +44 870 608 0063
> 
> Sirius Labs: http://www.siriusit.co.uk/labs
> _______________________________________________
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic