[16723] | 1 | ----------------------------------------------------------------------------
|
---|
| 2 | WMS Adapter for Orthofotos of Bern
|
---|
| 3 | ----------------------------------------------------------------------------
|
---|
| 4 |
|
---|
| 5 |
|
---|
| 6 | This adapter translates JOSMs tile requests for orthofotos of Bern to tile
|
---|
[18836] | 7 | requests which can be handled by the WMS server of Bern.
|
---|
[16723] | 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
|
---|
[18836] | 26 | ID from the WMS server of Bern. They timed out immediately.
|
---|
[16723] | 27 |
|
---|
| 28 | You therefore have to configure the WMS adapter with a valid session ID which
|
---|
| 29 | you have to retrieve from the WMS server of Bern using your preferred web
|
---|
| 30 | browser (see below in section Usage).
|
---|
[16752] | 31 |
|
---|
[16723] | 32 |
|
---|
| 33 | INSTALLATION
|
---|
| 34 | ------------
|
---|
| 35 |
|
---|
| 36 | o Download the latest orthofoto-bern-wms-adapter-<version>.zip from
|
---|
| 37 | http://www.guggis.ch/orthofoto-bern-wms-adapter/
|
---|
| 38 |
|
---|
| 39 | o Unzip orthofoto-bern-wms-adapter-<version>.zip
|
---|
| 40 |
|
---|
| 41 |
|
---|
| 42 | CONFIGURING JOSM
|
---|
| 43 | ----------------
|
---|
| 44 | o Add the WMS adapter as WMS server
|
---|
| 45 | - press F12 to launch the configuration dialog
|
---|
| 46 | - select the configuration screen for WMS server
|
---|
| 47 | - add an entry with
|
---|
| 48 | menu name = Orthofotos Bern
|
---|
[18836] | 49 | WMS-URL = http://localhost:<port>/orthofotos-bern? !!! Note the trailing '?' !!!
|
---|
| 50 | (replace <port> with the port number is listing on, see below)
|
---|
[16752] | 51 |
|
---|
[16723] | 52 | USAGE
|
---|
| 53 | ------------
|
---|
| 54 | o Start the WMS adapter
|
---|
| 55 |
|
---|
[18836] | 56 | c:\> java -jar winstone-0.9.10.jar --warfile=orthofoto-bern-wms-adapter.war
|
---|
[16723] | 57 |
|
---|
[18836] | 58 | Use --httpPort=<port> to set another port the adapter is listening on.
|
---|
| 59 |
|
---|
| 60 | Example for port 8787:
|
---|
| 61 | c:\> java -jar winstone-0.9.10.jar --warfile=orthofoto-bern-wms-adapter.war --httpPort=8787
|
---|
| 62 |
|
---|
| 63 | o The port number
|
---|
| 64 | The adapter runs on your computer and listens to requests on a specific port.
|
---|
| 65 | The default port is 8080.
|
---|
| 66 | If you use the commmand line option --httpPort=<port>, then the port number is
|
---|
| 67 | the number you entered instead of <port>.
|
---|
[16723] | 68 |
|
---|
| 69 | o Get a valid session ID
|
---|
| 70 |
|
---|
[18836] | 71 | - Launch your browser and point it at
|
---|
| 72 | http://www.stadtplan.bern.ch/TBInternet/default.aspx?User=1
|
---|
[16723] | 73 |
|
---|
[18836] | 74 | - View the current set of cookies in your browser and copy the cookie
|
---|
[16723] | 75 | for domain stadtplan.bern.ch
|
---|
| 76 | with name ASP.NET_SessionId
|
---|
[18836] | 77 | to the clipboard
|
---|
[16723] | 78 |
|
---|
| 79 | o Configure WMS adapter with the session ID
|
---|
[18836] | 80 | - Point your browser at
|
---|
| 81 | http://localhost:<port-number>/orthofotos-bern
|
---|
| 82 | for instance
|
---|
| 83 | http://localhost:8080/orthofotos-bern
|
---|
| 84 | - Enter the Session ID retrieved in the previous step and click on "Submit"
|
---|
[16723] | 85 |
|
---|
| 86 | o Use JOSM
|
---|
| 87 | - You may now use JOSM to retrieve orthofotos of Bern
|
---|
| 88 |
|
---|
[18836] | 89 |
|
---|