mibe / Srtm2Osm

Srtm2Osm tool uses Shuttle Radar Topography Mission (SRTM) digital elevation model (DEM) to generate elevation contours (isohypses) of a selected terrain. The tool writes contours as OSM ways into an OSM file. This then enables rendering of the terrain using Osmarender XSLT transformations or other OSM renderers.

Home Page:https://wiki.openstreetmap.org/wiki/Srtm2Osm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERROR: The requested feature is not implemented.

mibe opened this issue · comments

See this issue on the OSM-Wiki talk page. It looks like the algorithm cannot find the correct IsohypseMovement value.

commented

This issue is still present in version v1.16.5.0

Further analysis resulted in a very small boundary and with elevation step 10 (instead of 5)

The error still occurs when calling:

Srtm2Osm -large -step 10 -cat 50 25 -o 2340bad.srtm.osm -bounds1 49.6 12.1295832 49.6145 12.15

But the following call is successful:

Srtm2Osm -large -step 10 -cat 50 25 -o 2340good.srtm.osm -bounds1 49.6 12.1295835 49.6145 12.15

The failing contour line is at level 410 (m)
It does not depend on other contour lines and uses only one DEM cell.

When I patch the source code (method Igor4IsopletingAlgorithm.ExtractIsohypseMovements) to avoid the exception and set movementFound = true; instead, I get an osm file with one contour line with 4 points and a single contour line node.

looks like this

      if (movementFound == false)
      {
         //throw new NotImplementedException();
         movementFound = true;
         activityLogger.Log(ActivityLogLevel.Verbose, string.Format(System.Globalization.CultureInfo.InvariantCulture,
               "Ignore Exception and pretend movement found: Elevation={0}, x={1}, y={2}", isohypseElevation, x, y));
      break;
   }