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

I have set local OSM Map server for Map of India using mod tiles. I want to remove National Boundary from map. How to do it?

asked 19 Jul '18, 13:32

Reshma%20Maner's gravatar image

Reshma Maner
235303136
accept rate: 0%


You have several options:

  1. Identify the boundary in a LUA script which processes data as it is loaded into your database using osm2pgsql.
  2. Use osmosis and a tag-transform to change one or more tags associated with the boundary, for instance remove or alter admin_level or boundary=administrative
  3. If you wish to avoid reloading your database, it gets a bit trickier. One way would be to create a view on the polygon table to filter out the Indian boundary. The view would have to be named planet_osm_polygon, which in turn means that the base table names would all need changing which would likely make further incremental loads tricky if the renaming is not spot on. (I don't think it is possible with PostgreSQL to manage views owned by different users as one might do with Oracle - or at least when I've tried this I didn't get it to work, because of permissions on sys tables IIRC).
  4. Change the SQL statement which downloads the boundaries in the Carto-CSS file to filter out the India boundary. You then need to recompile to raw mapnik.
  5. Create a trigger on the planet_osm_polygon table which alters one or more of admin_level or boundary columns on INSERT and UPDATE.
  6. Pre-filter your data with osmfilter, which requires pbf->o5m conversion with osmconvert.

If you are content with a database reload I would use one of the first two, with a preference for the first. Of course you can do a manual intervention on the database table now as long as your update processes ensure that the polygon is ignored or not added as a national boundary.

permanent link

answered 19 Jul '18, 14:17

SK53's gravatar image

SK53 ♦
28.1k48268433
accept rate: 22%

This seems to be difficult. Isn't there a simple way to do this?

(20 Jul '18, 07:26) Reshma Maner

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:

×63
×6

question asked: 19 Jul '18, 13:32

question was seen: 1,743 times

last updated: 20 Jul '18, 07:26

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