Hi Enzo,

I'd second Andy's recommendation of using PostGIS to render circles with varying size based on some attribute. That sounds like the right place to start.

As far as styling the circles once you've created them can find more about the LineSymbolizer (which you can use to define the outline size and color of the circle), and the PolygonSymbolizer (to define the fill color) on the Mapnik wiki:

http://trac.mapnik.org/wiki/LineSymbolizer
http://trac.mapnik.org/wiki/PolygonSymbolizer

Also at the wiki is a page that has started to document some usage specific to PostGIS:

http://trac.mapnik.org/wiki/PostGIS#Usage

And here is a sample script in python that shows buffering existing polygon data into a larger polygon using PostGIS:
http://mapnik-utils.googlecode.com/svn/trunk/tutorials/postgis/postgis_geometry.py

You could likely borrow from some of the script ideas to approximate the same effect with circles.

Where these references are incomplete or unclear I'll try to answer further.

Dane




On Nov 16, 2008, at 7:40 PM, Enzo Losantas wrote:

Thanks Andy for replying.. somehow gave me an idea how it works.

although there are still things that im confused about. as for the kind of circles, maybe circles that have dynamic radius based on a certain parameter. Since these are varying radii, I'll probably follow your advice regarding
drawing polylines in postgis.

As for the item on LineSymbolizer / PolygonSymbolizer, can you help me with this? Are there any available API or references that can be of help as well? How does this work exactly?

thanks,
Enzo

On Wed, Nov 12, 2008 at 8:16 PM, Andy Allan <[EMAIL PROTECTED]> wrote:
What kind of circles are you looking for? If you just want small
circles to mark point locations, then make a .png and use a
PointSymbolizer with it. But if you're trying to vary the size of the
circles, like for example "draw me a circle where the radius is
proportional to the population of the town", then you'd be better off
creating polylines in postgis (or shapefile) and then just
LineSymbolizer / PolygonSymbolizer depending on whether you want the
outline or it filled.

Cheers,
Andy

On Wed, Nov 12, 2008 at 2:54 AM, Enzo Losantas <[EMAIL PROTECTED]> wrote:
> hello,
>
> im wondering if anyone here is familiar with rendering osm through mapnik? > Particularly, anyone knows how to render circles? is it through node-ways or
> it can be done through the rules?
>
>
> _______________________________________________
> dev mailing list
> [email protected]
> http://lists.openstreetmap.org/listinfo/dev
>
>


_______________________________________________
dev mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/dev

_______________________________________________
dev mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/dev

Reply via email to