<div dir="ltr"><div>Oh perfect -- thanks for your help. I'm displaying arbitrary polygons, so I can control the output entirely. Changing the order so that it's node, way, relation seems to work.</div><div><br></div><div>Craig<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 19, 2022 at 2:20 AM Gerd Petermann <<a href="mailto:gpetermann_muenchen@hotmail.com" target="_blank">gpetermann_muenchen@hotmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
see file in <a href="https://files.mkgmap.org.uk/detail/545" rel="noreferrer" target="_blank">https://files.mkgmap.org.uk/detail/545</a><br>
<br>
I think the file is a valid OSM file. JOSM doesn't open it because the meta data is missing, but that can be fixed with osmconvert:<br>
osmconvert conyers.osm --fake-version -o=conyers-fake.osm<br>
<br>
However, this doesn't help for mkgmap.<br>
The current implementation of the osm data readers (*.osm *.o5m or *.pbf) in mkgmap cannot handle files where relations appear<br>
before the way or node members of the relation. The effect is that the relation is ignored.<br>
I've uploaded a modified version which shows the expected order: <a href="https://files.mkgmap.org.uk/detail/546" rel="noreferrer" target="_blank">https://files.mkgmap.org.uk/detail/546</a><br>
<br>
I don't know how much work it would be to support this rather special file format. We already have code to handle relations which refer to relations that<br>
were not yet read, I guess it would require similar code for node members and way members.<br>
<br>
Let me know if you think this should be done or even better: post a patch ;)<br>
<br>
@Craig:<br>
I don't know what exactly you want to do. Normally mkgmap processes rectangular tiles containing all the OSM data for that area.<br>
Such a tile would contain various boundary=administrative relations or ways. Of course it makes no sense to render 0x07 polygons<br>
for all those boundary=administrative objects. You would end up with a huge amount of overlapping 0x07 polygons covering<br>
all of your map.<br>
<br>
Gerd<br>
<br>
<br>
<br>
<br>
<br>
________________________________________<br>
Von: mkgmap-dev <<a href="mailto:mkgmap-dev-bounces@lists.mkgmap.org.uk" target="_blank">mkgmap-dev-bounces@lists.mkgmap.org.uk</a>> im Auftrag von Gerd Petermann <<a href="mailto:gpetermann_muenchen@hotmail.com" target="_blank">gpetermann_muenchen@hotmail.com</a>><br>
Gesendet: Dienstag, 18. Januar 2022 22:04<br>
An: Development list for mkgmap<br>
Betreff: Re: [mkgmap-dev] How to display administrative boundaries / shade them?<br>
<br>
Hi Craig,<br>
<br>
try this overpass query<br>
(<br>
rel(id: 119584);<br>
>>;<br>
);<br>
out;<br>
<br>
Gerd<br>
<br>
________________________________________<br>
Von: mkgmap-dev <<a href="mailto:mkgmap-dev-bounces@lists.mkgmap.org.uk" target="_blank">mkgmap-dev-bounces@lists.mkgmap.org.uk</a>> im Auftrag von Craig Durkin <<a href="mailto:craigdurkin@gmail.com" target="_blank">craigdurkin@gmail.com</a>><br>
Gesendet: Dienstag, 18. Januar 2022 21:39<br>
An: Development list for mkgmap<br>
Betreff: Re: [mkgmap-dev] How to display administrative boundaries / shade them?<br>
<br>
Oh interesting, I wonder what the size difference is. I just uploaded my version of the relation to <a href="https://files.mkgmap.org.uk/detail/545" rel="noreferrer" target="_blank">https://files.mkgmap.org.uk/detail/545</a> -- it's 159.499 bytes, but it looks complete to me: it has the relation tags with member way references, the constituent nodes (with latitude/longitude), the ways themselves with node references, and tags for everything.<br>
<br>
I created it by running the following query on Overpass Turbo (<a href="https://overpass-turbo.eu" rel="noreferrer" target="_blank">https://overpass-turbo.eu</a> ):<br>
rel(id: 119584);<br>
out body;<br>
>;<br>
out skel qt;<br>
<br>
Thanks!<br>
Craig<br>
<br>
>From Gerd Petermann gpetermann_muenchen at <a href="http://hotmail.com" rel="noreferrer" target="_blank">hotmail.com</a> <mailto:<a href="mailto:mkgmap-dev%2540lists.mkgmap.org.uk" target="_blank">mkgmap-dev%40lists.mkgmap.org.uk</a>?Subject=Re:%20Re%3A%20%5Bmkgmap-dev%5D%20How%20to%20display%20administrative%20boundaries%20/%0A%09shade%09them%3F&In-Reply-To=%3CAM0PR08MB54102C8A6DFD61494B89BF0E9E589%<a href="http://40AM0PR08MB5410.eurprd08.prod.outlook.com" rel="noreferrer" target="_blank">40AM0PR08MB5410.eurprd08.prod.outlook.com</a>%3E> on Tue Jan 18 20:05:16 GMT 2022<br>
<br>
Hi Craig,<br>
<br>
it works for me when data.osm contains the complete relation. I just downloaded just that relation with all its members in JOSM<br>
and the file has 359.898 bytes.<br>
What's the content of your data.osm?<br>
Maybe upload it to <a href="https://files.mkgmap.org.uk/" rel="noreferrer" target="_blank">https://files.mkgmap.org.uk/</a><br>
<br>
Gerd<br>
-<br>
<br>
On Tue, Jan 18, 2022 at 2:30 PM Craig Durkin <<a href="mailto:craigdurkin@gmail.com" target="_blank">craigdurkin@gmail.com</a><mailto:<a href="mailto:craigdurkin@gmail.com" target="_blank">craigdurkin@gmail.com</a>>> wrote:<br>
That's what I would have thought too, but no luck. It seems like the "polygons" file maybe only deals with closed ways and not specifically relations?<br>
<br>
For what it's worth, my program is invoked with:<br>
<br>
java -jar mkgmap-r4586/mkgmap.jar --gmapsupp --gmapi --transparent --output-dir=gmap_output --style-file=mkgmap-r4586/new_style/ data.osm<br>
<br>
and the 'polygons' file in new_style/polygons has the following line in it:<br>
boundary=administrative [0x07 resolution 20]<br>
<br>
Craig<br>
<br>
>From Gerd Petermann gpetermann_muenchen at <a href="http://hotmail.com" rel="noreferrer" target="_blank">hotmail.com</a> <mailto:<a href="mailto:mkgmap-dev%2540lists.mkgmap.org.uk" target="_blank">mkgmap-dev%40lists.mkgmap.org.uk</a>?Subject=Re:%20Re%3A%20%5Bmkgmap-dev%5D%20How%20to%20display%20administrative%20boundaries%20/%20shade%0A%20them%3F&In-Reply-To=%3CAM0PR08MB541016A276CDB396533304559E589%<a href="http://40AM0PR08MB5410.eurprd08.prod.outlook.com" rel="noreferrer" target="_blank">40AM0PR08MB5410.eurprd08.prod.outlook.com</a>%3E> on Tue Jan 18 18:41:33 GMT 2022<br>
<br>
Hi Craig,<br>
<br>
I think all you need is a rule in style file polygons to render the object.<br>
<br>
Gerd<br>
<br>
On Tue, Jan 18, 2022 at 1:33 PM Craig Durkin <<a href="mailto:craigdurkin@gmail.com" target="_blank">craigdurkin@gmail.com</a><mailto:<a href="mailto:craigdurkin@gmail.com" target="_blank">craigdurkin@gmail.com</a>>> wrote:<br>
Hi mkgmap folks -- sorry if this is kind of a beginning question, but I can't for the life of me figure out how to get administrative boundaries (or really any arbitrary polygon) to display with mkgmap. Ideally I'd be able to lightly shade the inside of the boundary polygon, but even displaying the polygon is eluding me.<br>
<br>
An example OSM relation that I'm trying to display is Conyers, GA, USA relation ID 119584.<br>
<br>
I understand that there might be editing necessary to the style files, but it's not really clear: do I edit relations, lines, or polygons? Or all 3?<br>
<br>
Can anyone offer any tips?<br>
<br>
Thanks,<br>
Craig<br>
_______________________________________________<br>
mkgmap-dev mailing list<br>
<a href="mailto:mkgmap-dev@lists.mkgmap.org.uk" target="_blank">mkgmap-dev@lists.mkgmap.org.uk</a><br>
<a href="https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" rel="noreferrer" target="_blank">https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a><br>
_______________________________________________<br>
mkgmap-dev mailing list<br>
<a href="mailto:mkgmap-dev@lists.mkgmap.org.uk" target="_blank">mkgmap-dev@lists.mkgmap.org.uk</a><br>
<a href="https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" rel="noreferrer" target="_blank">https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a><br>
</blockquote></div>