You have several options:
- Identify the boundary in a LUA script which processes data as it is loaded into your database using osm2pgsql.
- 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
- 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).
- 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.
- Create a trigger on the planet_osm_polygon table which alters one or more of admin_level or boundary columns on INSERT and UPDATE.
- 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.
answered
19 Jul '18, 14:17
SK53 ♦
28.1k●48●268●433
accept rate:
22%