[mkgmap-dev] Splitter details question
From WanMil wmgcnfg at web.de on Wed Jan 13 22:50:26 GMT 2010
> >> 2nd: Ways should be included if they intersect the bounding box. >> For me it would be perfect if ways are included with all nodes. But it >> is also ok if all inner nodes and for all parts of the way the first >> node out of the bounding box is included. This enables me (and others) >> to calculate the intersection point with the bounding box. >> >> > You don't have to reinvent the wheel. I don't want to! > This code is already in the > LineClipper and AreaClipper/PolygonClipper classes. As far as I know, it > is called at import of osm files. Good, I didn't know the AreaClipper and PolygonClipper classes. Lot's of my questions are caused by my little knowledge of the mkgmap classes and their interaction. What do you mean with "at import of osm files"? The Osm5XmlHandler does not clip things, does it? > > Looking at it, I wonder why there are problems. The poylgonClipper does > an java.awt.geom.Area.intersect(bounding box). I would expect it to > return an closed polygon. So why are there incoomplete polygons?? The incomplete polygons are in the raw tile file. This data is parsed by the Osm5XmlHandler and afterwards processed by the MultipolygonRelation code. At this unclipped stage there are incomplete polygons. After a short review of the PolygonClipper code I think it has the same problem like the PolygonSplitter code. In case a polygon has an inner hole which is constructed with two overlapping lines connecting the outer polygon with the inner hole then the overlapping lines are removed and the inner hole is handled as independent polygon. I don't know if that's a problem. WanMil
- Previous message: [mkgmap-dev] Splitter details question
- Next message: [mkgmap-dev] Splitter details question
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list