logo separator

[mkgmap-dev] How can I force the inners of a boundary relation to display?

From Gerd Petermann gpetermann_muenchen at hotmail.com on Sun Dec 9 14:12:47 GMT 2018

Hi Dave,

you can check the role in the apply rule, something like
(type=boundary | type=multipolygon) & boundary=protected_area & name=*
{ apply  role=inner
  {
    set tmp:role_inner=yes
  }
}

Gerd

________________________________________
Von: Dave Swarthout <daveswarthout at gmail.com>
Gesendet: Sonntag, 9. Dezember 2018 15:02
An: Gerd Petermann
Cc: Development list for mkgmap
Betreff: Re: [mkgmap-dev] How can I force the inners of a boundary relation to display?

Regarding my last post: The rule you gave me works but, as I said, it renders any boundary that has a name, including in my case, a township administrative boundary. However, it also renders both inner and outer ways. I'm going to give up on that for now, unless anyone can think of a way to convince mkgmap to render inners separately from outers. It's not a big deal. I can easily live with what I have.

The non-rendering islands issue was my own fault. I forgot to assign role=inner to the islands in a multipolygon relation they are also a part of. The boundary rendered fine but there was no "land" showing. (The islands are all outers in the Kodiak National Wildlife Refuge relation.) Anyway, all is well now.

Thanks,

Dave

On Sat, Dec 8, 2018 at 9:10 PM Dave Swarthout <daveswarthout at gmail.com<mailto:daveswarthout at gmail.com>> wrote:
That does work but it makes all ways that are named boundary relations ( with mkgmap:boundary_name =*) render with the same style. I can live with that but I'm still wondering if there is a way to force it to only operate on inners and only on ways of type boundary=protected_area ? Can I set in "relations" and test in "lines" for a new mkgmap:boundary_name, for example, boundary1_name?

Another interesting problem I just noticed is that simple islands (not multipolygons) whose coastlines are also boundaries do not display as islands, only as members of the refuge they are a part of. The coastlines fail to display whether or not the above code is active or commented out so it must be a separate issue. Take a look at Village Islands inside the Kodiak National Wildlife Refuge. These display as  continuous boundaries with my style [0x10e12], but there is no "land" inside the boundaries, only sea. So, these objects are tagged as place=islet, natural=coastline, but they are also outers in the Kodiak National Wildlife Refuge.

Dave

On Sat, Dec 8, 2018 at 6:13 PM Gerd Petermann <gpetermann_muenchen at hotmail.com<mailto:gpetermann_muenchen at hotmail.com>> wrote:
Hi Dave,

there is code in mkgmap to treat multipolygon relations. See mkgmap:mp_created and mkgmap:stylefilter in http://www.mkgmap.org.uk/doc/pdf/style-manual.pdf
The multipolygon code produces those extra ways only for the outer rings.
If you just want to render the outlines you may use something like
mkgmap:boundary_name=* 0x10e12 resolution 19 continue]
at the top of the lines file.

Gerd

________________________________________
Von: Dave Swarthout <daveswarthout at gmail.com<mailto:daveswarthout at gmail.com>>
Gesendet: Samstag, 8. Dezember 2018 11:30
An: Gerd Petermann
Cc: Development list for mkgmap
Betreff: Re: [mkgmap-dev] How can I force the inners of a boundary relation to display?

Yes, that's confusing to me. I included those snippets to illustrate what I am currently using — maybe you can explain to me stepwise how those boundaries get rendered?

Is there code inside mkgmap that interprets such directives and applies tags to the outer ways of relations? If there is then I assume the same can be done for those inners. And you would be the one who can best answer that question.

Thanks for taking the time to explain.

Dave

On Sat, Dec 8, 2018 at 5:03 PM Gerd Petermann <gpetermann_muenchen at hotmail.com<mailto:gpetermann_muenchen at hotmail.com><mailto:gpetermann_muenchen at hotmail.com<mailto:gpetermann_muenchen at hotmail.com>>> wrote:
Hi Dave,

in the relations rule you set mkgmap:boundary_name but in the lines rule you don't use that.

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk<mailto:mkgmap-dev-bounces at lists.mkgmap.org.uk><mailto:mkgmap-dev-bounces at lists.mkgmap.org.uk<mailto:mkgmap-dev-bounces at lists.mkgmap.org.uk>>> im Auftrag von Dave Swarthout <daveswarthout at gmail.com<mailto:daveswarthout at gmail.com><mailto:daveswarthout at gmail.com<mailto:daveswarthout at gmail.com>>>
Gesendet: Samstag, 8. Dezember 2018 03:18
An: Development list for mkgmap
Betreff: [mkgmap-dev] How can I force the inners of a boundary relation to      display?

Hi,

I've been adding large Alaskan National Wildlife Refuges to OSM. The boundaries weren't displaying so I added a directive in my relations file modeled after the administrative boundary code in the default style that adds a name to protected areas like so:

(type=boundary | type=multipolygon) & boundary=protected_area & name=*
{ apply
  {
    set mkgmap:boundary_name='$(mkgmap:boundary_name)/${name}' | '${name}';
  }
}

Then in my lines file I included a line style defined as: boundary=nature_reserve | boundary=protected_area [0x10e12 resolution 19].

This works well but the lines bounding the inner areas of these relations do not render. How can I make them display?

Many thanks

Dave

--
Dave Swarthout
Homer, Alaska
Chiang Mai, Thailand
Travel Blog at http://dswarthout.blogspot.com


--
Dave Swarthout
Homer, Alaska
Chiang Mai, Thailand
Travel Blog at http://dswarthout.blogspot.com


--
Dave Swarthout
Homer, Alaska
Chiang Mai, Thailand
Travel Blog at http://dswarthout.blogspot.com


--
Dave Swarthout
Homer, Alaska
Chiang Mai, Thailand
Travel Blog at http://dswarthout.blogspot.com


More information about the mkgmap-dev mailing list