<!doctype html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<div>
Good morning,
</div>
<div>
<br>
</div>
<div>
so far i used "mkgmap:residential" to draw some highways thinner in citys. I replaced it with the is_in function and added some other polys like "school", "industrial" etc. It works fine, great.
</div>
<div>
<br>
</div>
<div>
I added also a "bicycle=no" on "cemetarys", "schools", "landfills", "quarry" etc.
</div>
<div>
<br>
</div>
<div>
Thank you all for this work!
</div>
<div>
<br>
</div>
<div>
Problem #1:
</div>
<div>
is_in(landuse,residential,any)=true will not work in "Wuppertal". mkmap:residential also no work there either.
</div>
<div>
I suspect the reason in the osm-data, but i don´t see why. Have anybody an idea?
</div>
<div>
<a href="https://fotos.rennrad-news.de/f3/4/494/494184-sm3yb9gt4tjr-test-medium.png">https://fotos.rennrad-news.de/f3/4/494/494184-sm3yb9gt4tjr-test-medium.png</a>
</div>
<div>
<br>
</div>
<div>
Problem, #2:
</div>
<div>
r-4412 report: SCHWERWIEGEND (IsInFunction): .\Baustelle\Speiche_Kanaren_Splitter\88002007.osm.pbf: rounding error? first point is on line but status of first point is not ON
</div>
<div>
<a href="https://speichenkarte.de/88002007.osm.pbf">https://speichenkarte.de/88002007.osm.pbf</a>
</div>
<div>
<br>
</div>
<div>
<br>
</div>
<div>
greetings
</div>
<div>
<br>
</div>
<div>
Arndt
</div>
<div>
<br>
</div>
<div>
<br>
</div>
<div>
<pre class="tw-data-text tw-text-large tw-ta" dir="ltr" data-placeholder="Übersetzung"></pre>
</div>
<blockquote type="cite">
<div>
Gerd Petermann <
<a href="mailto:gpetermann_muenchen@hotmail.com">gpetermann_muenchen@hotmail.com</a>> hat am 10. Januar 2020 um 12:07 geschrieben:
</div>
<div>
<br>
</div>
<div>
<br>
</div>
<div>
Hi Ticker,
</div>
<div>
<br>
</div>
<div>
thanks, see r4412 :
<a href="http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap&rev=4412" rel="noopener" target="_blank">http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap&rev=4412</a>
</div>
<div>
<br>
</div>
<div>
Gerd
</div>
<div>
<br>
</div>
<div>
________________________________________
</div>
<div>
Von: mkgmap-dev <
<a href="mailto:mkgmap-dev-bounces@lists.mkgmap.org.uk">mkgmap-dev-bounces@lists.mkgmap.org.uk</a>> im Auftrag von Ticker Berkin <
<a href="mailto:rwb-mkgmap@jagit.co.uk">rwb-mkgmap@jagit.co.uk</a>>
</div>
<div>
Gesendet: Freitag, 10. Januar 2020 11:29
</div>
<div>
An: Development list for mkgmap
</div>
<div>
Betreff: Re: [mkgmap-dev] Branch is_in ready for a first test
</div>
<div>
<br>
</div>
<div>
Hi Gerd
</div>
<div>
<br>
</div>
<div>
Here is patch that sets isLineRule in the package on the augmentsWith
</div>
<div>
call.
</div>
<div>
<br>
</div>
<div>
I've also used default method for the augmentsWith... in Rule, Op,
</div>
<div>
OsmConverter and backed out the changes that have now become
</div>
<div>
unnecessary.
</div>
<div>
<br>
</div>
<div>
Ticker
</div>
<div>
<br>
</div>
<div>
On Fri, 2020-01-10 at 09:15 +0000, Gerd Petermann wrote:
</div>
<blockquote type="cite">
<div>
Hi Ticker,
</div>
</blockquote>
<blockquote type="cite">
<div>
yes, it would probably be better to know if the function is for a
</div>
<div>
polyline or polygon. A patch would be welcomed.
</div>
<div>
And yes, the expected result for the case you describe is not yet
</div>
<div>
clear. See b13 and b14 in my example file.
</div>
</blockquote>
<blockquote type="cite">
<div>
Gerd
</div>
</blockquote>
<blockquote type="cite">
<div>
________________________________________
</div>
<div>
Von: mkgmap-dev <
<a href="mailto:mkgmap-dev-bounces@lists.mkgmap.org.uk">mkgmap-dev-bounces@lists.mkgmap.org.uk</a>> im Auftrag
</div>
<div>
von Ticker Berkin <
<a href="mailto:rwb-mkgmap@jagit.co.uk">rwb-mkgmap@jagit.co.uk</a>>
</div>
<div>
Gesendet: Freitag, 10. Januar 2020 09:59
</div>
<div>
An: Development list for mkgmap
</div>
<div>
Betreff: Re: [mkgmap-dev] Branch is_in ready for a first test
</div>
</blockquote>
<blockquote type="cite">
<div>
Hi Gerd
</div>
</blockquote>
<blockquote type="cite">
<div>
I think the logic still needs to know if it is handling a closed way
</div>
<div>
as
</div>
<div>
a polygon rule or as a line rule.
</div>
</blockquote>
<blockquote type="cite">
<div>
Firstly to be able to correctly handle the case where the rule.way
</div>
<div>
runs
</div>
<div>
around a hole in the target.polygon - all of the rule.line is in the
</div>
<div>
target, but only part of the rule.polygon is in the target.
</div>
</blockquote>
<blockquote type="cite">
<div>
Also there might be different method keywords for the two. For
</div>
<div>
polygon
</div>
<div>
rules, "any" and "all" are adequate, but for line rules others might
</div>
<div>
be
</div>
<div>
required.
</div>
</blockquote>
<blockquote type="cite">
<div>
I've just svn updated the is_in branch. Is there still work to do on
</div>
<div>
non-closed ways?
</div>
</blockquote>
<blockquote type="cite">
<div>
Otherwise amazing.
</div>
</blockquote>
<blockquote type="cite">
<div>
Ticker
</div>
</blockquote>
<blockquote type="cite">
<div>
On Thu, 2020-01-09 at 11:43 +0000, Gerd Petermann wrote:
</div>
<blockquote type="cite">
<div>
Hi all,
</div>
</blockquote>
<blockquote type="cite">
<div>
the branch version r4408 implements the style function is_in with
</div>
<div>
three parameters tag-key,tag-value,method
</div>
<div>
- tag-key can be something like landuse or natural or amenity
</div>
<div>
- tag-value would be the expected value for that tag-key
</div>
<div>
- method has to be "any" or "all".
</div>
</blockquote>
<blockquote type="cite">
<div>
Example usage in lines:
</div>
<div>
# no cycling within a cemetery
</div>
<div>
highway=* & bicycle!=* & is_in(landuse,cemetery,all) {add
</div>
<div>
bicycle=dismount}
</div>
</blockquote>
<blockquote type="cite">
<div>
Before any style rule is evaluated the function evaluates the list
</div>
<div>
of
</div>
<div>
all ways found in the input file. When a way matches the given tag
</div>
<div>
(key+value) and is closed and complete the shape geometry is stored
</div>
<div>
in a spatial index.
</div>
<div>
With the current implementation this index is created for
</div>
<div>
appearance
</div>
<div>
of the is_in function in a style rule (subject to optimization)
</div>
</blockquote>
<blockquote type="cite">
<div>
When the style function is called it retrieves the stored shape(s)
</div>
<div>
which intersect the boundary of the element.
</div>
<div>
If none is found "false" is returned.
</div>
<div>
If there are multiple such shapes the are merged where possible, so
</div>
<div>
that overlapping or touching shapes are combined to a single shape
</div>
<div>
which may include holes.
</div>
<div>
The list of (outer) shapes is then tested one after the other until
</div>
<div>
one shape is found which either contains the element completely or
</div>
<div>
-
</div>
<div>
when "any" is used as method - partially. If none is found the
</div>
<div>
value
</div>
<div>
"false" is returned.
</div>
<div>
If a match is found and the combined shapes have holes, a final
</div>
<div>
test
</div>
<div>
is done to find out if the element is within the hole.
</div>
<div>
If method "any" is used and the shape is completey within one hole
</div>
<div>
"false" is returned.
</div>
<div>
If method "all" is used and the shape is partly within one hole
</div>
<div>
"false" is returned.
</div>
<div>
If we get here true is "returned"
</div>
</blockquote>
<blockquote type="cite">
<div>
I've also slightly changed the behaviour of the LocationHook and
</div>
<div>
the
</div>
<div>
ResidentialHook. The results should be a bit more predictable now
</div>
<div>
as
</div>
<div>
searches are done with higher precsion. Still, both try to find a
</div>
<div>
nearby boundary(shape) if none is found at the exact position.
</div>
<div>
The ResidentialHook is now automatically disabled when the style
</div>
<div>
doesn't use mkgmap:residential anywhere.
</div>
</blockquote>
<blockquote type="cite">
<div>
TODO:
</div>
<div>
- various possible special cases need more testing
</div>
<div>
- maybe add more methods for cases where parts of the tested
</div>
<div>
element
</div>
<div>
touch the boundary of the shape.
</div>
<div>
- tuning
</div>
<div>
- unit tests
</div>
</blockquote>
<blockquote type="cite">
<div>
As always with branch version the binary can be found at the bottom
</div>
<div>
of the download page.
</div>
<div>
<a href="http://www.mkgmap.org.uk/download/mkgmap.html" rel="noopener" target="_blank">http://www.mkgmap.org.uk/download/mkgmap.html</a>
</div>
</blockquote>
<blockquote type="cite">
<div>
I've tested this with the example file posted before, accept for
</div>
<div>
b18
</div>
<div>
all cases work as expected.
</div>
</blockquote>
<blockquote type="cite">
<div>
Gerd
</div>
<div>
_______________________________________________
</div>
<div>
mkgmap-dev mailing list
</div>
<div>
<a href="mailto:mkgmap-dev@lists.mkgmap.org.uk">mkgmap-dev@lists.mkgmap.org.uk</a>
</div>
<div>
<a href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" rel="noopener" target="_blank">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a>
</div>
</blockquote>
<div>
_______________________________________________
</div>
<div>
mkgmap-dev mailing list
</div>
<div>
<a href="mailto:mkgmap-dev@lists.mkgmap.org.uk">mkgmap-dev@lists.mkgmap.org.uk</a>
</div>
<div>
<a href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" rel="noopener" target="_blank">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a>
</div>
</blockquote>
<div>
_______________________________________________
</div>
<div>
mkgmap-dev mailing list
</div>
<div>
<a href="mailto:mkgmap-dev@lists.mkgmap.org.uk">mkgmap-dev@lists.mkgmap.org.uk</a>
</div>
<div>
<a href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" rel="noopener" target="_blank">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a>
</div>
</blockquote>
</body>
</html>