st_lucas.io.LucasIO#
- class LucasIO(url='https://geoforall.fsv.cvut.cz/st_lucas', version='1.1.0')[source]#
Bases:
object
LUCAS features input / output class.
- Parameters:
url (str) – WFS endpoint
version (str) – WFS version to be used
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.
- 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(epsg=3035)[source]#
Get downloaded LUCAS features as GeoPandas GeoDataFrame structure.
- Parameters:
epsg (int) – target EPSG code
- Return GeoDataFrame:
- to_gml(epsg=3035)[source]#
Get downloaded LUCAS features as OGC GML string.
- Parameters:
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