Repository navigation
EuroCrops V2: the editions a national dataset no longer offers #344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
edf8176
EuroCrops V2: the editions a national dataset no longer offers
ivorbosloper b81d590
BB, NRW, Wallonia: read the EuroCrops V2 supplements on fiboa.org
ivorbosloper 56d2ee2
DE-NRW: read the INSPIRE id; EE: leave out parcels without a crop
ivorbosloper d03f780
EuroCrops V2: the national country code, and admin fields for ES
ivorbosloper File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| from vecorel_cli.conversion.admin import AdminConverterMixin | ||
|
|
||
| from ..conversion.fiboa_converter import FiboaBaseConverter | ||
| from .at import Converter as ATConverter | ||
| from .commons.ec import EuroCropsV2Mixin | ||
| from .commons.hcat import AddHCATMixin | ||
|
|
||
|
|
||
| class Converter(EuroCropsV2Mixin, AdminConverterMixin, AddHCATMixin, FiboaBaseConverter): | ||
| national = ATConverter | ||
| nuts = "at" | ||
| years = range(2015, 2018) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,14 @@ | ||
| from .be_vlg import Converter as BEVLGBaseConverter | ||
| from .commons.ec import EuroCropsConverterMixin | ||
| from vecorel_cli.conversion.admin import AdminConverterMixin | ||
|
|
||
| from ..conversion.fiboa_converter import FiboaBaseConverter | ||
| from .be_vlg import Converter as BEVLGConverter | ||
| from .commons.ec import EuroCropsV2Mixin | ||
| from .commons.hcat import AddHCATMixin | ||
|
|
||
| class ECConverter(EuroCropsConverterMixin, BEVLGBaseConverter): | ||
| id = "ec_be_vlg" | ||
| sources = { | ||
| "https://zenodo.org/records/10118572/files/BE_VLG_2021.zip?download=1": [ | ||
| "BE_VLG_2021/BE_VLG_2021_EC21.shp" | ||
| ] | ||
| } | ||
| # the single EuroCrops 2021 release, not the parent's yearly editions | ||
| variants = {} | ||
|
|
||
| def __init__(self, *args, **kwargs): | ||
| super().__init__(*args, **kwargs) | ||
| del self.columns["BT_OMSCH"] | ||
| class Converter(EuroCropsV2Mixin, AdminConverterMixin, AddHCATMixin, FiboaBaseConverter): | ||
| national = BEVLGConverter | ||
| nuts = "be2" | ||
| years = range(2008, 2018) | ||
| # buildings: "Hoofdgebouwen", "Andere gebouwen" | ||
| drop_codes = {"1", "2"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| from vecorel_cli.conversion.admin import AdminConverterMixin | ||
|
|
||
| from ..conversion.fiboa_converter import FiboaBaseConverter | ||
| from .be_wal import Converter as BEWALConverter | ||
| from .commons.ec import EuroCropsV2Mixin | ||
| from .commons.hcat import AddHCATMixin | ||
|
|
||
|
|
||
| class Converter(EuroCropsV2Mixin, AdminConverterMixin, AddHCATMixin, FiboaBaseConverter): | ||
| national = BEWALConverter | ||
| nuts = "be3" | ||
| years = [*range(2015, 2022), 2023] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| from vecorel_cli.conversion.admin import AdminConverterMixin | ||
|
|
||
| from ..conversion.fiboa_converter import FiboaBaseConverter | ||
| from .commons.ec import EuroCropsV2Mixin | ||
| from .commons.hcat import AddHCATMixin | ||
| from .de_bb import Converter as DEBBConverter | ||
|
|
||
|
|
||
| class Converter(EuroCropsV2Mixin, AdminConverterMixin, AddHCATMixin, FiboaBaseConverter): | ||
| national = DEBBConverter | ||
| nuts = "de4" | ||
| years = range(2010, 2024) | ||
| # landscape elements (hedges, tree rows, copses, wetlands, single trees, stone walls, rock | ||
| # ridges) mapped as their own polygons from 2018 | ||
| drop_codes = {"1", "2", "3", "4", "5", "10011", "10012"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| from vecorel_cli.conversion.admin import AdminConverterMixin | ||
|
|
||
| from ..conversion.fiboa_converter import FiboaBaseConverter | ||
| from .commons.ec import EuroCropsV2Mixin | ||
| from .commons.hcat import AddHCATMixin | ||
| from .de_nrw import Converter as DENRWConverter | ||
|
|
||
|
|
||
| class Converter(EuroCropsV2Mixin, AdminConverterMixin, AddHCATMixin, FiboaBaseConverter): | ||
| national = DENRWConverter | ||
| nuts = "dea" | ||
| years = range(2019, 2024) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,61 +1,12 @@ | ||
| import pandas as pd | ||
|
|
||
| from ..conversion.fiboa_converter import FiboaBaseConverter | ||
| from .commons.ec import EuroCropsConverterMixin | ||
|
|
||
| # todo: The dataset doesn't validate due to a self intersecting polygon | ||
| # How do we want to handle this? | ||
|
|
||
| from .commons.ec import EuroCropsV2Mixin | ||
| from .commons.hcat import AddHCATMixin | ||
| from .ee import Convert as EEConverter | ||
|
|
||
| class Convert(EuroCropsConverterMixin, FiboaBaseConverter): | ||
| hcat_mapping_csv = "ee_2021.csv" | ||
| ec_year = 2021 | ||
| sources = { | ||
| "https://zenodo.org/records/14094196/files/EE_2021.zip?download=1": [ | ||
| "EE_2021/EE_2021_EC21.shp" | ||
| ] | ||
| } | ||
| id = "ec_ee" | ||
| short_name = "Estonia" | ||
| title = "Field boundaries for Estonia" | ||
| description = """ | ||
| Geospatial Aid Application Estonia Agricultural parcels. | ||
| The original dataset is provided by ARIB and obtained from the INSPIRE theme GSAA (specifically Geospaial Aid Application Estonia Agricultural parcels) through which the data layer Fields and Eco Areas (GSAA) is made available. | ||
| The data comes from ARIB's database of agricultural parcels. | ||
| """ | ||
| provider = "Põllumajanduse Registrite ja Informatsiooni Amet <http://data.europa.eu/88u/dataset/pria-pollud>" | ||
| attribution = "© Põllumajanduse Registrite ja Informatsiooni Amet" | ||
|
|
||
| columns = { | ||
| "geometry": "geometry", | ||
| "pollu_id": "id", | ||
| "taotlusaas": "determination:datetime", # year | ||
| "pindala_ha": "metrics:area", # area (in ha) | ||
| "taotletud_": "crop:code", # requested crop culture | ||
| "taotletu_1": "taotletud_maakasutus", # requested land use | ||
| "taotletu_2": "taotletud_toetus", # requested support | ||
| "niitmise_t": "niitmise_tuvastamise_staatus", # mowing detection status | ||
| "niitmise_1": "niitmise_tuvast_ajavahemik", # mowing detection period | ||
| "viimase_mu": "viimase_muutmise_aeg", # Last edit time (date-date) | ||
| "taotleja_n": "taotleja_nimi", # name of applicant | ||
| "taotleja_r": "taotleja_registrikood", # applicant's registration code | ||
| } | ||
| # The shapefile truncates taotlusaasta ("application year") to ten characters; | ||
| # it holds a bare year, which has to become a datetime for the STAC extent. | ||
| column_migrations = {"taotlusaas": lambda col: pd.to_datetime(col, format="%Y")} | ||
| missing_schemas = { | ||
| "required": [ | ||
| "taotletud_maakasutus", | ||
| "viimase_muutmise_aeg", | ||
| "taotleja_nimi", | ||
| ], | ||
| "properties": { | ||
| "taotletud_maakasutus": {"type": "string"}, | ||
| "niitmise_tuvastamise_staatus": {"type": "string"}, | ||
| "niitmise_tuvast_ajavahemik": {"type": "string"}, | ||
| "viimase_muutmise_aeg": {"type": "string"}, | ||
| "taotletud_toetus": {"type": "string"}, | ||
| "taotleja_nimi": {"type": "string"}, | ||
| "taotleja_registrikood": {"type": "string"}, | ||
| }, | ||
| } | ||
| class Converter(EuroCropsV2Mixin, AddHCATMixin, FiboaBaseConverter): | ||
| national = EEConverter | ||
| nuts = "ee" | ||
| # PRIA's WFS layers before 2016 are empty | ||
| years = (2015,) | ||
| code_from_name = True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| from vecorel_cli.conversion.admin import AdminConverterMixin | ||
|
|
||
| from ..conversion.fiboa_converter import FiboaBaseConverter | ||
| from .commons.ec import EuroCropsV2Mixin | ||
| from .commons.hcat import AddHCATMixin | ||
| from .es import Converter as ESConverter | ||
|
|
||
|
|
||
| class Converter(EuroCropsV2Mixin, AdminConverterMixin, AddHCATMixin, FiboaBaseConverter): | ||
| national = ESConverter | ||
| nuts = "es" | ||
| years = range(2021, 2024) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,36 +1,13 @@ | ||
| from ..conversion.fiboa_converter import FiboaBaseConverter | ||
| from .commons.ec import EuroCropsConverterMixin | ||
|
|
||
| from vecorel_cli.conversion.admin import AdminConverterMixin | ||
|
|
||
| class Converter(EuroCropsConverterMixin, FiboaBaseConverter): | ||
| hcat_mapping_csv = "fr_2018.csv" | ||
| hcat_mapping_supplements = ["https://fiboa.org/code/fr/fr_2018_supplement.csv"] | ||
| ec_year = 2018 | ||
| sources = { | ||
| "https://zenodo.org/records/14094196/files/FR_2018.zip": ["FR_2018/FR_2018_EC21.shp"] | ||
| } | ||
| from ..conversion.fiboa_converter import FiboaBaseConverter | ||
| from .commons.ec import EuroCropsV2Mixin | ||
| from .commons.hcat import AddHCATMixin | ||
| from .fr import FRConverter | ||
|
|
||
| id = "ec_fr" | ||
| short_name = "France" | ||
| title = "Field boundaries for France" | ||
| description = """ | ||
| The 2018 campaign of the Registre Parcellaire Graphique, which IGN never released as an | ||
| archive of its own: the RPG downloads run 2017 and 2019 onwards. EuroCrops publishes it | ||
| with its HCAT columns already resolved. | ||
| """ | ||
| provider = "Institut National de l'Information Géographique et Forestière <https://geoservices.ign.fr/rpg>" | ||
| attribution = "IGN - Original data from https://geoservices.ign.fr/rpg" | ||
|
|
||
| columns = { | ||
| "geometry": "geometry", | ||
| "ID_PARCEL": "id", | ||
| "SURF_PARC": "metrics:area", | ||
| "CODE_CULTU": "crop:code", | ||
| "CODE_GROUP": "group_code", | ||
| } | ||
| missing_schemas = {"properties": {"group_code": {"type": "string"}}} | ||
| column_migrations = { | ||
| "CODE_GROUP": lambda col: col.astype("string").str.strip(), | ||
| } | ||
| # SURF_PARC is rounded to 0.01 ha, so a parcel under 50 m2 reads as zero and is | ||
| # measured from the geometry (area_calculate_missing) | ||
| class Converter(EuroCropsV2Mixin, AdminConverterMixin, AddHCATMixin, FiboaBaseConverter): | ||
| national = FRConverter | ||
| nuts = "fr" | ||
| # IGN's RPG downloads run 2017 and 2019 onwards | ||
| years = (2015, 2016, 2018) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| original_code,original_name,translated_name,HCAT3_name,HCAT3_code | ||
| 19,Culture hydroponique ou aquaponique,Hydroponic or aquaponic cultivation,not_known_and_other,3399000000 | ||
| 48,Cameline,Camelina,camelina,3301061500 | ||
| 59,Fenugrec,Fenugreek,fenugreek,3301020400 | ||
| 89,Terre en jachère à activité minimale avec EAG,Fallow land with minimal activity with EAG,fallow_land_not_crop,3301110000 | ||
| 383,Millet,Millet,millet_sorghum,3301010900 | ||
| 397,"Mélange froment ou épeautre ( plus de 50%) et de pois ou féverole (plus de 20%), commercialisé à l'état sec","Mixture of wheat or spelt (more than 50%) and peas or fava beans (more than 20%), marketed in a dry state.",cereal,3301010000 | ||
| 614,Prairie avec moins de 90 % couvert herbacé (pratiques locales établies),Pasture with less than 90% herbaceous cover (established local practices).,pasture_meadow_grassland_grass,3302000000 | ||
| 700,Mélange graminées/trèfle,Grass/clover mix,clover,3301090303 | ||
| 722,Trèfle pérenne,Perennial clover,clover,3301090303 | ||
| 723,Trèfle violet,Red clover,clover,3301090303 | ||
| 747,Vesce,Vetch,vetches,3301090305 | ||
| 812,Jachère non herbacée,non-herbaceous fallow,fallow_land_not_crop,3301110000 | ||
| 923,Lin d'hiver (fibre),Winter flax (fiber),flax_linseed,3301060700 | ||
| 933,Pois chiche,Chickpea,chickpeas,3301020200 | ||
| 934,lentille,lentil,lentils,3301020500 | ||
| 967,Maraichage diversifié,Diversified vegetables,fresh_vegetables,3301070000 | ||
| 9732,Cultures fruitières pluriannuelles (prunes) - hautes tiges,multi-annual fruit crops (plums) - tall stalks,plums,3303011300 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.