[mkgmap-dev] Splitter only writes points, not ways on huge file?

2021-05-27 Thread Felix Hartmann
I used phyghtmap to create a huge file (60GB) of 10m equidistance osm.pbf contourlines data. phyghtmap --jobs=2 --polygon=/home/contourlines/bounds/asia.poly --step=10 --no-zero-contour --void-range-max=-420 --output-prefix="Asia10m" --line-cat=500,100--start-node-id=1000

Re: [mkgmap-dev] special case where splitting fails without a log message

2021-05-27 Thread Ticker Berkin
Hi Gerd There is something about "water.osm" that is breaking the original logic of ShapeSplitter in a way I'm having trouble understanding. A whole lot of points get assigned to 2 loops. It doesn't seem to be related to multiple identical paths around the cut-line, which should now work

Re: [mkgmap-dev] special case where splitting fails without a log message

2021-05-27 Thread Gerd Petermann
Hi Ticker, I've probably not understood the problem before. I've added test code to find situations where the ShapeSplitter complains and I found a rather simple case where the ShapeMerger produces a self-crossing shape (see attached gpx). Now I have an idea what to look for. Gerd

Re: [mkgmap-dev] special case where splitting fails without a log message

2021-05-27 Thread Gerd Petermann
Hi Ticker, I've attached my current state of work as patch for the branch. It fixes some bugs and merges shapes in a way that is less likely to produce long connections to islands. I think the main problem for shape splitter is when such a connection has a U-shape and the cut goes through it

Re: [mkgmap-dev] special case where splitting fails without a log message

2021-05-27 Thread Gerd Petermann
Hi Ticker, JOSM shows the islands properly when you zoom in. And yes, it shows water on both sides of the connecting lines. Very simiar to the Garmin renderer. Does that help? Gerd Von: mkgmap-dev im Auftrag von Ticker Berkin Gesendet: Donnerstag,

Re: [mkgmap-dev] special case where splitting fails without a log message

2021-05-27 Thread Ticker Berkin
Hi Gerd I'm confused. After mp hole cutting and shape merging, I expect a single closed way that will have in/out lines, probably on top of each other, to connect each area that was a hole, eventually, to a point on the outside of the shape. However, JOSM does show the water band on the outside

Re: [mkgmap-dev] special case where splitting fails without a log message

2021-05-27 Thread Gerd Petermann
Hi Ticker, yes, sure. I've converted a gpx output to OSM. All polygons with holes are not valid OSM ways, but they are very normal as MapShape. Validator doesn't help much with these polygons. Gerd Von: mkgmap-dev im Auftrag von Ticker Berkin

Re: [mkgmap-dev] special case where splitting fails without a log message

2021-05-27 Thread Ticker Berkin
Hi Gerd JOSM gives a self-crossing way validation error on this. Ticker On Thu, 2021-05-27 at 14:53 +, Gerd Petermann wrote: > Hi Ticker, > > no need to hurry ;) > Here is one: > https://files.mkgmap.org.uk/download/508/water.osm > > Gerd > > >

Re: [mkgmap-dev] special case where splitting fails without a log message

2021-05-27 Thread Ticker Berkin
Hi Gerd JOSM gives a self-crossing way validation error on this. Ticker On Thu, 2021-05-27 at 14:53 +, Gerd Petermann wrote: > Hi Ticker, > > no need to hurry ;) > Here is one: > https://files.mkgmap.org.uk/download/508/water.osm > > Gerd > > >

Re: [mkgmap-dev] special case where splitting fails without a log message

2021-05-27 Thread Gerd Petermann
Hi Ticker, no need to hurry ;) Here is one: https://files.mkgmap.org.uk/download/508/water.osm Gerd Von: mkgmap-dev im Auftrag von Ticker Berkin Gesendet: Donnerstag, 27. Mai 2021 16:47 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] special

Re: [mkgmap-dev] special case where splitting fails without a log message

2021-05-27 Thread Ticker Berkin
Hi Gerd next patch also has a problem - sorry to waste your time. Can I have your test data. Ticker On Thu, 2021-05-27 at 14:33 +, Gerd Petermann wrote: > Hi Ticker, > > with my current test environment the patch doesn't improve the > result. > It reports some errors (the old code didn't

Re: [mkgmap-dev] special case where splitting fails without a log message

2021-05-27 Thread Ticker Berkin
Hi Gerd Found stupid mistake, updated patch attached. Also, if debug enabled, always splits both sides of the line, and, if both sides are collected to the same list, just gives 1 gpx trace for it. Ticker On Thu, 2021-05-27 at 10:54 +, Gerd Petermann wrote: > Hi Ticker, > > sounds good.

Re: [mkgmap-dev] special case where splitting fails without a log message

2021-05-27 Thread Gerd Petermann
Hi Ticker, with my current test environment the patch doesn't improve the result. It reports some errors (the old code didn't always detect them) and eithers add or removes parts of the heavily merged shapes. I've inspected one shape and found no obvious problem. No point is visited more then

Re: [mkgmap-dev] special case where splitting fails without a log message

2021-05-27 Thread Ticker Berkin
Thanks Gerd, that works for me Ticker On Thu, 2021-05-27 at 12:54 +, Gerd Petermann wrote: > Hi Ticker, > > I first convert the gpx layer to a data layer, then add the tag > natural=water > Next execute validator which will complain that the way is not > closed. > Right click on that

Re: [mkgmap-dev] special case where splitting fails without a log message

2021-05-27 Thread Gerd Petermann
Hi Ticker, I first convert the gpx layer to a data layer, then add the tag natural=water Next execute validator which will complain that the way is not closed. Right click on that warning allows to "zoom to problem" . This tells you where the first point is. In the "OSM data" preferences I've

Re: [mkgmap-dev] special case where splitting fails without a log message

2021-05-27 Thread Ticker Berkin
Hi Gerd Trying to use JOSM to decide if a gpx trace represents a self -intersecting polygon is difficult. Is there a way of forcing it to consider it closed and then check itself? Failing that, number the points or segments somehow. Ticker ___

Re: [mkgmap-dev] special case where splitting fails without a log message

2021-05-27 Thread Gerd Petermann
Hi Ticker, sounds good. I'm making progress with a better ShapeMerger that produces less jitter, but so far it still produces some. Will try it later.. Gerd Von: mkgmap-dev im Auftrag von Ticker Berkin Gesendet: Donnerstag, 27. Mai 2021 12:49 An:

Re: [mkgmap-dev] special case where splitting fails without a log message

2021-05-27 Thread Ticker Berkin
Hi Gerd I think this can cope with any number of lines, in either/both directions, following the same path. Also it should give better output if same number of lines in both directions. With debug, if it notices a problem, it generates a GPX trace of the original and traces of all the resultant