... | @@ -2,46 +2,46 @@ |
... | @@ -2,46 +2,46 @@ |
|
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:
|
|
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:
|
|
|
|
|
|
```
|
|
```
|
|
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=0xFFFFFF&TRANSPARENT=TRUE
|
|
|
|
|
|
```
|
|
```
|
|
The URL of the WMS Server itself:
|
|
The URL of the WMS Server itself:
|
|
https://maps.heigit.org/osm-wms/service/WMSServer
|
|
https://maps.heigit.org/osm-wms/service/WMSServer
|
|
|
|
|
|
Specifying that we want to send a request to the WMS-Server:
|
|
Specifying that we want to send a request to the WMS-Server:
|
|
?SERVICE=WMS
|
|
_?SERVICE=WMS_
|
|
|
|
|
|
Specifying the Version we need to use, we found out which Version to use by looking at the capabilities:
|
|
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:
|
|
Specifying that we want to receive a Map-Image:
|
|
&REQUEST=GetMap -> request map image
|
|
_&REQUEST=GetMap_ -> request map image
|
|
|
|
|
|
Setting the Projection through the EPSG-Code (even though WGS84 is the default in this case, it had to be specified accordingly.
|
|
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
|
|
_&CRS=EPSG:4326_
|
|
|
|
|
|
Selecting the layer, as specified in the assignment:
|
|
Selecting the layer, as specified in the assignment:
|
|
&layers=osm_auto:all
|
|
_&layers=osm_auto:all_
|
|
|
|
|
|
Selecting the Bounding Box for the coordinates:
|
|
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...)
|
|
(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.
|
|
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_
|
|
|
|
|
|
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.
|
|
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. Depending on the size chose the detail of the map varies greatly, for example a map with the size 780x780px is far more primititve than one with a size above 1000 px, although the api only allows to request images up to a certain size until it sends an error message that tells you thatthe size you requested is too big.
|
|
|
|
|
|
&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.
|
|
We set the format that is supposed to be requested to png.
|
|
|
|
|
|
&FORMAT=image/png -> set image format
|
|
_&FORMAT=image/png_ -> set image format
|
|
|
|
|
|
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.
|
|
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
|
|
_&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
|
... | @@ -52,8 +52,10 @@ WE then set the background colour to white, although it does not matter, as we w |
... | @@ -52,8 +52,10 @@ WE then set the background colour to white, although it does not matter, as we w |
|
# 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
|
|
|
|
|
|
|
|
|
|
# Creating a ground overlay to display the image in google earth
|
|
# Creating a ground overlay to display the image in google earth
|
|
|
|
|
|
|
|
|
|
#References used:
|
|
#References used:
|
|
|
|
|
|
* https://docs.geoserver.org/2.21.x/en/user/services/wms/reference.html
|
|
* https://docs.geoserver.org/2.21.x/en/user/services/wms/reference.html
|
... | | ... | |