NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I'm currently using Tilemill on windows for designing maps. I noticed that there was a problem with the water layer for a particular city (Montreal).

For example, some small islands of this city, like St-Helen, are completely covered with water. While other area came out as land instead of water. Is this a known problem ? Do I need some special shapefile or something to render the map ?

2 screenshots:

*Picture #1 : (1) The island is covered with water. (2) This area should have been covered with water.

alt text

Picture #2 : I commented the line: polygon-fill: @water; so it is disabled (see red square #2). The island look normal now. It looks like the water layer bypass the others. It still doesn't explain why there is no water fill in the #2 red square in picture #1

alt text

Any help would be greatly appreciated! Ty in advance!

asked 07 Dec '16, 17:00

DanielQc's gravatar image

DanielQc
41114
accept rate: 0%

edited 07 Dec '16, 20:14

I'd also like to understand the reason behind this behavior. Why it's happening in the first place ?

I used the most recent map for this area on geofabrik. I confirm you that it's not from the map itself because when I imported it in JOSM, everything was correct. So it means, it must come from tilemill (and not from my map's extract.)

I also googled how to manually change the color for a specific area and I found nothing.. This workaround proposed could do the job. I'm not an expert and maybe it's something very simple that I missed.

Feel free to tell me if i'm not addressing my demand in the right forum.

ty again

(08 Dec '16, 23:03) DanielQc

There are a couple of possibilities - one is that the style you're using is getting confused by the riverbank (the relevant relation I think is this one). The other is that someone that relation is somehow broken in your data. I wouldn't expect that to be the case, since that relation is fully within Quebec as defined at Geofabrik, assuming you didn't cut Quebec down any more before importing.

Another possibility is how Tilemill is accessing the data. You're using Tilemill on Windows - is that using an osm2pgsql database to render from, or are you doing something else? If it is a database, what are you using to import the data? If not, how is Tilemill accessing it?

In order to find out which is likely to be the problem, the first thing I'd do is to see if other similiar riverbank relations are rendered OK?

permanent link

answered 09 Dec '16, 01:50

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

edited 09 Dec '16, 01:53

1

For info, I've just downloaded a Montreal metro extract from Mapzen, loaded it using osm2pgsql and had a look at it in OSMBright in TileMill. The water displays as water, and the Ile Ste Helene as land.

The OSMBright and TileMill versions are from around 2013, but I suspect that neither have changed much.

(10 Dec '16, 13:55) SomeoneElse ♦

I did two tests from what you mentionned. First, I tried one specific area (ID : 156816898) from the link you posted and I got the same problem. The island was also covered with water and St-Lawrence river was "land-filled". (sry no picture)

Then I did another test with Quebec city and the result was exactly like as expected. alt text

On the picture, you can see that the island on the top right is coming out correctly. Like you said, I’m supposing it is the style that get confused by the riverbank. But I don't know why the result is different for Montreal.

To answer your questions, I'm using osm2pgsql (PostgreSQL with PostGIS) for importing data. I installed everything from the following procedure. Do you think the problem might come from openstreetmap carto ?

I also want to thank you for your elaborate answer. It's helping me and I’m feeling closer to a solution.

permanent link

answered 10 Dec '16, 06:56

DanielQc's gravatar image

DanielQc
41114
accept rate: 0%

edited 10 Dec '16, 06:58

Out of interest, where did you get the data from? I'm wondering if whatever process was used could have chopped off part of the multipolygon.

Also I don't quite understand "Do you think the problem might come from openstreetmap carto" - it looks like you're using OSM Bright as a style not OSM Carto?

(10 Dec '16, 13:13) SomeoneElse ♦

I think I got confused.. I was thinking about the openstreetmap carto (or OSMBright)because I thought that maybe some tags were missing in the style (like Wetitpig0 proposed)

(10 Dec '16, 20:51) DanielQc

Problem should be fixed.

Whenever you get water-filled islands, most probably it is because there are no tags about whether it is an island or not. If that is the case, choose the area and tag it with "natural=coastline" & "place=island".

permanent link

answered 10 Dec '16, 09:37

Wetitpig0's gravatar image

Wetitpig0
307161928
accept rate: 10%

Just change the water-filled area by yourself.

permanent link

answered 07 Dec '16, 23:29

Wetitpig0's gravatar image

Wetitpig0
307161928
accept rate: 10%

Ty for your answer. It looks simple. Maybe I missed something.. How may I do this ?

(08 Dec '16, 00:27) DanielQc

Is the way of the river bank drawn already?

(09 Dec '16, 00:01) Wetitpig0

I just downloaded the Mapzen extract and it worked. I’m happy :-)

You were right SomeoneElse, it’s probably the process of extracting the data that caused my problem. It's still curious... I was using quebec-latest.osm from Geofabrik.

Here, the osmosis command line that I was using for extracting a smaller part from the quebec-latest map:

bzcat quebec-latest.osm.bz2 | osmosis --read-xml enableDateParsing=no file=- --bounding-box top=45.993 left=-74.312 bottom=45.228 right=-72.812 --write-xml file=- | bzip2 > mtl.osm.bz2

I think it might be the command line.. (or the coordinates ?)

permanent link

answered 10 Dec '16, 20:40

DanielQc's gravatar image

DanielQc
41114
accept rate: 0%

1

I'm guessing that you'd need to use both the "complete" options and also "cascading" option in osmosis as per:

https://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage_0.41

(11 Dec '16, 16:05) SomeoneElse ♦
1

Tyvm.. you've found it! This command line did the trick!

bzcat quebec-latest.osm.bz2 | osmosis --read-xml enableDateParsing=no file=- --bounding-box top=45.993 left=-74.312 bottom=45.228 right=-72.812 completeRelations=yes cascadingRelations=yes --write-xml file=- | bzip2 > mtl.osm.bz2

(13 Dec '16, 03:52) DanielQc

Well, the "trick" actually does not solve the problem. If your request scripts are properly constructed, something is still wrong in the sw involved.
In the first case, you ask the sw for clipping out the objects using the bbox from your image 1. Clipping large and complex areas is complicated and full of error traps. The areas may radically change their structures and shapes and in some cases, the clipping may result in an incomplete polygon in an “outer-inner-outer-inner...” chain. Then, all the following polygons will change their rules and rendered inversed (as in your example).
In the second case, your request asks the sw to extract all the objects having something common with the bbox. Therefore, no clipping is involved and you will get much, much larger area to render than you actually need and this may become highly inefficient/unpractical. The two requests/scripts are logically quite different.
So, if you still insist on vector (pre- or on-the-fly-) tiling, you must use a version of the fist script but with a more robust clipping model. You should contact the intellectual owner of the involved sw and send an error warning with the example in your question.

(13 Dec '16, 11:13) sanser

@sanser - I'm sure that pull requests at https://github.com/openstreetmap/osmosis would be welcomed :) Personally I think that the options that they're offering are more than adequate.

(13 Dec '16, 11:21) SomeoneElse ♦

It dit the trick for my needs..

I understand from your post that the first command line should have worked. In fact, It worked properly with JOSM. The problem was only with Tilemill (inverted colors). By adding those 2 additional arguments I got at least the expected result.

(14 Dec '16, 04:29) DanielQc

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×92
×87
×79
×36
×2

question asked: 07 Dec '16, 17:00

question was seen: 4,714 times

last updated: 14 Dec '16, 04:29

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum