[postgis-users] inside of a geometry

Alex Mayrhofer axelm-postgis at nona.net
Fri Jan 20 01:54:57 PST 2006

Paul Ramsey wrote:
> A negative buffer will work, it'll just be unpleasantly slow, and not 
> really workable at multiple scales unless you re-buffer on the fly at 
> size consistent with your current scale. It really should be solved at 
> the mapserver level, during rendering, not with geometry hacks like buffer.

I am ordering the shapes in my PostGIS query by the respective attribute so
that shapes are drawn in the order of the color ramp (from light to dark),
eg. like

   DATA "the_geom from (SELECT gem_shp.the_geom AS the_geom,
domain_count.gkz AS gkz, domain_count.count AS count, gem_shp.einwohner as
haush, (domain_count.count::real/gem_shp.einwohner::real) as perhh from
gem_shp, domain_count WHERE gem_shp.gemeinde_i = domain_count.gkz order by
perhh ASC) as the_geom using unique gkz using SRID=4004"

(the relevant part is "order by perhh ASC" here).

That makes shapes with darker borders (higher perhh) drawn over the lighter
ones - looks more natural than the "random" overlaps.



More information about the postgis-users mailing list