Hi, I need a solution to hide the border that is displayed between central Serbia and "Kosovo" by default in my maps. I need strictly technical answer as I don't want to get involved into any political discussion. I've just tried to make some map on mapbox.com and I don't know how to do that?


asked 26 Jul '13, 21:13

mapboxg's gravatar image

accept rate: 0%


National borders are typically represented by ways/relations with the tags boundary=administrative and admin_level=2. Maybe you can filter for those?

(27 Jul '13, 19:25) gormo

I need to hide this particular one. Not all the country borders. Is there a general solution to hide one particular border. I'm sure there are many borders under dispute and locals would like to hide them.

(29 Jul '13, 22:16) mapboxg

We also do not have an easy option to display large dragons instead of North America (although that might be possible with OpenLayers). So: No. Borders are in the data, you'll have to write your "empire creator" by yourself ;)

(30 Jul '13, 15:57) gormo

please, let's skip politics. there are many disputes - this is not the only one. osm should allow use to use its engine and even if there is a decision from someone in osm to make one border default in maps, there must be solution for the affected to hide disputed borders. otherwise people will not use osm in many parts of the world. china, india, pakistan, israel, palestine, serbia, georgia, ... another problem is switching between google maps to osm which has completely different rules. in case of serbia-kosovo issue, you can see that google has different solution.

(01 Aug '13, 15:00) mapboxg

I suspect a correct solution is not going to be super easy.

The basic issue being that you probably don't want to supress the complete borders of the entities in question, just the border inbetween. Assuming that the borders are available as polygons in your rendering database and you are using PostGIS, one way to do this could be to filter out the country borders in question from the normal rendering (for example by using the country name) and then generating a new merged polygon with ST_Union (see http://postgis.refractions.net/documentation/manual-2.0/ST_Union.html)

permanent link

answered 30 Jul '13, 10:02

SimonPoole's gravatar image

SimonPoole ♦
accept rate: 18%

edited 30 Jul '13, 11:00


Find the offending borders OSM IDs with the online tools like overpass API ( http://overpass-turbo.eu/s/Gj ), and then use Simons SQL idea.

(30 Jul '13, 16:00) gormo

ok, this looks promising but requires having my on database. I have exported data to geojson using operpass site. Is there a way to use these data on rendering side just to hide it from the osm map.

(01 Aug '13, 17:31) mapboxg
Your answer
toggle preview

Follow this question

By Email:

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



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:


question asked: 26 Jul '13, 21:13

question was seen: 3,696 times

last updated: 01 Aug '13, 17:31

powered by OSQA