osm-without-borders/cosmogony

Bug : Canada is not recognized correctly

ttgiub opened this issue · 4 comments

Hi,

First of all, thanks for this great piece of software.

I may have encountered a bug while working on some partial OSM data set.
I am using geofabrik.de which provides the OSM data per country
http://download.geofabrik.de/

Cosmogony is working well for France, Belgium and Germany.
But for Canada it is not working properly.
http://download.geofabrik.de/north-america/canada-latest.osm.pbf

The shape (the geometry if you prefer) of Canada is not computed correctly.
Displaying this shape shows only the Haïda Gwaïi archipelago and not the main land !
As a direct consequence the hierarchy is not computed correctly

For example, It computes
Mount Royal, Montreal (06), Quebec
But it should compute
Mount Royal, Montreal (06), Quebec, Canada

Any idea how to fix it ?

Best regards,

It's strange the country seems correctly displayed on cosmogony.world (don't know when the data have been generated though)

I think it's due to the fact that you used a partial osm export that does not contain the whole geometry of the country. I had a similar problem once when using a geofabrik export (I can't remember if it was for france or europe) when their bounding box was filtering some points of the country geometry.

If you can find the right bounding box, you can send geofabrik an email, they are usually very quick to respond.

As @antoine-de pointed out perfectly well, this issue is very probably caused by the polygon used by Geofabrik (visible on this page) not quite covering the whole Canada relation boundary.

Here is a corrected polygon that I've just sent to Geofabrik:
canada_updated.poly.zip

In the meantime it's possible to use the (significantly larger) North America file or to build your own extract using osmium for example.

You are right. I have tried with the North America file and everything works well.

Thanks a lot for your fast answers.

FYI Geofabrik has updated the polygon used to generate the Canada extract.
It should now work correctly with canada-latest.osm.pbf