logo separator

[mkgmap-dev] New clip box functionality for splitter

From Geoff Sherlock geoffrey_sherlock at btinternet.com on Sun Sep 16 12:13:29 BST 2012

I must admit to not using osmosis or osmconvert before. The latter seems 
ideal for the clipping a pbf file (I feel foolish to have not asked 
earlier).

I would still like to add this functionality as part of the splitter as it 
would make the whole process much faster (and give me a start in the 
development process). But I agree it will not be as simple as it sounds. 
Especially for complex polygons which may need to be clipped in a number of 
places if they repeatedly cross the clip boundary.

Regards, Geoff.

On September 16, 2012 11:17 AM, WanMil wrote:

-----Original Message----- 
From: WanMil
Sent: Sunday, September 16, 2012 11:17 AM
To: Development list for mkgmap
Subject: Re: [mkgmap-dev] New clip box functionality for splitter

Hi Geoff,

clipping is already implemented by osmosis or osmconvert. But this
requires another step to generate the map. So I think it is a good idea
to add this option to splitter.

I expect that clipping will not be as easy as it sounds like. If you
have a way that intersects the clipping area you need the points inside
the clipping area (easy) but also the first point outside the clippling
area (not so easy). If you want to be correct you have to read and store
all nodes because you cannot be sure that a node outside the clipping is
not the first "outer" node of a way.

Regarding the dev tools: there is no specific tool required. I use
Eclipse but you are free to choose.

WanMil

> I am interested in contributing to the development effort of mkgmap and
> have come up with what should be a simple project to begin with. I am
> thinking of adding a clip box to the splitter so that any nodes outside
> the box will be ignored, and any lines, polygons will be clipped to the
> clip box (I have chosen clip so as not to confuse it with the bounds
> option).
> This has come about as I have been generating a map for Sri Lanka as I
> am going on holiday there in October. Cloudmade has a separate extract
> for Sri Lanka, but is very out of date. To get up-to-date data I have to
> download all of Asia from Geofabrik and process the whole lot, loading
> into Mapsource, then selecting the few tiles that cover Sri Lanka and
> transferring them to device.
> By supplying a clip box I could give a lat,long combination for the
> bottom left and top right corner; and clip to that – in the case of Sri
> Lanka the splitter would probably give me a single tile to process
> through mkgmap. It would also mean I do not need Mapsource to produce a
> gmapsupp.img file at all.
> If anyone knows why I should not try this project please let me know.
> A question: Is there a preferred development environment system for
> mkgmap or splitter on Windows, such a Eclipse or NetBeans???
> Regards, Geoff.
>

_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev 




More information about the mkgmap-dev mailing list