WMSFetcher
Tile fetcher for web map services
Implements the TileFetcher
protocol.
PARAMETER | DESCRIPTION |
---|---|
url
|
URL of the web map service
TYPE:
|
version
|
Version of the web map service (
TYPE:
|
layer
|
Layer
TYPE:
|
epsg_code
|
EPSG code
TYPE:
|
response_format
|
Format of the response (MIME type, e.g., 'image/png')
TYPE:
|
channel_keys
|
Channel name, channel name and time step combination, channel names, or channel name and time step combinations (if None, the channel is ignored)
TYPE:
|
tile_size
|
Tile size in meters
TYPE:
|
ground_sampling_distance
|
Ground sampling distance in meters
TYPE:
|
style
|
Style
TYPE:
|
buffer_size
|
Buffer size in meters
TYPE:
|
from_config
classmethod
Creates a WMS fetcher from the configuration.
PARAMETER | DESCRIPTION |
---|---|
config
|
Configuration
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
WMSFetcher
|
WMS fetcher |
__call__
Fetches a tile from the web map service.
PARAMETER | DESCRIPTION |
---|---|
coordinates
|
Coordinates (x_min, y_min) of the tile in meters
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Tile
|
Tile |
WMSFetcherConfig
Bases: pydantic.BaseModel
Configuration for the from_config
class method of WMSFetcher
Create the configuration from a config file
- Use '1.1.1' or '1.3.0' instead of
WMSVersion.V1_1_1
orWMSVersion.V1_3_0
- Use null instead of None
Example
You can create the configuration from a config file.
package: 'aviary'
name: 'WMSFetcher'
config:
url: 'https://www.my-wms.com'
version: '1.3.0'
layer: 'my_layer'
epsg_code: 25832
response_format: 'image/png'
channel_keys:
- 'r'
- 'g'
- 'b'
tile_size: 128
ground_sampling_distance: .2
style: null
buffer_size: 0
ATTRIBUTE | DESCRIPTION |
---|---|
url |
URL of the web map service
TYPE:
|
version |
Version of the web map service (
TYPE:
|
layer |
Layer
TYPE:
|
epsg_code |
EPSG code
TYPE:
|
response_format |
Format of the response (MIME type, e.g., 'image/png')
TYPE:
|
channel_keys |
Channel name, channel name and time step combination, channel names, or channel name and time step combinations (if None, the channel is ignored)
TYPE:
|
tile_size |
Tile size in meters
TYPE:
|
ground_sampling_distance |
Ground sampling distance in meters
TYPE:
|
style |
Style - defaults to None
TYPE:
|
buffer_size |
Buffer size in meters - defaults to 0
TYPE:
|