~ubuntu-branches/ubuntu/trusty/postgis/trusty-updates

« back to all changes in this revision

Viewing changes to postgis/geography_estimate.c

  • Committer: Bazaar Package Importer
  • Author(s): Alan Boudreault
  • Date: 2010-09-29 09:16:10 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20100929091610-vj4efw8woq34hdn7
Tags: 1.5.2-1
* New upstream release, with a few bug fixes.
* Added shp2pgsql-gui binary.
* Removed patches, applied upstream: getopt.    

Show diffs side-by-side

added added

removed removed

Lines of Context:
825
825
        int i;
826
826
 
827
827
        POSTGIS_DEBUG(2, "compute_geography_stats called");
 
828
        POSTGIS_DEBUGF(3, " samplerows = %d", samplerows);
 
829
        POSTGIS_DEBUGF(3, " totalrows = %f", totalrows);
828
830
 
829
831
        /*
830
832
         * We'll build an histogram having from 40 to 400 boxesPerSide
1010
1012
                box = (GBOX *)sampleboxes[i];
1011
1013
 
1012
1014
                if ( box->xmin > histobox.xmax || box->xmax < histobox.xmin ||
1013
 
                        box->ymin > histobox.ymax || box->ymax < histobox.ymin ||
1014
 
                        box->zmin > histobox.zmax || box->zmax < histobox.zmin)
 
1015
                     box->ymin > histobox.ymax || box->ymax < histobox.ymin ||
 
1016
                     box->zmin > histobox.zmax || box->zmax < histobox.zmin )
1015
1017
                {
1016
1018
                        POSTGIS_DEBUGF(4, " feat %d is an hard deviant, skipped", i);
1017
1019
 
1041
1043
                }
1042
1044
        }
1043
1045
 
 
1046
        /* If everything was a deviant, the new histobox is the same as the old histobox */
 
1047
        if ( ! newhistobox )
 
1048
        {
 
1049
                newhistobox = palloc(sizeof(GBOX));
 
1050
                memcpy(newhistobox, &histobox, sizeof(GBOX));
 
1051
        }
 
1052
 
1044
1053
        /*
1045
1054
         * Set histogram extent as the intersection between
1046
1055
         * standard deviation based histogram extent