Skip to content

Commit

Permalink
Merge pull request #12 from thyrfa/master
Browse files Browse the repository at this point in the history
Updated README.md to reflect current state of the plugin & stopped silent failure.
  • Loading branch information
locked-fg authored Nov 14, 2017
2 parents fe58ab4 + 1cdeee6 commit ea96d0c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ order to add a height tag to each node.

The plugin works out-of-the-box but provides configurable settings to satisfy hopefully all requirements

## Known Issues:
* Running the plugin in Osmosis 0.46 will throw error messages, but still provide the correct output.
* Files must be downloaded manually from the USGS website.

## History
- v1.1.1: moved into suitable package hierarchy
- v1.1.0: added possibility to define the tag name (Issue 3)
Expand All @@ -30,11 +34,15 @@ The plugin works out-of-the-box but provides configurable settings to satisfy ho
- Clone and build the repo or [download the binary from Bintray](https://dl.bintray.com/locked-fg/Osmosis-Srtm-Plugin/).
- Create `bin\plugins` and put the build/downloaded jar there (if this doesn't work, try `lib\default`)
- create a `osmosis-plugins.conf` in the config-folder containing the following line `de.locked.osmosis.srtmplugin.SrtmPlugin_loader`
- Download your desired SRTM files from [the USGS website](https://dds.cr.usgs.gov/srtm/version2_1/SRTM3/).
- Place those files in a folder, making sure each remains as .hgt.zip files.

Get an OSM file (for example via export from OpenStreetmap.org) and try it:
`osmosis.bat --read-xml ... --write-srtm <your args> --write-xml ...`
Afterwards enjoy your osm file with added srtm height tags.

**Make sure you set the locDir param to the location of your SRTM files**

## Restrictions / SRTM Formats
The plugin currently supports only SRTM3 files created by the NGA and reprocessed to Version 2.1
(http://dds.cr.usgs.gov/srtm/What_are_these.pdf), but any other SRTM files with the same binary format should
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ private double getValues(File file, int rowmin, int colmin) throws MalformedURLE
//if zipped srtm file cannot be found at any subdirectory
//return height Double.NaN
if (!ex1) {
log.log(Level.FINE, "Remote zipped SRTM file ''{0}.zip'' not found. Returning no height", file.getName());
log.log(Level.SEVERE, "Remote zipped SRTM file ''{0}.zip'' not found. Returning no height", file.getName());
map_failed_srtm.put(file.getName(), 1);
return Double.NaN;
}
Expand Down

0 comments on commit ea96d0c

Please sign in to comment.