[postgis-users] Create a Thematic grid map with postgresql

Paul Ramsey pramsey at refractions.net
Thu Nov 18 16:09:13 PST 2004


Brent Wood wrote:

> There are a number of issues which make PostGIS <> GMT non-trivial. Mainly the
> lack of topology or hole/island polygons support in GMT.

If you are looking for filled rendering, it is possible to get the 
effect on "holeless" systems like GMT by using zero-width corridors 
between the exterior and interior rings.

> I resolved this in the perl script by having a Z value in the PostGIS export as
> "ring no". So I can grep all the non #1 rings & plot in GMT as an overlay on
> the #1 rings to "look" like holes in the #1 rings. (Hope this makes sense :-)

How does it know where one polygon stops and another ends?
For that matter, how does it know what's a polygon?

> Each multipolygon becomes several distinct polygons, with any holes as #2+ in
> the output GMT file.
> 
> It wasn't thought through as atidy or elegant approach, just a simple way of
> turning a WKT output file into something I can plot with GMT, & use 
> 
> psql $DB -t -a -c "..."  | wktTogmt | grep "1$" | psxy ....
>   to plot the main polygons, or
> cat <file> | wktTogmt | grep -v "1$" | psxy
>   to overlay the holes.... 
> 
> 
> Works for me, but if a more embedded/elegant approach is available I'll buy the
> beers !!!
> 
> 
> Cheers,
> 
>   Brent
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users




More information about the postgis-users mailing list