Re: [mkgmap-dev] Really Serious bug when not using --route

2010-05-24 Thread Christian Gawron
Maybe it's this bit in the TDB-Header (HeaderBlock.java): os.write(1);// map is routable At least it looks strange that this bit is set regardless of the --route option, and there are similar flags related to DEM info in this block as well ... Best wishes Christian Felix

Re: [mkgmap-dev] New mkgmap styles

2010-05-08 Thread Christian Gawron
Hi all, mkgmap already contains a class uk.me.parabola.imgfmt.app.typ.TYPFile (written by Thomas Lußnig) which has a method setFamilyId(). I have not tested it yet, but I suppose this method just changes the family id of the TYP file. Is there any reason why mkgmap should not use this method

Re: [mkgmap-dev] DEM subfile

2010-02-24 Thread Christian Gawron
Ronny Klier schrieb: A friend and I spend some time on research the DEM subfile too. While still not knowing the real data encoding, I think we found some additional information about the structure. thank you very much for sharing your results! In general a DEM subfile consists of a

Re: [mkgmap-dev] Process for Creating Contour Maps?

2010-02-22 Thread Christian Gawron
Dave F. schrieb: Hi Christain Could you expand on what this means please: ~ '\d*[02468]00' ~ '\d+[05]0' The first line matches multiples of 200m, the second one multiples of 50m. Best wishes Christian ___ mkgmap-dev mailing list

[mkgmap-dev] DEM subfile

