[mkgmap-dev] New clip box functionality for splitter
From Geoff Sherlock geoffrey_sherlock at btinternet.com on Sun Sep 16 17:08:58 BST 2012
More thoughts to greatly simplify the clipping: As WanMil suggested all nodes would have to be stored along with a flag to show if it initially resides inside or outside the clip box. Each way will then be tested in turn against the min longitude, max longitude, min latitude, max latitude. Taking the min longitude test as an example: If a way goes from inside the clip box (>= min longitude) then goes outside and remains outside, the way will be clipped to min longitude. When it goes inside to outside and returns inside (>= min longitude) no clip occurs, and nodes between are flagged to reside inside the clip box. If a way goes from outside clip box then goes inside and remains inside, the way will be clipped to min longitude. When it goes from outside to inside and returns outside it will need to be determined if the way describes a line or a polygon: if a line it is clipped, if a polygon nodes in the way outside will be flagged to reside inside the clip box Then similar is done for the other clip lines. This would allow breathing of the clip box to to take into account highways, rivers etc, which go outside and return into the clip box. And get rid of complex polygon clipping entirely. Any thoughts? WanMil, I will look at the bounds utility you mentioned. Regards, Geoff. -----Original Message----- From: Geoff Sherlock Sent: Sunday, September 16, 2012 2:42 PM To: Development list for mkgmap Subject: Re: [mkgmap-dev] New clip box functionality for splitter The more I consider this the more complicated it gets. If you take the polygon for a wood selected in JOSM and highlighted in red in the JPG attached. Discarding everything to the left of the light blue line would leave three closed polygons for the wood. Highways are also another worry. If a highway goes outside the clipping area and returns into the clipping area, should the clip bounds be auto-adjusted to allow the whole highway to be included??? How many times should a clip bound be extended before enough is thought to be enough??? Or should the cut be brutal, along the lines the user entered? Now I have used osmconvert I doubt I could write anything that would work faster within the splitter. So I guess I will have to think of a something else as my first project. Regards, Geoff. On September 16, 2012 12:19 PM, Henning wrote: -----Original Message----- From: aighes Sent: Sunday, September 16, 2012 12:19 PM To: Development list for mkgmap Subject: Re: [mkgmap-dev] New clip box functionality for splitter I think using osmconvert/osmosis is the usual way and I have no problems with it. To improve speed, you can cut a rectangular once out of a larger extract, split it and create an areas.list-file. For secend time (and each time after this) you use the larger extract and let splitter cut all tiles via your created areas.list-file. Henning _______________________________________________ mkgmap-dev mailing list mkgmap-dev at lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev at lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
- Previous message: [mkgmap-dev] New clip box functionality for splitter
- Next message: [mkgmap-dev] ODbL precompiled bounds and sea
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list