[postgis-devel] RFC: Remove mmin and mmax from GBOX

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Wed Jul 6 07:41:56 PDT 2011


Hi all,

Whilst trying to get rid of the following compile warning:

gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith 
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing 
-fwrapv -fpic -I/home/pg90/rel/include  -I/usr/include/libxml2 
-I../liblwgeom -I. -I. -I/home/pg90/rel/include/postgresql/server 
-I/home/pg90/rel/include/postgresql/internal -D_GNU_SOURCE   -c -o 
geography_estimate.o geography_estimate.c
geography_estimate.c: In function ‘compute_geography_stats’:
geography_estimate.c:1048: warning: ‘histobox.mmax’ may be used 
uninitialized in this function
geography_estimate.c:1048: warning: ‘histobox.mmin’ may be used 
uninitialized in this function
geography_estimate.c:1048: warning: ‘histobox.flags’ may be used 
uninitialized in this function

it suddenly struck me that we are doing some strange and inconsistent 
things with the M value when building GBOXes. Looking closer at the 
logic, I've so far come to the conclusion that M is an attribute, not an 
extra dimension and so on this basis it has no spatial component and 
therefore should not be stored within GBOX.

Therefore I'd like to propose the attached patch to remove M from GBOX 
entirely - thoughts?


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: postgis-remove-measure-from-gbox.patch
Type: text/x-diff
Size: 8618 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20110706/55e6ced2/attachment.patch>


More information about the postgis-devel mailing list