Why not ask your question on the new OpenStreetMap Community Forum?

Remove the extending border line on to the ocean


This is how i form layer

<Layer name="admin-5678" status="on" srs="&osm2pgsql_projection;">
      <Parameter name="table">
      (select way,admin_level
       from &prefix;_roads
       where "boundary"='administrative'
         and admin_level='5'
       ) as admin</Parameter>

asked 22 Jun '16, 08:43

ZMapTeam's gravatar image

accept rate: 0%

edited 22 Jun '16, 13:59

SomeoneElse's gravatar image

SomeoneElse ♦


Is this a question, a suggestion, or...?

(22 Jun '16, 09:01) Richard ♦

Question ...presently facing issue

(22 Jun '16, 10:26) ZMapTeam

You need to use more words explaining what the problem is, then. Is the map data wrong, or are you just asking about how it appears on a map, the rendering of it?

(22 Jun '16, 10:40) SomeoneElse ♦

Ya sure.. When ever i set zoom to 7 in my map i could see the district borders extending on ocean.. U could see that clearly here - http://www.openstreetmap.org/#map=11/15.6799/80.6688 (lines with purple color)

(22 Jun '16, 11:41) ZMapTeam

You still need to use more words explaining what the problem is. You've included a "layer" definition in the question now, but what is that used with? How does (whatever that is) get its data? Is it something that you've downloaded, and if so what and from where?

(22 Jun '16, 14:02) SomeoneElse ♦
showing 5 of 6 show 1 more comments

You will need to rewrite your stylesheet to either:

  • Filter out borders with boundary_type=territorial_waters and maritime=yes, or
  • Render ocean areas above boundaries, not below them.
permanent link

answered 22 Jun '16, 15:12

Richard's gravatar image

Richard ♦
accept rate: 18%

i dont have a key called boundary_type and maritime in my planet_osm_roads table.

(06 Jul '16, 11:13) ZMapTeam

Richard's referring to values in the OSM data here, not in the imported rendering database. One option you have is to use lua tag transforms with osm2pgsql to convert values or remove things that you don't want to see:


Here, for example is how I remove all admin boundaries for use in a map style that I created for my own use:


Of course, you'd need to look at the data in OSM to make sure that it has tags that you can use for filtering.

(06 Jul '16, 11:28) SomeoneElse ♦
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: 22 Jun '16, 08:43

question was seen: 3,832 times

last updated: 06 Jul '16, 19:54

powered by OSQA