[postgis-users] "summing" (polygon, float) pairs

Reid Priedhorsky reid at umn.edu
Wed Oct 1 15:35:25 PDT 2008


Dear all,

I have a set of polygons. Associated with each polygon is a number; call 
it score. Each polygon can intersect with zero or more other polygons.

What I would like to compute is a set of non-intersecting polygons with 
summed scores -- each of these polygons would be a set of points where 
the sum of all the original polygons' scores covered by the result 
polygon are equal.

Here's an example in one dimension:

Input:

----3------
      ----1----
         ----4----
                     ----2----

Output:

--3--
      -4-
         -8-
            -5-
               -4-
                     ----2-----

It is OK if two adjacent result polygons have equal sums.

Can this be done in PostGIS?

Reid

p.s. thanks for the help on my question a few days ago! I felt a tad 
foolish after learning it was just a missing isvalid() constraint. I 
thought I had one but didn't look carefully enough.



More information about the postgis-users mailing list