
First, let me introduce myself to the list. I'm new to geosystems, but learning quickly after I acquired a GPS receiver two weeks ago. I've written a makefile to turn SRTM elevation data into vector contour maps (I'll write it up on OpenStreetMap.org once I'm happy with it). One of the problems[1] I've had is that mkgmap exits with return code 0 always, even on failure. This means that the makefile blindly continues to make its dependents, with a missing or invalid .img file - or in the worst case, an old, out-of-date one. If you were to add System.exit(1) in appropriate places (probably just the exception handler in main()?) - I'd be really grateful, and so probably would others. [1] The biggest problem I had was with re-referencing the EGM96 data to OSGM02 - until I realised that the difference is well within the 1-metre precision of the source data, never mind its accuracy! BTW, does mkgmap dislike negative ID values when reading OSM files? gpsbabel writes these when writing, and I was wondering whether that's what was causing empty tiles in my first attempt.

Toby Speight schrieb:
I've written a makefile to turn SRTM elevation data into vector contour maps (I'll write it up on OpenStreetMap.org once I'm happy with it).
This sounds like SRTM2OSM.
BTW, does mkgmap dislike negative ID values when reading OSM files? gpsbabel writes these when writing, and I was wondering whether that's what was causing empty tiles in my first attempt.
I don't think so. I have an handbuild example osm-file for testingen my own map-symbols, and this uses purely negative ID values without any problems. Gruss Torsten

0> In article <4975F623.504@gmx.de>, 0> Torsten Leistikow <URL:mailto:de_muur@gmx.de> ("Torsten") wrote: Torsten> Toby Speight schrieb:
I've written a makefile to turn SRTM elevation data into vector contour maps (I'll write it up on OpenStreetMap.org once I'm happy with it).
Torsten> This sounds like SRTM2OSM. That's what I started with, but I wanted to use the void-filled data from CGIAR (the SRTM data are quite poor in Wester Ross). I know it's a non-free dataset, but the benefit is worth the sacrifice to principle! Rather than convert the geotiffs into srtm2osm's format, it seemed more sensible to just work with standard tools such as gdal_contour. The workflow is (zip) -> unzip -> (geotiff, 5°x5°) -> gdal_translate -> (geotiff, 1°x1°) -> gdal_contour -> (shape) -> gpsbabel -> perl -> gzip -> (compressed OSM) leaving me with the goods for mkgmap. Torsten> I have an handbuild example osm-file for testing my own Torsten> map-symbols, and this uses purely negative ID values without Torsten> any problems. Ah, good - I'll investigate further. Thanks for your help.

Hi Welcome to the list.
worst case, an old, out-of-date one. If you were to add System.exit(1) in appropriate places (probably just the exception handler in main()?) - I'd be really grateful, and so probably would others.
Yes that is a good idea, I have done this. If you find more places where the exit(1) should be added let me know.
BTW, does mkgmap dislike negative ID values when reading OSM files? gpsbabel writes these when writing, and I was wondering whether that's what was causing empty tiles in my first attempt.
Negative ID's are fine. Infact recently even arbitary string values are OK (although will slow things down if there are a lot of them). Regards, ..Steve

0> In article <20090120230606.GA3093@parabola.demon.co.uk>, 0> Steve Ratcliffe <URL:mailto:steve@parabola.demon.co.uk> ("Steve") wrote:
BTW, does mkgmap dislike negative ID values when reading OSM files? gpsbabel writes these when writing, and I was wondering whether that's what was causing empty tiles in my first attempt.
Steve> Negative ID's are fine. Infact recently even arbitary string Steve> values are OK (although will slow things down if there are a Steve> lot of them). I've undone the processing of these, and it all seems to work okay again. It was one avenue of thought until I realised that I had written "contour_ext"="minor" instead of "contour_ext"="elevation_minor" (etc.). Having fixed that, my pipeline generates nice contours. (Well, moderately nice - gdal_contour is still a fairly dumb bilinear-ish interpolator).
participants (3)
-
Steve Ratcliffe
-
Toby Speight
-
Torsten Leistikow