|
# Creating the wms request
|
|
# Creating the wms request
|
|
* started by requesting capabilites -> to see them and to see if the service is running
|
|
In order to create the request for the WMS-Server we started by looking at the information at hand and also requested the capabilities, mainly to get an overview over the possible settings and files. We used the given specifications as well as the wms-documentation to write out the request, below each of the elements is broken down and their function explained:
|
|
* references used:
|
|
|
|
* https://docs.geoserver.org/2.21.x/en/user/services/wms/reference.html
|
|
|
|
* https://docs.geoserver.org/main/en/user/services/wms/basics.html -> Crs/EPGS code
|
|
|
|
```
|
|
```
|
|
https://maps.heigit.org/osm-wms/service/WMSServer?SERVICE=WMS&Version=1.3.0&REQUEST=GetMap&CRS=EPSG:4326&layers=osm_auto:all&BBOX=42.32,-71.13,42.42,-71.03&styles=&WIDTH=780&HEIGHT=780&FORMAT=image/png&BGCOLOR=0xFEFFFF&TRANSPARENT=TRUE
|
|
https://maps.heigit.org/osm-wms/service/WMSServer?SERVICE=WMS&Version=1.3.0&REQUEST=GetMap&CRS=EPSG:4326&layers=osm_auto:all&BBOX=42.32,-71.13,42.42,-71.03&styles=&WIDTH=780&HEIGHT=780&FORMAT=image/png&BGCOLOR=0xFEFFFF&TRANSPARENT=TRUE
|
|
|
|
|
|
```
|
|
```
|
|
?SERVICE=WMS -> choose wms
|
|
The URL of the WMS Server itself:
|
|
|
|
https://maps.heigit.org/osm-wms/service/WMSServer
|
|
|
|
|
|
|
|
Specifying that we want to send a request to the WMS-Server:
|
|
|
|
?SERVICE=WMS
|
|
|
|
|
|
|
|
Specifying the Version we need to use, we found out which Version to use by looking at the capabilities:
|
|
&Version=1.3.0 -> set version
|
|
&Version=1.3.0 -> set version
|
|
|
|
|
|
|
|
Specifying that we want to receive a Map-Image:
|
|
&REQUEST=GetMap -> request map image
|
|
&REQUEST=GetMap -> request map image
|
|
|
|
|
|
&CRS=EPSG:4326 -> set projections(Wgs84)
|
|
Setting the Projection through the EPSG-Code (even though WGS84 is the default in this case, it had to be specified accordingly.
|
|
|
|
&CRS=EPSG:4326
|
|
|
|
|
|
|
|
Selecting the layer, as specified in the assignment:
|
|
|
|
&layers=osm_auto:all
|
|
|
|
|
|
&layers=osm_auto:all -> select layer
|
|
Selecting the Bounding Box for the coordinates:
|
|
|
|
(We ran into some issues here, as the order in which the coordinates have to be presented changed between Versions and the reference often does not specify which version it refers to...)
|
|
|
|
The bounding box is constructed through presenting a minimum x-value, a minimum y-value, a max x-value and finally a max y-value.
|
|
|
|
|
|
|
|
&BBOX=42.32,-71.13,42.42,-71.03
|
|
|
|
|
|
&BBOX=42.32,-71.13,42.42,-71.03 -> bbox coordinates (lat/long)
|
|
In order to set the size of the image presented we specified the with and the height of the image, note that a new "block" of the request starts with the addition of &styles, which is followed by all the attributes concerning the style of the map produced.
|
|
|
|
|
|
&styles=&WIDTH=780&HEIGHT=780 -> set size of map, if different dimension projection skewed
|
|
&styles=&WIDTH=780&HEIGHT=780 -> set size of map, if different dimension projection skewed
|
|
|
|
|
|
|
|
We set the format that is supposed to be requested to png.
|
|
|
|
|
|
&FORMAT=image/png -> set image format
|
|
&FORMAT=image/png -> set image format
|
|
|
|
|
|
&BGCOLOR=0xFEFFFF -> set background color
|
|
WE then set the background colour to white, although it does not matter, as we will set the background top transparent anyways, the variable could not be left blank.
|
|
|
|
|
|
|
|
&BGCOLOR=0xFFFFFF -> set background color
|
|
|
|
|
|
&TRANSPARENT=TRUE -> set transparent bg
|
|
&TRANSPARENT=TRUE -> set transparent bg
|
|
|
|
|
|
|
|
----
|
|
* minx,miny,maxx,maxy -> -71.13,42.32,-71.03,42.42
|
|
* minx,miny,maxx,maxy -> -71.13,42.32,-71.03,42.42
|
|
|
|
|
|
* axis order is set as X=longitude (easting) and Y=latitude (northing), negative values are long
|
|
* axis order is set as X=longitude (easting) and Y=latitude (northing), negative values are long
|
|
|
|
|
|
|
|
|
|
# Integration of the WMS Image into Google Earth:
|
|
# Integration of the WMS Image into Google Earth:
|
|
https://docs.geotools.org/latest/userguide/extension/wms/wms.html |
|
https://docs.geotools.org/latest/userguide/extension/wms/wms.html
|
|
\ No newline at end of file |
|
|
|
|
|
# Creating a ground overlay to display the image in google earth
|
|
|
|
|
|
|
|
#References used:
|
|
|
|
|
|
|
|
* https://docs.geoserver.org/2.21.x/en/user/services/wms/reference.html
|
|
|
|
* https://docs.geoserver.org/main/en/user/services/wms/basics.html -> Crs/EPGS code
|
|
|
|
* https://docs.geotools.org/latest/userguide/extension/wms/wms.html
|
|
|
|
* https://developers.google.com/kml/documentation/kmlreference |
|
|
|
\ No newline at end of file |