I wonder if it's possible to download all the tiles from a WMS web server. I would like to cache them as a Geopackage Tiles for exemple or XYZ Tile layers.
Do you know if this is possible ?
Thanks,
Arnaud
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
Hi @arnaud974, That could be a loaded question. How much data do you think you might be pulling? And at what tiling level? Does this particular WMS Server support Tiling level? The data volume you are attempting to work with... This could add up very fast.
As for FME's ability, yes, should be able to connect to the WMS Server... and then you can work on storing this in Geopackage. There may be some work you'll need to do between the source (WMS Reader) and the destination format (GeoPackage).
Do you have FME now? Have you attempted this already and not been able to get it done?
Here's a workspace that should help you get started: WMSHarvester v1.0.fmw
This workspace reads a WMS url and writes out all the layers available from that WMS.
It does this by
1. composing a GetCapabilities request and using that to get a set of records for the available layers.
2. use the layer records and their properties (bbox) to compose a GetMap query to get the raster image for each layer.
3. write out each layer using dataset fanout on layer name
Ultimately all of this is configured by copying the WMS requests from the Data Inspector WMS reader log and breaking them up into different terms that can be replaced by attribute values or user defined parameters for the dynamic parts to build up the fetchURL. This is configured to work with the one of Safe's WMS 1.1 demo servers. Implementations vary, so you may need to adjust the message structure to fit another WMS servers specific configuration.
You can customize how the requests are composed and use other properties from the GetCapabilities response to configure your queries. Or you could use a sequence of extents requests instead of the default full extent if you want to get a higher resolution response.
Note that its up to the user to ensure that harvesting data from a given WMS does not violate terms of use. You may also want to consider using a Decelerator transformer to avoid generating too many requests at once which can appear as a DOS attack by some servers.
Here's a workspace that should help you get started: WMSHarvester v1.0.fmw
This workspace reads a WMS url and writes out all the layers available from that WMS.
It does this by
1. composing a GetCapabilities request and using that to get a set of records for the available layers.
2. use the layer records and their properties (bbox) to compose a GetMap query to get the raster image for each layer.
3. write out each layer using dataset fanout on layer name
Ultimately all of this is configured by copying the WMS requests from the Data Inspector WMS reader log and breaking them up into different terms that can be replaced by attribute values or user defined parameters for the dynamic parts to build up the fetchURL. This is configured to work with the one of Safe's WMS 1.1 demo servers. Implementations vary, so you may need to adjust the message structure to fit another WMS servers specific configuration.
You can customize how the requests are composed and use other properties from the GetCapabilities response to configure your queries. Or you could use a sequence of extents requests instead of the default full extent if you want to get a higher resolution response.
Note that its up to the user to ensure that harvesting data from a given WMS does not violate terms of use. You may also want to consider using a Decelerator transformer to avoid generating too many requests at once which can appear as a DOS attack by some servers.
Im in the same situation as arnaud, but it seems like i can't download your workspace "WMSharvester_1.0.fmw", is it possible for you to link it again if you happen to have it ?
Im in the same situation as arnaud, but it seems like i can't download your workspace "WMSharvester_1.0.fmw", is it possible for you to link it again if you happen to have it ?
Here's a workspace that should help you get started: WMSHarvester v1.0.fmw
This workspace reads a WMS url and writes out all the layers available from that WMS.
It does this by
1. composing a GetCapabilities request and using that to get a set of records for the available layers.
2. use the layer records and their properties (bbox) to compose a GetMap query to get the raster image for each layer.
3. write out each layer using dataset fanout on layer name
Ultimately all of this is configured by copying the WMS requests from the Data Inspector WMS reader log and breaking them up into different terms that can be replaced by attribute values or user defined parameters for the dynamic parts to build up the fetchURL. This is configured to work with the one of Safe's WMS 1.1 demo servers. Implementations vary, so you may need to adjust the message structure to fit another WMS servers specific configuration.
You can customize how the requests are composed and use other properties from the GetCapabilities response to configure your queries. Or you could use a sequence of extents requests instead of the default full extent if you want to get a higher resolution response.
Note that its up to the user to ensure that harvesting data from a given WMS does not violate terms of use. You may also want to consider using a Decelerator transformer to avoid generating too many requests at once which can appear as a DOS attack by some servers.
What about WMTS, i want to download a specific layer from a wmts link, which is within a given polygon and to write it as geotiff. And because the area could be big, i want to tile the written geotiff by a certain row and field number, and the files to be written like filename_A1,filename_A2,filename_A3...etc based on the row and column number needed like 3x3 or 4x5, 5x5 ...based on the needs.