Hello,
thanks a lot for these explanations. That link to the XML descriptions
was very useful.
1.
Another question, is it possible to create PNGs with alpha support?
I'd like the background to be "invisible", so i can overlay a map onto
another image. Or do i need to replace the background value in the
map with an "invisible" pixel with an external tool?
2.
Also, i try to get the scale() and scale_denominator() of the map.
I wonder why it is NEGATIVE (below zero):
print "scale", m.scale()
print "denom", m.scale_denominator()
--->
scale -0.000333333333333
denom -1.19047619048
I use a slightly modified version of OSMs generate_image.py with
these map values:
ll = (4.5, 46, 16, 56) # Deutschland
# ll = (-180.0, -90.0, 180.0, 90.0) # Welt
z = 10
imgx = 300 * z
imgy = 400 * z
m = Map(imgx, imgy)
Best regards,
Torsten.
Am Freitag, 17. April 2009 21:51:07 schrieb Lennard:
> Torsten Mohr wrote:
> > I understand that the 'Datasource' (e.g. PostGIS) contains the logical
> > information that make up a map, so to say where is a street, where is
> > a river, right?
>
> Yes, the PostGIS db contains geometry data, and other columns with data
> that's used in rules to determine what data to render.
>
> > A 'Style' tells how to graphically visualise a certain category of data,
> > e.g. to draw a river in blue, a forest in green and, is that right?
>
> Where you define a layer to tell mapnik *which* data to fetch from the
> database, a style is used to tell mapnik *how* and *when* to render that
> data.
>
> > I'm unsure about 'Rule', does it describe when to render a certain
> > category? Something like "don't render streets if we look at the whole
> > world"?
>
> Among others. The example you gave is decided by the
> Min/MaxScaleDenominators. Other things that are normally in a rule are a
> filter ("render the data if it passes this filter") and the actual
> drawing rules ("draw a dotted line this thick and in this colour").
>
> A style can and usually does contain more than 1 rule, for various zoom
> levels.
>
> > 'Layer's are used to distinguish certain categories, it is more for the
> > application to order categories, right?
>
> The layer order decides in what order the elements are drawn, from the
> first defined layer in the stylesheet right up to the last, each
> successive layer overwriting elements in previous layers. Search for
> Painter's Algorithm on wikipedia.
>
> > Is my understanding right or is there something missing?
>
> No, you're on the right track.
>
> > As i needed to download world_borders and also coast_line i guess
> > these data sources are not contained in the huge "planet.osm", right?
>
> Correct.
>
> See also: http://trac.mapnik.org/wiki/XMLConfigReference
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users