[Mapserver-users] Re: Display polygon layer as circle layer
pkishor_98
pkishor at geoanalytics.com
Tue Jul 15 09:44:43 PDT 2003
--- In mapserver-users at yahoogroups.com, Stefan Schwarzer
<stefan.schwarzer at g...> wrote:
..
> Now I thought perhaps it would be more meaningful if I
> would overlay the
> geospatial/background image with a "circle-layer",
> instead of a
> "polygon-layer". The size or the color of the circles
> would represent then
> the value of the country. This would leave enough space
> to see the
> background image, but one could still recognize the
> different categories of
> the statistical layer.
>
> Is there a simple way to accomplish this? Do I have to
> create from the
> polygon shapefile a point shapefile on-the-fly, before
> then displaying the
> latter?
1. create a subroutine that takes an x,y pair, and a radius, and
creates a circle shape.
2. create a new layer.
3. loop through all the polygons in the poly layer and call the
subroutine for every shape feeding it the current poly's centroid, and
a radius value "prorated" for the attribute value you want to map.
Puneet.
More information about the MapServer-users
mailing list