
Hi Gerd I don't think the test data 'expected' values are wrong, it is just that they are more specific than the 'method' mechanism allows to be differentiated; eg a polygon can only be tested for ALL in or ANY in. At the moment I feel you have a reluctance about the whole concept of the methods. Once the principle is accepted, I'll go through the test data and add, as another tag, the list of methods that should match the element, then change the test driver to check that these match and the other applicable methods don't. Reg. b14: It isn't the stop-early code that causes the problems, isLineInShape is not giving the correct answer for a simple polygon produced by the MP cutter. It would be quite easy to introduce some POLYGON 'on' methods, that match the outer, inner or either edge of a polygon, but maybe this could wait until there is a call for it. Next mail: I'll change the sentence as you suggest. Please can you commit the patch as it stands; it has a lot of good stuff in it. Then I can do the IsInUtilTest and test data changes as the next stage. It's also handy to see how the Style Manual looks after each build into the download area, because I don't know how to generate it and am just guessing at the formatting. Thank you Ticker On Thu, 2020-02-20 at 15:41 +0000, Gerd Petermann wrote:
Hi Ticker,
I see that you overwrite the expected value stored in the test data in the unit test. Please don't do this. If you think that the expected value in is-in-samples.osm is wrong we should discuss the test data. In my eyes b14 clearly has points on the edge (as it is part of the edge) and is out.
If you think the expected results are correct but your new code doesn't allow to test them because of the early stop code please add a new tag to each object or maybe create a new file. The unit test file is meant to document what the code does.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap@jagit.co.uk> Gesendet: Donnerstag, 20. Februar 2020 14:11 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] Work on is_in branch
Hi Gerd
Here is a replacement for is_in-function_v10.patch with the additions:
- method ..,none)=true to replace ..,any_in_or_on)=false.
- revised documentation.
- detection of holes within the rule.polygon. Will set OUT, ie stop 'all' being true, and, if exactly ON, not set IN, ie stop 'any' being true.
- removal the kind parameters and related logic from IsInUtil; the IsInFunction driver has better understanding of how POLYGON processing should differ from POLYLINE.
- restructure the MethodArg enum to include all the method dependent logic.
Test case b14 (rule.polygon being the hole in the multiPolygon) should be OUT, or maybe OUT|ON but the test driver only understands ALL or ANY for polygons. It still fails because isLineInShape returns IN|ON|OUT for the rule.polygon against one of the cut simple polygons, where it should be ON|OUT
Ticker
On Tue, 2020-02-18 at 00:23 -0700, Gerd Petermann wrote:
Ticker Berkin wrote
I suggest replacing ANY_IN_OR_ON with SOME_OUT_NONE_IN, giving it the method string "none", like SOME_IN_NONE_OUT is referenced as "all".
Yes, much better.
Gerd
-- Sent from: http://gis.19327.n8.nabble.com/Mkgmap-Development-f5324443.html _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev