| 1 | ----------------------------------------------------------------------------
|
|---|
| 2 | WMS Adapter for Orthofotos of Bern
|
|---|
| 3 | ----------------------------------------------------------------------------
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 | This adapter translates JOSMs tile requests for orthofotos of Bern to tile
|
|---|
| 7 | requests which can be handled by the WMS server of Bern.
|
|---|
| 8 |
|
|---|
| 9 | The adapter is a small web application which runs on your local computer.
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 | +--------+ +-------------+ +-----------+
|
|---|
| 13 | | JOSM | tile request | WMS Adapter | tile req | City Map |
|
|---|
| 14 | | | ---------------> | for | -----------> | of Bern |
|
|---|
| 15 | | | tile | Orthofotos | tile | |
|
|---|
| 16 | | | <------------- | of Bern | <---------- | |
|
|---|
| 17 | +--------+ +-------------+ +-----------+
|
|---|
| 18 |
|
|---|
| 19 | The adapter is responsible
|
|---|
| 20 | o for maintaining a valid session with the WMS server of Bern
|
|---|
| 21 | o translating lat/lon-coordinates in WGS84 to x/y-coordinates of CH1903
|
|---|
| 22 |
|
|---|
| 23 | Limitations:
|
|---|
| 24 | o although I tried to mimic the behaviour of a standard browser like Firefox as
|
|---|
| 25 | closely as possible I wasn't able to automatically retrieve a valid session
|
|---|
| 26 | ID from the WMS server of Bern. Session IDs retrieved automatically
|
|---|
| 27 | timed out immediately.
|
|---|
| 28 |
|
|---|
| 29 | You therefore have to configure the WMS adapter with a valid session ID which
|
|---|
| 30 | you have to retrieve from the WMS server of Bern using your preferred web
|
|---|
| 31 | browser (see below in section Usage).
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 | INSTALLATION
|
|---|
| 35 | ------------
|
|---|
| 36 |
|
|---|
| 37 | o Download the latest orthofoto-bern-wms-adapter-<version>.zip from
|
|---|
| 38 | http://www.guggis.ch/orthofoto-bern-wms-adapter/
|
|---|
| 39 |
|
|---|
| 40 | o Unzip orthofoto-bern-wms-adapter-<version>.zip
|
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 | CONFIGURING JOSM
|
|---|
| 45 | ----------------
|
|---|
| 46 | o Add the WMS adapter as WMS server
|
|---|
| 47 | - press F12 to launch the configuration dialog
|
|---|
| 48 | - select the configuration screen for WMS server
|
|---|
| 49 | - add an entry with
|
|---|
| 50 | menu name = Orthofotos Bern
|
|---|
| 51 | WMS-URL = http://localhost:8787/orthofotos-bern? !!! Note the trailing '?' !!!
|
|---|
| 52 |
|
|---|
| 53 |
|
|---|
| 54 |
|
|---|
| 55 | USAGE
|
|---|
| 56 | ------------
|
|---|
| 57 | o Start the WMS adapter
|
|---|
| 58 |
|
|---|
| 59 | c:\> java -jar winstone-0.9.10.jar --warfile=orthofoto-bern-wms-adapter.war
|
|---|
| 60 |
|
|---|
| 61 | Use --httpPort=<port> to set another port the adapter is listening too.
|
|---|
| 62 |
|
|---|
| 63 | o Get a valid session ID
|
|---|
| 64 |
|
|---|
| 65 | - Launch your browser and point it at
|
|---|
| 66 | http://www.stadtplan.bern.ch/TBInternet/default.aspx?User=1
|
|---|
| 67 |
|
|---|
| 68 | - View the current set of cookies in your browser and copy the cookie
|
|---|
| 69 | for domain stadtplan.bern.ch
|
|---|
| 70 | with name ASP.NET_SessionId
|
|---|
| 71 | to the clipboard
|
|---|
| 72 |
|
|---|
| 73 | o Configure WMS adapter with the session ID
|
|---|
| 74 | - Point your browser at
|
|---|
| 75 | http://localhost:8787/orthofotos-bern
|
|---|
| 76 | - Enter the Session ID retrieved in the previous step
|
|---|
| 77 | and click on "Submit"
|
|---|
| 78 |
|
|---|
| 79 | o Use JOSM
|
|---|
| 80 | - You may now use JOSM to retrieve orthofotos of Bern
|
|---|
| 81 |
|
|---|
| 82 |
|
|---|
| 83 |
|
|---|