logo separator

[mkgmap-dev] Re : --generate-sea for Australia?

From Apollinaris Schoell aschoell at gmail.com on Sun Feb 7 00:22:58 GMT 2010

> There are two problems:
> 1st: osmosis does not provide the boundary shape used to split the dump
> file. So mkgmap cannot differ if there is no data at a point because the
> point is outside the boundary shape of the dump or if there is no data
> because no OSM data exist there.
>

1) you can download the boundary shapes from geofabrik. sure it could be a
nice feature in osmosis but very unlikely this will happen. osmosis works on
streams and as soon as multiple polygons are used in piped streams this will
create wrong polygons.

But the real problem is that none of the tools in the whole process support
polygon extracts in a way that is predictable and produces complete polygon
shaped areas. by complete I mean that each way has to be clipped exactly at
the polygon and then a node must be inserted at the polygon boundary. The
polygon must be included too. If a way is a polygon or part of a polygon
relation it has to be closed along the polygon boundary.
1) osmosis:  does support cutting polygons but it has no detail knowledge
about osm semantic and can never achieve this. the only option osmosis
supports is to clip a way or to keep the whole way intact.
inserting a way at the boundary requires to calculate the intersection of 2
ways in the projection of osm data.
2) splitter doesn't support polygon shaped extracts.
3) mkgmap has some kind of support. Mark has implemented it long time ago
but i doupt anyone is really using it because it requires these boundary
nodes in the osm file.

now the big challenge is to close polygons. Didn't do much testing lately
but just from following the thread it seems you have made lot of progress.
But mkgmap is to late in the chain to really solve it without a lot of
guessing and failing many times.
as long as tiles are rectangles you may have gaps of any size from the
boundary polygon to the tile boundary. closing them to the tile boundary
isn't really a good idea.

As long as the whole chain doesn't exist a nearly working solution is
- extract only  rectangles in osmsis with option  completeWays and
completeRelations
- run splitter, but the input doesn't contain a bbx so it's required to
insert the bbx in the osm file. haven't tried this part and don't know if
splitter uses bbx in the incoming  osm file. as alternative adjust the
areas.list for splitter to the bbx used in osmosis. otherwise some tiles
will have nearly empty areas caused by long ways extending the osmosis
boundary. currently splitter doesn't include complete relations maybe mkmap
can close polygons correct but I doubt it. in general a polygon can be
closed. left or right along the tile boundary. only for coastline this can
be solved by analyzing the direction of ways. for a relation based polygon
there is a 50% chance.to get it correct.

I have written a osmosis based splitter script once but lost it. splitter
was improved so much that I didn't need it anymore.  and performance was so
bad compared to splitter. maybe I will try that again on a small testcase
and use completeWays completeRelations and test the actual mkgmap
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20100206/789a594c/attachment.html 


More information about the mkgmap-dev mailing list