Commit: r2206: Detect and correct polygons direction change due to int precision in Java2DConverter

Version 2206 was commited by wanmil on 2012-02-12 20:39:12 +0000 (Sun, 12 Feb 2012) Detect and correct polygons direction change due to int precision in Java2DConverter Polygons are often converted to the java.awt.geom.Area class to cut them. This Area class uses float precision which must be converted back to Garmins int precision. Sometimes this causes a polygon to change its direction (cw <=> ccw). This is now avoided by reversing the polygon if the float precision polygon has a different direction than the int precision polygon. This fixes some problems with the precompiled boundary utils. --GerdP

On Sun, Feb 12, 2012 at 08:39:12PM +0000, svn commit wrote:
Version 2206 was commited by wanmil on 2012-02-12 20:39:12 +0000 (Sun, 12 Feb 2012)
Detect and correct polygons direction change due to int precision in Java2DConverter
WanMil, could something similar be done to suppress these bogus warnings for natural=sea micropolygons? 2012/02/15 11:08:37 WARNING (SeaGenerator): 63240001.osm.pbf: Converting anti-island starting at http://www.openstreetmap.org/?mlat=60.19667&mlon=22.13992&zoom=17 into an island as it is surrounded by water 2012/02/15 11:10:17 WARNING (SeaGenerator): 63240008.osm.pbf: Converting anti-island starting at http://www.openstreetmap.org/?mlat=63.14059&mlon=21.18190&zoom=17 into an island as it is surrounded by water The latter one is certainly bogus data (no such island in Bing imagery). The former should probably be tagged as a natural=rock node. But still, mkgmap should handle these better IMO. Marko

On Sun, Feb 12, 2012 at 08:39:12PM +0000, svn commit wrote:
Version 2206 was commited by wanmil on 2012-02-12 20:39:12 +0000 (Sun, 12 Feb 2012)
Detect and correct polygons direction change due to int precision in Java2DConverter
WanMil, could something similar be done to suppress these bogus warnings for natural=sea micropolygons?
2012/02/15 11:08:37 WARNING (SeaGenerator): 63240001.osm.pbf: Converting anti-island starting at http://www.openstreetmap.org/?mlat=60.19667&mlon=22.13992&zoom=17 into an island as it is surrounded by water 2012/02/15 11:10:17 WARNING (SeaGenerator): 63240008.osm.pbf: Converting anti-island starting at http://www.openstreetmap.org/?mlat=63.14059&mlon=21.18190&zoom=17 into an island as it is surrounded by water
The latter one is certainly bogus data (no such island in Bing imagery). The former should probably be tagged as a natural=rock node. But still, mkgmap should handle these better IMO.
Marko
Marko, I don't see a chance how to fix these warnings. The only way is to work with double coordinates instead of garmin int coordinates. It think that would require much more memory. WanMil
participants (3)
-
Marko Mäkelä
-
svn commit
-
WanMil