hotosm / HDM-CartoCSS

CartoCSS project focused on the Humanitarian Data Model
Other
136 stars 41 forks source link

Iberian Peninsula is rendered as landuse=industrial #264

Open skorasaurus opened 9 years ago

skorasaurus commented 9 years ago

from #262 ; Narrowed down that the only relation that the Spain, Portugal, Andorra share is the Iberian Peninsula relation - http://www.openstreetmap.org/relation/3870917#map=5/38.548/0.813&layers=H I'm having trouble obtaining the relation's history but my guess is that the area=yes tag is the culprit.

skorasaurus commented 9 years ago

downloaded the entire relation in josm; josm validator gives: "Multipolygon relation should be tagged with area tags and not the outer ways"

pavlo-dudka commented 9 years ago

landuse=industrial and name="Puerto de Cartagena" should be removed from two ways: http://overpass-turbo.eu/s/8rU It may be better to contact someone local to map Puerto de Cartagena correctly.

skorasaurus commented 9 years ago

I had taken another look at this later this morning and tried to compare and contrast this with the openstreetmap-carto style which has no such problems.

There's 3 layers use in our stylesheet for landuse.

2 of them: landuse_gen0 and landuse_gen1 have "geometry": "multipolygon" https://github.com/hotosm/HDM-CartoCSS/blob/master/hdm.mml#L80

they're later used in base.mss as

landuse_gen0[zoom>3][zoom<=9],

landuse_gen1[zoom>9][zoom<=12]

I originally thought this was the culprit as openstreetmap-carto does not list multipolygon as its geometry in any of its layers including its layer for landuse - landuse-overlay .

But according to this logic, the Iberian peninsula should be covered as industrial at zoom 12 but it is not.

skorasaurus commented 9 years ago

I contacted a maintainer of the Iberian Peninsula relation and decided to remove the landuse=industrial tag from one of the peninsulas members (done in http://www.openstreetmap.org/changeset/30484528 )

The Peninsula is now slowly appearing correctly in our map layer.

I'm leaving this issue open until we determine if we should change any of code to prevent this in the future.

@pnorman : What's the decision in openstreetmap-carto to NOT use multipolygon as your geometry in any layer? We have them currently in 2 layers - https://github.com/hotosm/HDM-CartoCSS/blob/master/hdm.mml#L80

pnorman commented 9 years ago

@pnorman : What's the decision in openstreetmap-carto to NOT use multipolygon as your geometry in any layer?

There are no multipolygons in the database.

skorasaurus commented 9 years ago

The cause of this rendering error was a tagging mistake. However, other rendering styles like openstreetmap-carto and its German and French forks don't use multipolygon as any geometry values.

My mapnik is rusty so I don't know why the landuse layers' geometry was first set to multipolygon instead of polygon.

so, two questions:

  1. Should we then close this issue?
  2. Would changing our two landuse layers' geometries prevent these types of tagging mistakes appear in our stylesheet?

I made those changes in my local HOT instance of Haiti and compared it to the HOT layer on the server and did not see any changes or things broken.

yohanboniface commented 9 years ago

Interesting! Want to submit a PR so we "test" that in the prod servers?

pnorman commented 9 years ago

I really doubt this has anything to do with differing geometry types. In fact, given the -G in your import instructions, you can expect these layers to return some MULTIPOLYGON types.

It looks to be a fairly simple case of a broken multipolygon. openstreetmap/osm2pgsql#52 is worth reviewing

matkoniecz commented 7 years ago

Problem seems to be gone.