Hello Matt,

thanks for that hint and the links to the data.  I at least could generate a
PNG using nik2img now.

I'll try importing data in Postgres.

Does importing data work for the whole world file that openstreetmap.org
uses?

Some question came up when using several map files, what data do i actually
need?  At the moment i download planet-090408, it is 5.7 Gigabytes.

I think i'll also need all the small PNGs that represent special symbols, is
there a tar file with most/all necessary ones available somewhere?  Or at
least the ones mentioned in osm.xml (from trac.mapnik.org)?

Are there any others that i'll need?


Best regards,
Torsten.


Am Dienstag, 14. April 2009 18:06:23 schrieb Matt Bartolome:
> On Tue, Apr 14, 2009 at 8:13 AM, Torsten Mohr <[email protected]> wrote:
> > Hello,
> >
> > i downloaded mapnik-0.6.0 yesterday, compiling and installing (also with
> > osm plugin) worked fine.
>
> Have you trying compiling in debug mode (DEBUG=y)? When I first
> started out this saved me a ton of time when troubleshooting the
> basics.
>
> > I got some example python scripts and tried to render a map, but did not
> > succeed.
> >
> > I downloaded a file "example.osm" and additionally exported a region as
> > OpenStreetMap XML Data, Permalink:
> >
> > http://www.openstreetmap.org/?lat=47.7822&lon=9.1346&zoom=13&layers=B000F
> >TF
> >
> > I also downloaded osm-styles.xml and osm.xml from trac.mapnik.org .
> >
> > I'd like to render the map that i downloaded using python into a PNG and
> > use the styles and rules defined in osm-styles.xml.
> >
> >
> > My understanding is the following, can anybody please correct me when
> > i'm wrong?
> >
> > I need to create a mapnik.Map
> >
> > import mapnik
> >
> > m = mapnik.Map(600, 600, "+proj=latlong +datum=WGS84")
> >
> > And then i try to create Layers for all the Styles i'd like to use, set
> > the datasource to the osm file that i downloaded, set the zoom and render
> > it.
> >
> >
> > st = ['world', 'world-1', 'builtup', 'places', 'text', 'water']
> > ostyle = '/local/ftp/osm/osm-styles.xml'
> > osm = mapnik.Osm(file='/local/ftp/osm/bodensee.osm')
> >
> > for s in st:
> >    lyr = mapnik.Layer(s, "+proj=latlong +datum=WGS84")
> >    lyr.datasource = osm
> >    lyr.styles.append(s)
> >    m.layers.append(lyr)
> >
> > mapnik.load_map(m, ostyle)
> >
> > m.zoom_to_box(lyr.envelope())
> >
> > mapnik.render_to_file(m, 'world.png', 'png')
> >
> >
> > But world.png is just empty.
> >
> >
> > Seems i'm doing something wrong, is it ok to use mapnik.load_map() to
> > load the styles?  I did not find anything in the documentation.
> >
> >
> > Thanks for any hints,
> > Torsten.
> >
> > _______________________________________________
> > Mapnik-users mailing list
> > [email protected]
> > https://lists.berlios.de/mailman/listinfo/mapnik-users

_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to