I like to implement a special WMS-layer with leaflet()
in R
. But I have no success with the WMS-layer I like to use.
library("leaflet")
library("sp")
# this example from the tutorial works
leaflet() %>% addTiles() %>% setView(-93.65, 42.028, zoom = 4) %>%
addWMSTiles(
"http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi",
layers = "nexrad-n0r",
options = WMSTileOptions(format = "image/png", transparent = TRUE)
)
# but for my implementation it don't work
leaflet() %>% addTiles() %>% setView(lat = 53.8, lng = 12.6, zoom = 8) %>%
addWMSTiles("http://www.umweltkarten.mv-regierung.de/script/mv_a3_wasserschutz_wms.php?",
layers = "t2_bib_p",
options = WMSTileOptions(format = "image/png")
)
I assume that there is a problem with the Coordinate Refernce System. Because the WMS-layer I like to use, have not a standard CRS. So I try to expermented with this WMSTileOptions()
:
crs=CRS("+init=epsg:5650")
The idea is to use WMS-Layers as background images for my vector data. The vector data come mainly from shape-files and GPS-data (text files). The purpose is to create maps which i can use in a report.
If you know other possibles beside leaflet
to use WMS in R there are also welcome?
WMS data extract files can be found under the /xfer/wms/reports file exchange directory and can be downloaded using an open-source SFTP client.
I notice that if you investigate that base URL it says
msWMSDispatch(): WMS server error. Incomplete WMS request: VERSION parameter missing
and by researching the website I determined that the proper format is:
https://www.umweltkarten.mv-regierung.de/script/mv_a3_wasserschutz_wms.php?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.3.0
which yields quite a lot of WMS data if you put it in your browser.
We can use "find" to see which layers are available to be queried. There are several, such as t3_ksg
, t3_wsg
, and lungwms
, but it seems that t2_bib_p
is not available for mv_a3_wasserschutz_wms
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With