2010-02-21 Thread Christian Gawron
Hi, based on some freely(?) available maps with DEM data and on empty DEM files created by GMapTool I started to analyze the DEM subfile format. With the little information I got so far (see http://wiki.openstreetmap.org/wiki/OSM_Map_On_Garmin/DEM_Subfile_Format) I managed to write some

Re: [mkgmap-dev] Process for Creating Contour Maps?

2010-02-21 Thread Christian Gawron
Jeffrey Ollie schrieb: Does someone have wiki pages describing the best procedure to create contour maps for Garmins? It seems like a number of people are having some success but it doesn't seem to be very well documented. I'm working though trying to get groundtruth to generate .osm files

Re: [mkgmap-dev] Baltic map installer test

2010-01-03 Thread Christian Gawron
Am 03.01.2010 11:05, schrieb Mark Burton: Hi, If anyone cares to test the installer for the demo Baltic map, I have uploaded it to a temporary location: http://www.smartavionics.com/download/OSM-Baltic.exe It's not huge, about 30MB. The family ID is 909. I haven't made any attempt to

[mkgmap-dev] patch v1: Multipolygons: Polygon decomposition

2010-01-02 Thread Christian Gawron
; + } + /** * A simple representation of this way. * @return A string with the name and start point /* * Copyright (C) 2010 Christian Gawron * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2

Re: [mkgmap-dev] Multipolygons and basic question on polygons with holes

2010-01-02 Thread Christian Gawron
Am 02.01.2010 22:32, schrieb Johann Gail: Point 3 is illustrated by the second diagram, where a sea polygon is split into X and Y and avoids the need for a DABC cut as in the first. It may not be easy to take advantage of this with an algorithm, but I'd probably make use of that a lot if doing

Re: [mkgmap-dev] Sea tiles problem

2009-10-26 Thread Christian Gawron
Toby Speight schrieb: I've just started using the --generate-sea option, and it almost works. The problem is that of the UK, the whole of northern Scotland (north of a line through Stirling) is inverted - i.e. the land is blue and the sea is light yellow (black at night). This is

Re: [mkgmap-dev] [PATCH v5] sea polygons

2009-08-26 Thread Christian Gawron
Dear Robert, thank you for the feedback! Can you send me one of the input tiles (or a download link) where sea and land are flipped? Best wishes Christian Robert Joop schrieb: christian, thank you very much for working on this! here are some current observations with my big bbox cut from

Re: [mkgmap-dev] [PATCH v5] sea polygons

2009-08-26 Thread Christian Gawron
Dear Chris, I also get similar problems for some tiles (the result may depend on the splitter parameters). The problem is that there are several shoreline segments that do not end at the map boundary. Two examples are: - Rügen: The shoreline ends at the border to Poland. The current patch

Re: [mkgmap-dev] Algorithm for rendering sea

2009-08-26 Thread Christian Gawron
Dear Clifford, in the standard case, the algorithm does the following: - Generate a background sea rectangle which covers the bounding box of the map - Connect the coastline segments wherever possible. The resulting segments should be either closed (= islands) or hit the boundary. - Build a

[mkgmap-dev] [PATCH v5] sea polygons

2009-08-25 Thread Christian Gawron
This version of the patch fixes a bug in the previous version which caused tiles with no shoreline to be flooded. Other improvements are - Shorelines are clipped at the boundary prior to the processing (may fix some problems related to input data) - Somewhat improved handling of non-closed

Re: [mkgmap-dev] [PATCH v4] sea polygons

2009-08-20 Thread Christian Gawron
Thanks for the feedback! One trivial bug in the patch was that a tile with no shoreline at all got a sea polygon as background. This can be fixed by adding // don't do anything if there is no shoreline if (shoreline.size() == 0) return; at the begin of

[mkgmap-dev] [PATCH v4] sea polygons

2009-08-15 Thread Christian Gawron
With this version of the patch, the intersection of the bounding box and the landmass does not have to be simply connected as in version 3 of the patch. There are still some flooded island in ireland, but I'm pretty sure this is a problem in the multipolygon code this patch relies on (it just

Re: [mkgmap-dev] Multipolygons

2009-08-13 Thread Christian Gawron
Dear Steve, I just tried the patch. Apart from test 3 not working, the modified PolygonSplitterBase seems not to improve the flooded island problem. Best wishes Christian Steve Ratcliffe schrieb: Hi So test 3 still fails, even after applying the patch, or did I do something wrong

Re: [mkgmap-dev] Commit: r1125: Ant task for mkgmap

2009-08-09 Thread Christian Gawron
svn commit schrieb: Version 1125 was commited by steve on 2009-08-09 13:10:22 +0100 (Sun, 09 Aug 2009) Ant task for mkgmap. As submitted by Christian Gawron. ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk

Re: [mkgmap-dev] [PATCH v3] sea polygons

2009-08-09 Thread Christian Gawron
Dear Maning, the problem is most probably that I assumed that the intersection between the land mass and the bounding box is simply connected. I won't be able to fix this today, but you could add if (!it1.hasNext()) break; before the offending line 860 EdgeHit h1 =

Re: [mkgmap-dev] [PATCH v3] sea polygons

2009-08-09 Thread Christian Gawron
Dear Dermot, the triangle artifacts have to do with the multipolygon code. There is a comment by someone saying //with this line commented we get triangles, when uncommented some areas disappear // at least in mapsource, on device itself looks OK. The multiploygon code connects

[mkgmap-dev] [PATCH v3] sea polygons

2009-08-08 Thread Christian Gawron
Here is an improved version of the sea polygon patch which also handles shorelines intersecting the boundary of the map (set by the bounds element). I have tested it with Ireland - there are still some islands which are flooded, so the patch should not be considered final. Best wishes

Re: [mkgmap-dev] Styling for the power user: filtering contour lines

2009-08-07 Thread Christian Gawron
Hi Daniel, you can use regular expressions to filter contour lines by elevation - here is what I do in my style file: # Contours take their name from the elevation setting. # multiples of 200m contour=elevation ele ~ '\d*[02468]00' { name '${ele|conv:m=ft}'; } [0x22 resolution 18] #

Re: [mkgmap-dev] complete list of all mkgmap options

2009-08-04 Thread Christian Gawron
Sounds good to me! Maybe there is an open source framework we could use: http://www.cyclopsgroup.org/projects/jcli/ Best wishes Christian Chris Miller schrieb: Something we've done at my current job is to write a CLI framework that makes managing command line params very very easy. I think

Re: [mkgmap-dev] [PATCH v1] sea polygons

2009-08-02 Thread Christian Gawron
Dermot McNally schrieb: This exhausted the 2G of heap space I had allocated when I tried it on a map of Ireland. Are there known practical limits I should try to stay within? Dermot I'm afraid the reason is the code which joins the shoreline segments. The code constructs a new way when

Re: [mkgmap-dev] [PATCH v1] sea polygons

2009-08-02 Thread Christian Gawron
of heap space I had allocated when I tried it on a map of Ireland. Are there known practical limits I should try to stay within? Dermot 2009/8/1 Christian Gawron christian.gaw...@gmx.de: Hi, the attached patch adds a sea polygon (based on the bounding box of the map

[mkgmap-dev] [PATCH v2] sea polygons

2009-08-02 Thread Christian Gawron
This improved version should fix an OutOfMemoryError reported by maning sambale and Dermot McNally. It also contains an update of the multipolygon patch by Rudi (which seems to produce better results fo Corsica). Best wishes Christian Index:

Re: [mkgmap-dev] [PATCH v2] sea polygons

2009-08-02 Thread Christian Gawron
Dermot McNally schrieb: 2009/8/2 Christian Gawron christian.gaw...@gmx.de: This improved version should fix an OutOfMemoryError reported by maning sambale and Dermot McNally. It also contains an update of the multipolygon patch by Rudi (which seems to produce better results fo Corsica

Re: [mkgmap-dev] [PATCH v2] sea polygons

2009-08-02 Thread Christian Gawron
Dear Apollinaris, this is a misunderstanding. I use the relation internally: The code right now creates a relation with the sea as outer and the (closed) coastline segments as inner members. This way I don't have to think about how to punch the holes into the sea. What is still missing is the

[mkgmap-dev] [PATCH v1] sea polygons

2009-08-01 Thread Christian Gawron
Hi, the attached patch adds a sea polygon (based on the bounding box of the map) and a multipolygon relation with all lines tagged as natural=coastline as inner elements. The code merges coastline components as far as possible. The patch also contains the multipolygon patch by Rudi which

Re: [mkgmap-dev] [PATCH v1] sea polygons

2009-08-01 Thread Christian Gawron
I forgot to mention that you have to add --generate-sea if you want to have the sea polygon added. Best wishes Christian ___ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

[mkgmap-dev] [PATCH] multipolygons not showing

2009-07-31 Thread Christian Gawron
The attached patch (which changes just one line) fixes a problem with multipolygons sometimes not showing. Best wishes Christian Index: src/uk/me/parabola/mkgmap/reader/osm/MultiPolygonRelation.java === ---

[mkgmap-dev] Large multipolygons not working?

2009-07-29 Thread Christian Gawron
Attached are two very simple osm files which show an island in a water polygon added by hand. Both are connected with a multipolygon relation. The difference between the to files is just the size of the island. The multipolygon is rendered correctly in the map resulting from test1.osm but not

Re: [mkgmap-dev] [PATCH v4] contours

2009-07-10 Thread Christian Gawron
Dear Clinton, Clinton Gladstone schrieb: I was able to successfully compile a small area using ASTER tiles. The resulting map looked correct. However, I was not able to compile a larger area. I tried Rheinland-Pfalz as downloaded from Geofabrik. If I understood the error message and the coding

Re: [mkgmap-dev] [PATCH v4] contours

2009-07-09 Thread Christian Gawron
Nop schrieb: But now the real problem starts: How do I use the contour functions? You say: - Now the OSM styling engine is used to set labels, types resolution of the contour lines. How does this work? What rules are required? How can I distinguish between minor and major lines, I did

Re: [mkgmap-dev] [PATCH v4] contours

2009-07-07 Thread Christian Gawron
Nop schrieb: Hi! Christian Gawron schrieb: This version of the patch (to be applied against rev. 1080) has a HGTDEM which reads SRTM .hgt files and an optional GeoTiffDEM which contains inner classes to read CGIAR and ASTER. I would like to try out this patch, but first I have to ask

[mkgmap-dev] [PATCH v4] contours

2009-07-06 Thread Christian Gawron
=**/reader/dem/optional/*.java/ /javac /target /* * Copyright (C) 2009 Christian Gawron * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation

[mkgmap-dev] [PATCH] Creating contour lines from DEM data

2009-07-03 Thread Christian Gawron
. mapper.addShape(background); } + if (getConfig().getProperty(contours, false)) { + DEM.createContours(mapper, getConfig()); + } } } /* * Copyright (C) 2009 Christian Gawron * * This program

Re: [mkgmap-dev] ASTER elevation data

2009-06-30 Thread Christian Gawron
Dear Marko, I already wrote a class to read SRTM data directly with mkgmap, i.e. without having to create the contours as separate (huge) files. Since I'm still testing it and I have to add some configuration stuff (path of directory containing data, distance between contour lines etc.), I