st_lucas.io.LucasIO#
- class LucasIO(url='https://geoforall.fsv.cvut.cz/st_lucas', version='1.1.0')[source]#
Bases:
object
Methods
Get number of downloaded LUCAS features.
Download LUCAS features from dedicated WFS server based on specified request
request.LucasRequest
.Save images of LUCAS point into zip file.
Get images of selected point and its surroundings from Eurostat FTP server.
Check whether downloaded LUCAS feature collection is empty.
Get downloaded LUCAS features as GeoPandas GeoDataFrame structure.
Get downloaded LUCAS features as OGC GML string.
Save downloaded LUCAS features into OGC GeoPackage file.
Attributes
data
Get metadata.
- count(layer_identifier=None)[source]#
Get number of downloaded LUCAS features.
- Parameters:
layer_identifier (str) – specify layer name to be processed (None for LUCAS points)
Layer identifiers: obs_radius_areas, cprn_areas, rg_repre_areas
- Return int:
number of downloaded features
- download(request)[source]#
Download LUCAS features from dedicated WFS server based on specified request
request.LucasRequest
.- Parameters:
LucasRequest – request
- download_images(images, save_dir)[source]#
Save images of LUCAS point into zip file.
- Parameters:
images (dict) – dictionary with URLs of LUCAS point images received by get_images method
save_dir (str) – directory path to save the downloaded images
- Return str:
path to created zip file
- get_images(year, point_id, nuts0=None)[source]#
Get images of selected point and its surroundings from Eurostat FTP server.
- Parameters:
year (int) – year of the measurement
point_id (int) – id of the LUCAS point
nuts0 (str) – NUTS0 code
- Return images:
dictionary of images (URL)
- is_empty()[source]#
Check whether downloaded LUCAS feature collection is empty.
- Return bool:
True for empty collection otherwise False
- property metadata#
Get metadata.
- Return dict:
metadata dictionary
- to_geopandas(layer=None, epsg=3035)[source]#
Get downloaded LUCAS features as GeoPandas GeoDataFrame structure.
- Parameters:
layer (str) – layer name or None for default
epsg (int) – target EPSG code
- Return GeoDataFrame:
- to_gml(layer=None, epsg=3035)[source]#
Get downloaded LUCAS features as OGC GML string.
- Parameters:
layer (str) – layer name or None for default
epsg (int) – target EPSG code
- Return str:
GML string
- to_gpkg(output_path, epsg=3035)[source]#
Save downloaded LUCAS features into OGC GeoPackage file.
Raises LucasDataError on failure.
- Parameters:
output_path (str) – path to the output OGC GeoPackage file
epsg (int) – target EPSG code