Re: [mapnik] Imposm-imported data as input to Mapnik? (Imposm-Mapnik incompatibility)

778 views
Skip to first unread message

Artem Pavlenko

unread,
Oct 1, 2012, 12:15:04 PM10/1/12
to map...@googlegroups.com
Hi Howie,

To use your data imported with imposm you need matching style (*.xml).
This all depends how native OSM types are mapped into postgis tables
(--mapping-file=... ).
I'd suggest you try: https://github.com/mapbox/osm-bright - it might
just work, not sure.

Artem


On 1 October 2012 14:45, Howie <o43...@rtrtr.com> wrote:
> Hello
>
> I've got a PostGIS server setup that contains OSM data imported with
> "Imposm". Now I want to export tile images using this data, by using Mapnik
> and it's "default stylesheet" that comes with a few python scripts to do the
> task.
>
> However these scripts seem to be incompatible with Imposm-imported data, the
> script assumes tables that are created using Osm2pgsql.
>
> How can I generate tile images with my Imposm-populated database?
>
> Thank you for your answers.

AJ Ashton

unread,
Oct 1, 2012, 2:18:31 PM10/1/12
to map...@googlegroups.com
On Mon, Oct 1, 2012 at 12:15 PM, Artem Pavlenko <ar...@mapnik.org> wrote:
> I'd suggest you try: https://github.com/mapbox/osm-bright - it might
> just work, not sure.

Unfortunately there are some important differences between the default
Imposm mapping and the one OSM Bright uses, so a re-import would still
be required.

This project uses the default mapping:
<https://github.com/mapbox/foss4g-benchmark-style> ...however the road
labels rely on a feature that didn't end up getting integrated into
Mapnik. It may render, but it won't look quite right without some
tweaking.

I am not aware of other public stylesheets that are compatible with a
default Imposm import out of the box.

--
AJ Ashton

Howie

unread,
Oct 2, 2012, 2:51:32 AM10/2/12
to map...@googlegroups.com
Hmm, maybe it would be possible to modify the default OSM stylesheet for Mapnik, and tailor it to imposm. After a quick look it seems that the work needed to be done lies solely in the file "osm.xml" and more specifically it's SQL-queries.
 
However I am really new to this stuff so some guidance on doing this work would be great.

Rahkonen Jukka

unread,
Oct 2, 2012, 3:29:09 AM10/2/12
to map...@googlegroups.com
Hi,

Sure it would be possible to do such modifications. However, the Imposm folks have selected quite different strategy for rendering OSM data than osm2pgsql + Mapnik and I would guess that making all the modifications will take you some time. By looking at the Imposm default schema at http://imposm.org/docs/imposm/latest/database_schema.html#tables I can see that it creates quite a many tables which do not have an equivalent in the default OSM stylesheet.

For getting an idea about why Imposm is creating the tables it creates and how they are planned to be used for rendering you can try to browse the sources at https://github.com/mapserver/basemaps.

Out of curiosity, why do you want to do the import with Imposm and render with Mapnik, instead of making it in an easier way by using either Imposm + Mapserver or osm2pgsql + Mapnik? Experimenting with non-standard solutions is fine, just wanted to know if you plan to do things in a hard way intentionally.

-Jukka Rahkonen-



________________________________
Lähettäjä: map...@googlegroups.com [map...@googlegroups.com] käyttäjän Howie [o43...@rtrtr.com] puolesta
Lähetetty: 2. lokakuuta 2012 9:51
Vastaanottaja: map...@googlegroups.com
Aihe: [mapnik] Re: Imposm-imported data as input to Mapnik? (Imposm-Mapnik incompatibility)

Ronan Dunklau

unread,
Oct 2, 2012, 3:47:51 AM10/2/12
to map...@googlegroups.com
I only tested it with data imported with osm2pgsql, but mapbox provides a stylesheet that works with imposm:
https://github.com/mapbox/osm-bright

On the downside, it generates a tilemill project, but it is still easy to use:  you just have to run tilemill, open your osm-bright project and click export to mapnik to obtain the full mapnik xml file.

Regards,

--
Ronan Dunklau


2012/10/2 Rahkonen Jukka <Jukka.R...@mmmtike.fi>
Reply all
Reply to author
Forward
0 new messages