mapbox / osm-bright

A Carto template for OpenStreetMap data
BSD 3-Clause "New" or "Revised" License
698 stars 225 forks source link

osm-bright does not render administrative boundaries when data is imported via osm2pgsql) #43

Open skorasaurus opened 12 years ago

skorasaurus commented 12 years ago

I have been attempting to render cities' boundaries (referred as 'administrative boundaries' in osm) in tilemill (using the osm-bright stylesheet) using the default style of osm2pgsql and osm-bright.

osm2pgsql's default stylesheet treats the tag admin-level with the data type 'text' (see https://github.com/openstreetmap/osm2pgsql/blob/master/default.style#L35 )

Currently, osm-bright's base.mss treats the admin-level field as a numerical, 'float' flavor. When a user is importing osm data into osm-bright via osm2pgsql, no administrative boundaries will be displayed.

To fix this, simply change admin[admin_level=2] to admin[admin_level='2'] in base.mss

Pull request was removed because there still may be conflicts with imposm.

jnachtigall commented 9 years ago

Seems to me like a duplicate of https://github.com/mapbox/osm-bright/pull/87 (which has been merged already).

@skorasaurus Maybe you could close this?

jnachtigall commented 9 years ago

Pull request was removed because there still may be conflicts with imposm.

And it seems like it was removed rightly ;)

I imported the osm planet with imposm instead of osm2pgsql. The country boundaries were missing. So I reverted what was done in #87 and then the borders show up.

Proper way of fixing this would properly be to import admin level the same way in osm2pgsl and imposm. Either osm2pgsql also imports it as integer or imposm also as text.