0

I`m trying to create map which has several layers. One of them consist of country borders (admin_level = 2,3), country name and region names. I use data of coordinates of Armenia and China from https://download.geofabrik.de/asia.html. I succesfully consolidated these countries with Osmosis 0.40.1.:

osmosis --read-pbf armenia-latest.osm.pbf --read-pbf china-latest.osm.pbf --merge --write-pbf ArChina.osm.pbf

And extracted border with admin_level = 2,3:

osmosis --read-pbf ArChina.osm.pbf --tf accept-relation boundary=administrative admin_level=2,3 --tf reject-ways admin_level=5,6,7,8,9 --used-way idTrackerType=Dynamic --tf reject-nodes admin_level=4,5,6,7,8,9 --tf reject-nodes place=village,town,suburb,city --used-node idTrackerType=Dynamic --write-xml ArChinaBord1.osm

Then I converted it to .osm.pbf with Osmosis.

I understand that I didn't remove all the nodes such as bus stops, natural objects, etc. That`s not the problem.

The problem is - when I`ve launched this map on Ubuntu server - I saw the borders of 2 countries, region names of both of them and only 1 country name (Armenia). I was trying to zoom in and zoom out, but it didn't help. Сhina name is not showing at all.

I checked ArChinaBord1.osm (consolidated file with Armenia and China borders, names). The xml structure of Armenia and China names (node with place=country) is the same, but only one name is shown.

Could you give me some advice, how it could be fixed?

1

1 Answer 1

0

To check that what relations are in your output .pbf, perhaps create an easily greppable file with osmium, something like:

osmium cat -o foo.opl foo.osm.pbf

(opl is a "one per line" text file).

Unfortunately this won't tell you that any relations are valid and don't (say) have missing bits. If you load a Postgres database** with the resulting .pbf and something that should be an area turns up in the planet_osm_line table instead of planet_osm_polygon, it's not a valid polygon in the converted data that you are trying to load.

** See one of the options here, but only worry about loading the database, not about rendering tiles from it.

1
  • Thanks. The problem was solved by adding admin level 4 borders on the map.
    – User111x
    Oct 26, 2022 at 10:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.