diff --git a/CHANGELOG.md b/CHANGELOG.md index a654d7dd..cb297834 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - ES-CL: the ITACyL server is https-only, the 2025 shapefiles sit in province subfolders, and C_REFREC is the identifier - A test refuses a fixture above 5 MB, committed or merely lying in the fixture folder, because a failing convert test downloads the real source there - ES-MD: find RECINTO.shp wherever the archive puts it +- PT: the 2025 edition, whose layers, crop column and area units all changed, and CUL_ID as the identifier - Update vecorel-cli to v0.2.17: - GeoJSON is read as UTF-8 as the format mandates, instead of the platform locale (cp1252 on Windows mangled umlauts) - GeoJSON files with a byte order mark no longer fail to read diff --git a/fiboa_cli/datasets/pt.py b/fiboa_cli/datasets/pt.py index 25b0769e..b78b7b75 100644 --- a/fiboa_cli/datasets/pt.py +++ b/fiboa_cli/datasets/pt.py @@ -1,8 +1,16 @@ +import re + +import geopandas as gpd from vecorel_cli.conversion.admin import AdminConverterMixin from ..conversion.fiboa_converter import FiboaBaseConverter from .commons.hcat import AddHCATMixin +# Up to 2023 the country is split into "Culturas_" layers, from 2025 into +# "T" layers. Both files carry other layers too (parcel blocks, land cover, +# an empty "Culturas" container, a non-spatial "Codes" table) that are not field boundaries. +DATA_LAYER = re.compile(r"^(Culturas_.+|T[0-9A-Z]{3})$") + class PTConverter(AdminConverterMixin, AddHCATMixin, FiboaBaseConverter): id = "pt" @@ -12,6 +20,7 @@ class PTConverter(AdminConverterMixin, AddHCATMixin, FiboaBaseConverter): # see https://www.ifap.pt/isip/ows/ BASE = "https://www.ifap.pt/isip/ows/resources/" variants = { + "2025": BASE + "2025/culturas.gpkg", "2023": BASE + "2023/Continente.gpkg", "2022": BASE + "2022/2022.zip", "2021": BASE + "2021/2021.zip", @@ -25,7 +34,7 @@ class PTConverter(AdminConverterMixin, AddHCATMixin, FiboaBaseConverter): } def layer_filter(self, layer, uri): - return layer.startswith("Culturas_") + return bool(DATA_LAYER.match(layer)) provider = ( "IPAP - Instituto de Financiamento da Agricultura e Pescas " @@ -33,21 +42,43 @@ def layer_filter(self, layer, uri): license = "No conditions apply " columns = { "geometry": "geometry", - "OSA_ID": "id", - "CUL_ID": "block_id", + # CUL_ID identifies the crop parcel and is unique across every layer of + # both editions (3,568,852 of 3,568,852 in 2025); OSA_ID is the land + # occupation polygon it lies in, which several parcels can share. + "CUL_ID": "id", + "OSA_ID": "block_id", "CUL_CODIGO": "crop:code", + # The crop name is only published up to 2023; from 2025 the code is all there is. "CT_português": "crop:name", "Shape_Area": "metrics:area", "Shape_Length": "metrics:perimeter", } extensions = {"https://fiboa.org/crop-extension/v0.2.0/schema.yaml"} ec_mapping_csv = "https://fiboa.org/code/pt/pt.csv" - column_additions = { - "determination:datetime": "2023-01-01T00:00:00Z", - } + use_variant_as_determination = True area_is_in_ha = False missing_schemas = { "properties": { "block_id": {"type": "int64"}, } } + + def migrate(self, gdf) -> gpd.GeoDataFrame: + # 2025 renamed the crop code column and dropped the crop name. + if "PUN_CUL_CO" in gdf.columns: + gdf = gdf.rename(columns={"PUN_CUL_CO": "CUL_CODIGO"}) + + if gdf.crs is not None and gdf.crs.is_geographic: + # 2025 is published in WGS 84, with Shape_Area and Shape_Length computed in + # degrees. Recompute both in metres; up to 2023 the file is in ETRS89 / + # Portugal TM06 and the published values are already metric. + metric = gdf.geometry.to_crs("EPSG:6933") + gdf["Shape_Area"] = metric.area + gdf["Shape_Length"] = metric.length + + # 2025 types the identifiers as floats, which would stringify id as "28398800.0". + for column in ("OSA_ID", "CUL_ID"): + if column in gdf.columns and gdf[column].dtype.kind == "f": + gdf[column] = gdf[column].astype("int64") + + return super().migrate(gdf) diff --git a/tests/data-files/convert/pt/README.md b/tests/data-files/convert/pt/README.md index 94780b22..785caaa0 100644 --- a/tests/data-files/convert/pt/README.md +++ b/tests/data-files/convert/pt/README.md @@ -1,10 +1,19 @@ -The gpkg is built up out of multiple layers, only the 'Culturas_'-prefixed layers should be loaded +The gpkg is built up out of multiple layers, only the field boundary layers should be loaded: +`Culturas_` up to 2023, `T` from 2025 on. -The test file is created by taking the first 100 features from these different layers. -We now have a representable test-case. Downloaded data is assumed in $DOWNLOADED_SOURCE/Continente.gpkg. Run +The test files are created by taking the first 100 features from these different layers. +Downloaded data is assumed in $DOWNLOADED_SOURCE. Run ``` ogr2ogr Continente.gpkg $DOWNLOADED_SOURCE/Continente.gpkg Continente -limit 100 ogr2ogr -update Continente.gpkg $DOWNLOADED_SOURCE/Continente.gpkg Culturas_Aveiro -limit 100 ogr2ogr -update Continente.gpkg $DOWNLOADED_SOURCE/Continente.gpkg OcupacoesSolo_Aveiro -limit 100 + +ogr2ogr culturas.gpkg $DOWNLOADED_SOURCE/culturas.gpkg T111 -limit 100 +for layer in T150 Culturas Codes; do + ogr2ogr -update culturas.gpkg $DOWNLOADED_SOURCE/culturas.gpkg $layer -limit 100 +done ``` + +`Culturas` (empty) and `Codes` (the NUTS 3 code list) are kept in the 2025 file so the layer +filter is exercised on the layers it has to skip. diff --git a/tests/data-files/convert/pt/culturas.gpkg b/tests/data-files/convert/pt/culturas.gpkg new file mode 100644 index 00000000..ee801430 Binary files /dev/null and b/tests/data-files/convert/pt/culturas.gpkg differ diff --git a/tests/data-files/convert/pt/pt.csv b/tests/data-files/convert/pt/pt.csv new file mode 100644 index 00000000..5fb7b19a --- /dev/null +++ b/tests/data-files/convert/pt/pt.csv @@ -0,0 +1,179 @@ +original_code,original_name,translated_name,HCAT3_name,HCAT3_code,HCAT2_name,HCAT2_code +109,AMENDOA,ALMOND,almond,3303030100,almond,3303030100 +267,CONSOCIAÇÕES ANUAIS E OUTRAS CULT. FORRAG. ANUAIS,ANNUAL AND OTHER CULT. FORAGE ANNUALS,other_arable_land_crops,3301990000,other_arable_land_crops,3301990000 +105,MAÇÃ,APPLE,apples,3303010200,apples,3303010200 +107,DAMASCO,apricot,apricots,3303010300,apricots,3303010300 +081,"PLANTAS AROM., MEDICINAIS E CONDIMENTARES",AROM. MEDICINAL AND CONDIMENTAL PLANTS,aromatic_medicinal_culinary_plants_spices_herbs,3301061200,aromatic_medicinal_culinary_plants_spices_herbs,3301061200 +266,CONSOCIAÇÃO DE FIXADORAS DE AZOTO,association of nitrogen-fixing plants,legumes_harvested_green,3301090300,not_known_and_other,3399000000 +136,ABACATE,AVOCADO,avocado,3303100000,avocado,3303100000 +004,CEVADA,BARLEY,barley,3301010400,barley,3301010400 +076,AZEVEM,lolium,lolium_ryegrass,3301090205,lolium_ryegrass,3301090205 +014,FAVA,BEAN,beans,3301020100,beans,3301020100 +230,FEIJÃO,BEAN,beans,3301020100,beans,3301020100 +090,OUTRAS HORTÍCOLAS,Other crops,fresh_vegetables,3301070000,fresh_vegetables,3301070000 +103,BATATA,Potato,potatoes,3301030000,potatoes,3301030000 +032,BETERRABA,BEETROOT,beetroot_beets,3301290200,beetroot_beets,3301290200 +164,POVOAMENTO CARVALHO NEGRAL,BLACK OAK NEGRAL PLANTATION,oak,3306060000,oak,3306060000 +201,AMORA,BLACKBERRY,blackberry,3303020200,blackberry,3303020200 +202,MIRTILO,BLUEBERRY,blueberry,3303020400,blueberry,3303020400 +249,CENOURA,CARROT,carrots_daucus,3301290300,carrots_daucus,3301290300 +110,CASTANHA,CASTANIA,sweet_chestnuts,3303030500,sweet_chestnuts,3303030500 +263,CHUCHU,Chayote Gourd,pumpkin_squash_gourd,3301140400,pumpkin_squash_gourd,3301140400 +106,CEREJA,CHERRY,cherry_cherries,3303010400,cherry_cherries,3303010400 +166,POVOAMENTO CASTANHEIRO,CHESTNUT PLANTATIONS,sweet_chestnuts,3303030500,sweet_chestnuts,3303030500 +038,GRÃO DE BICO,CHICKPEA,chickpeas,3301020200,chickpeas,3301020200 +046,TREVO,CLOVER,clover,3301090303,clover,3301090303 +283,MEDRONHO,COMMON LAND PASTURE,pasture_meadow_grassland_grass,3302000000,pasture_meadow_grassland_grass,3302000000 +262,SOBREIRO PARA PRODUÇÃO DE CORTIÇA,CORK OAK FOR CORK PRODUCTION,oak,3306060000,oak,3306060000 +162,POVOAMENTO DE SOBREIROS,CORK OAK PLANTATION,oak,3306060000,oak,3306060000 +006,MILHO,CORN,grain_maize_corn_popcorn,3301010600,grain_maize_corn_popcorn,3301010600 +250,COURGETTE,COURGETTE,zucchini_courgette,3301140600,zucchini_courgette,3301140600 +137,BERINGELA,EGGPLANT,aubergine_eggplant,3301260000,aubergine_eggplant,3301260000 +985,LINHAS DE ÁGUA - ÁREA ÚTIL,ELEGIBLE LANDSCAPE FEATURES - WATER LINES,not_known_and_other,3399000000,not_known_and_other,3399000000 +210,POVOAMENTO DE EUCALIPTO,EUCALYPTUS PLANTATION,eucalyptus,3306050000,eucalyptus,3306050000 +163,POVOAMENTO AZINHEIRAS,EVERGREEN OAK PLANTATION,oak,3306060000,oak,3306060000 +089,POUSIO,FALLOWING/ INTERCROPPING (INTERRUPTED CULTIVATEN TO MAKE SOIL MORE FERTILE),fallow_land_not_crop,3301110000,fallow_land_not_crop,3301110000 +89,POUSIO,FALLOWING/ INTERCROPPING (INTERRUPTED CULTIVATEN TO MAKE SOIL MORE FERTILE),fallow_land_not_crop,3301110000,fallow_land_not_crop,3301110000 +085,FIGO,FIG,fig,3303010600,fig,3303010600 +173,ACEIRO FLORESTAL,FOREST FIREBREAKS,tree_wood_forest,3306000000,tree_wood_forest,3306000000 +293,ALHO FRANCÊS,FRENCH GARLIC,garlic,3301220200,garlic,3301220200 +245,ALHO,GARLIC,garlic,3301220200,garlic,3301220200 +254,COUVE,GREEN CABBAGE,brassica_oleracea_cabbage,3301210200,brassica_oleracea_cabbage,3301210200 +139,BOSQUETES,groves,tree_wood_forest,3306000000,tree_wood_forest,3306000000 +116,AVELÃ,HAZELNUT,hazelnuts_hazel,3303030200,hazelnuts_hazel,3303030200 +982,CABECEIRAS CULT. PERMANENTES - ÁREA ÚTIL,Headlands of permanent crops - useful area,not_known_and_other,3399000000,permanent_crops_perennial,3303000000 +124,KIWI,KIWI,kiwi,3303010700,kiwi,3303010700 +097,LIMÃO,LEMON,citrus_plantations,3303040000,citrus_plantations,3303040000 +244,ALFACE,LETTUCE,salads_lettuce_leaf_vegetables,3301310000,salads_lettuce_leaf_vegetables,3301310000 +914,ELEMENTO LINEAR SEBE OU CORTA-VENTO-ÁREA ÚTIL,Linear element hedge or windbreak,not_known_and_other,3399000000,wire_bush,3303080700 +924,ELEMENTO LINEAR EM ORIZICULTURA-ÁREA ÚTIL,Linear element in rice cultivation - useful area,rice,3301010700,rice,3301010700 +724,ELEMENTO LINEAR ARROZ (NÃO ÚTIL-COMP. MAA),Linear element RICE (COMP. MAA),rice,3301010700,rice,3301010700 +044,LUZERNA,LUCERNE,alfalfa_lucerne,3301090301,alfalfa_lucerne,3301090301 +047,TREMOÇO,LUPINE,sweet_lupins,3301020700,sweet_lupins,3301020700 +240,TREMOCILHA,Lupinus luteus,sweet_lupins,3301020700,sweet_lupins,3301020700 +205,MELÃO,MELON,melon,3301140300,melon,3301140300 +170,POVOAMENTO F MISTO,MIXED Forest,tree_wood_forest,3306000000,tree_wood_forest,3306000000 +161,MISTO CULTURAS PERMANENTES,MIXED PERMANENT CULTURES,permanent_crops_perennial,3303000000,unspecified_permanent_crops,3303120000 +276,MOSTARDA,MUSTARD,mustard,3301210100,mustard,3301210100 +265,SUPERFÍCIE ARBUSTIVA NÃO PASTOREÁVEL,non-grazable shrub area,shrubberries_shrubs,3303080000,wire_bush,3303080700 +101,VIVEIROS,NURSERY,nurseries_nursery,3303070000,nurseries_nursery,3303070000 +112,NOZ,NUT,nuts,3303030000,nuts,3303030000 +165,POVOAMENTO MISTO QUERCUS(SOB.AZENH.CARVAL/NEGRAL),oak MIXED SETTLEMENT (UNDER AZENH.CARVAL/NEGRAL),oak,3306060000,oak,3306060000 +005,AVEIA,OAT,oats,3301010500,oats,3301010500 +083,OLIVAL,OLIVE VALLEY,olive_plantations,3303050000,olive_plantations,3303050000 +248,CEBOLA,ONION,onions,3301220400,onions,3301220400 +096,LARANJA,ORANGE,citrus_plantations,3303040000,citrus_plantations,3303040000 +091,FLORES E PLANTAS ORNAMENTAIS,ORNAMENTAL FLOWERS AND PLANTS,flowers_ornamental_plants,3301080000,flowers_ornamental_plants,3301080000 +026,OUTROS CEREAIS,OTHER CEREALS,unspecified_cereals,3301011500,other_cereals,3301019900 +157,OUTROS CITRINOS,OTHER CITRUS FRUIT,citrus_plantations,3303040000,citrus_plantations,3303040000 +169,POVOAMENTO OUTRAS RESINOSAS,OTHER CONIFEROUS FORESTS,other_tree_wood_forest,3306990000,tree_wood_forest,3306000000 +086,OUTROS FRUTOS SECOS,Other Dried Fruits,unspecified_orchards_fruits,3303019800,orchards_fruits,3303010000 +148,OUTRAS LEGUMINOSAS SECAS,OTHER DRIED VEGETABLES,fresh_vegetables,3301070000,fresh_vegetables,3301070000 +174,OUTRAS SUPERFÍCIES FLORESTAIS,OTHER FOREST SURFACES,tree_wood_forest,3306000000,tree_wood_forest,3306000000 +195,OUTRAS FRUTOS FRESCOS,OTHER FRESH FRUIT,orchards_fruits,3303010000,orchards_fruits,3303010000 +156,OUTRAS OLEAGINOSAS,OTHER OILSEEDS,oilseed_crops,3301060800,oilseed_crops,3301060800 +060,OUTRAS CULTURAS PERMANENTES,OTHER PERMANENT CROPS,other_permanent_crops_plantations,3303990000,other_permanent_crops_plantations,3303990000 +117,OUTROS PEQUENOS FRUTOS,OTHER SMALL FRUITS,orchards_fruits,3303010000,orchards_fruits,3303010000 +102,OUTROS FRUTOS SUB-TROPICAIS,OTHER SUB-TROPICAL FRUITS,orchards_fruits,3303010000,orchards_fruits,3303010000 +307,OUTRAS CULTURAS TEMPORÁRIAS,OTHER TEMPORARY CROPS,other_arable_land_crops,3301990000,other_arable_land_crops,3301990000 +280,PASTAGENS ARBUSTIVAS,PASTURE WITH BUSHES,pasture_meadow_grassland_grass,3302000000,pasture_meadow_grassland_grass,3302000000 +013,ERVILHA,PEA,peas,3301020600,peas,3301020600 +094,PÊSSEGO,PEACH,peach,3303011100,peach,3303011100 +130,AMENDOIM,PEANUT,arachis,3301090302,nuts,3303030000 +093,PERA,PEAR,pears,3303011200,pears,3303011200 +078,PIMENTO,PEPPER,bell_pepper_paprika,3301300100,piper_pepper,3301061228 +143,PASTAGENS PERMANENTES,PERMANENT PASTURES,pasture_meadow_grassland_grass,3302000000,pasture_meadow_grassland_grass,3302000000 +208,DIOSPIRO,Persimmon,orchards_fruits,3303010000,orchards_fruits,3303010000 +135,PINHÃO,PINE NUTS,other_tree_wood_forest,3306990000,nuts,3303030000 +168,POVOAMENTO DE PINHEIRO MANSO,PINE TREES PLANTATION,other_tree_wood_forest,3306990000,tree_wood_forest,3306000000 +134,PISTACIOS,PISTACES,pistachio,3303030400,pistachio,3303030400 +167,POVOAMENTO OUTRAS FOLHOSAS,PLANTATION OF OTHER HARDWOODS,tree_wood_forest,3306000000,tree_wood_forest,3306000000 +108,AMEIXA,PLUM,plums,3303011300,plums,3303011300 +209,ROMÃ,POMEGRANATE,pomegranate,3303011400,pomegranate,3303011400 +285,FIGO DA INDIA,Prickly pear,other_permanent_crops_plantations,3303990000,fig,3303010600 +118,MARMELO,QUINCE,quinces,3303011500,quinces,3303011500 +264,COLZA,RAPESEED,rapeseed_rape,3301060400,rapeseed_rape,3301060400 +203,FRAMBOESA,RASPBERRY,raspberry_raspberries,3303021000,raspberry_raspberries,3303021000 +024,ARROZ,RICE,rice,3301010700,rice,3301010700 +125,GALERIA RIPÍCOLA,RIPARIAN GALLERY,not_known_and_other,3399000000,tree_wood_forest,3306000000 +003,CENTEIO,RYE,rye,3301010300,rye,3301010300 +067,AZEVEM,ryegrass,lolium_ryegrass,3301090205,lolium_ryegrass,3301090205 +287,SERRADELA,SERRADELA,serradella,3301084200,legumes_harvested_green,3301090300 +008,SORGO,SORGHUM,millet_sorghum,3301010900,millet_sorghum,3301010900 +211,GINJA,sour cherry,cherry_cherries,3303010400,cherry_cherries,3303010400 +305,ESPINAFRE,SPINACH,spinach,3301310800,spinach,3301310800 +204,MORANGO,STRAWBERRY,strawberries,3301130000,strawberries,3301130000 +131,MEDRONHEIRO,Strawberry Tree,orchards_fruits,3303010000,strawberries,3301130000 +017,GIRASSOL,SUNFLOWER,sunflower,3301060500,sunflower,3301060500 +127,BATATA DOCE,SWEET POTATO,sweet_potatoes,3301040000,sweet_potatoes,3301040000 +033,TOMATE,TOMATO,tomato,3301280000,tomato,3301280000 +007,TRITICALE,TRITICALE,triticale,3301010800,triticale,3301010800 +233,NABO,TURNIP,turnips,3301290800,turnips,3301290800 +277,NABIÇA,Turnip greens,turnips,3301290800,turnips,3301290800 +034,VINHA,VINEYARD,vineyards_wine_vine_rebland_grapes,3303060000,vineyards_wine_vine_rebland_grapes,3303060000 +242,AGRIÃO,watercress,cress,3301210300,cress,3301210300 +231,MELANCIA,WATERMELON,watermelon,3301140500,watermelon,3301140500 +001,TRIGO,WHEAT,common_soft_wheat,3301010100,common_soft_wheat,3301010100 +286,GROSELHA,Redcurrant,redcurrant,3303021100,redcurrant,3303021100 +155,TANGERINA,Tangerine,citrus_plantations,3303040000,citrus_plantations,3303040000 +925,GALERIA RIPÍCOLA - ÁREA ÚTIL,Riparian Gallery - Usable Area,not_known_and_other,3399000000,not_known_and_other,3399000000 +269,MARACUJÁ,Passion fruit,orchards_fruits,3303010000,orchards_fruits,3303010000 +119,NESPERA,Loquat,medlar_loquat,3303010800,medlar_loquat,3303010800 +009,LINHO,Linen,flax_linen,3301060701,flax_linen,3301060701 +301,CULTURAS EM HIDROPONIA,Hydroponic crops,not_known_and_other,3399000000,not_known_and_other,3399000000 +300,TALUDE DA VINHA,Vineyard,vineyards_wine_vine_rebland_grapes,3303060000,vineyards_wine_vine_rebland_grapes,3303060000 +234,PEPINO,Cucumber,cucumber_pickle,3301140100,cucumber_pickle,3301140100 +232,MELOA,Melon,melon,3301140300,melon,3301140300 +939,EP-BOSQUETE E FORMAÇÕES RELIQUIAIS-ÁREA ÚTIL,Usable Area,tree_wood_forest,3306000000,tree_wood_forest,3306000000 +128,INHAME,Yam,unspecified_root_vegetables,3301299800,unspecified_root_vegetables,3301299800 +989,ELP VALA DE REGA OU DRENAGEM - ÁREA ÚTIL,Usable Area,not_known_and_other,3399000000,not_known_and_other,3399000000 +123,LIMA,LIME,citrus_plantations,3303040000,citrus_plantations,3303040000 +294,TALHADIA DE CURTA ROTAÇÃO,SHORT ROTATION COPPICE,tree_wood_forest,3306000000,tree_wood_forest,3306000000 +309,ESPARGOS,ASPARAGUS,fresh_vegetables,3301070000,fresh_vegetables,3301070000 +319,FEIJÃO FRADE,COWPEA,beans,3301020100,beans,3301020100 +986,ELP CHARCAS E LAGOAS - ÁREA ÚTIL,ELP PONDS AND LAGOONS - USABLE AREA,not_known_and_other,3399000000,not_known_and_other,3399000000 +725,SUPERFICIE NÃO AGRICOLA,NON-AGRICULTURAL SURFACE,not_known_and_other,3399000000,not_known_and_other,3399000000 +241,ABÓBORAS E ABOBORINHAS,PUMPKINS AND COURGETTES,pumpkin_squash_gourd,3301140400,pumpkin_squash_gourd,3301140400 +142,PRADOS TEMPORÁRIOS,TEMPORARY MEADOWS,pasture_meadow_grassland_grass,3302000000,pasture_meadow_grassland_grass,3302000000 +321,CÁRTAMO,SAFFLOWER,oilseed_crops,3301060800,oilseed_crops,3301060800 +279,RÚCULA,ARUGULA,salads_lettuce_leaf_vegetables,3301310000,salads_lettuce_leaf_vegetables,3301310000 +311,ARAÇÁ,STRAWBERRY GUAVA,orchards_fruits,3303010000,orchards_fruits,3303010000 +299,GOIABA,GUAVA,orchards_fruits,3303010000,orchards_fruits,3303010000 +190,MACIÇOS OU FORMAÇÕES RELIQUIAIS OU NOTÁVEIS,RELICT OR REMARKABLE FORMATIONS,tree_wood_forest,3306000000,tree_wood_forest,3306000000 +048,ERVILHACA,VETCH,legumes_harvested_green,3301090300,legumes_harvested_green,3301090300 +310,GOJI,GOJI BERRY,orchards_fruits,3303010000,orchards_fruits,3303010000 +111,ALFARROBA,CAROB,orchards_fruits,3303010000,orchards_fruits,3303010000 +023,MILHO DOCE,SWEET CORN,grain_maize_corn_popcorn,3301010600,grain_maize_corn_popcorn,3301010600 +312,PITAIA,DRAGON FRUIT,orchards_fruits,3303010000,orchards_fruits,3303010000 +059,ALGODAO,COTTON,cotton,3301060700,cotton,3301060700 +268,GALERIA RIPICOLA FLORESTAL,RIPARIAN GALLERY FOREST,tree_wood_forest,3306000000,tree_wood_forest,3306000000 +058,CÂNHAMO,HEMP,hemp,3301060702,hemp,3301060702 +322,BAMBU,BAMBOO,tree_wood_forest,3306000000,tree_wood_forest,3306000000 +288,FESTUCA,FESCUE,pasture_meadow_grassland_grass,3302000000,pasture_meadow_grassland_grass,3302000000 +261,TANGERA,TANGERINE,citrus_plantations,3303040000,citrus_plantations,3303040000 +324,TRIGO-SARRACENO,BUCKWHEAT,other_cereals,3301019900,other_cereals,3301019900 +223,SABUGUEIRO (BAGA),ELDERBERRY,orchards_fruits,3303010000,orchards_fruits,3303010000 +298,MANGA,MANGO,orchards_fruits,3303010000,orchards_fruits,3303010000 +314,QUINOA,QUINOA,other_cereals,3301019900,other_cereals,3301019900 +302,CULTURAS SEM SOLO,SOILLESS CULTURES,not_known_and_other,3399000000,not_known_and_other,3399000000 +035,LUPULO,HOPS,aromatic_medicinal_culinary_plants_spices_herbs,3301061200,aromatic_medicinal_culinary_plants_spices_herbs,3301061200 +315,LENTILHA,LENTIL,beans,3301020100,beans,3301020100 +316,CHICHARO,GRASS PEA,beans,3301020100,beans,3301020100 +304,TRIGO SPELTA,SPELT WHEAT,common_soft_wheat,3301010100,common_soft_wheat,3301010100 +987,ELP MURO DE PEDRA POSTA - ÁREA ÚTIL,ELP DRY STONE WALL - USABLE AREA,not_known_and_other,3399000000,not_known_and_other,3399000000 +289,PANASCO,HALFA GRASS,pasture_meadow_grassland_grass,3302000000,pasture_meadow_grassland_grass,3302000000 +151,ANONA,CHERIMOYA,orchards_fruits,3303010000,orchards_fruits,3303010000 +313,PHYSALIS,PHYSALIS,orchards_fruits,3303010000,orchards_fruits,3303010000 +325,MILHO PAINÇO,MILLET,millet_sorghum,3301010900,millet_sorghum,3301010900 +290,BROMUS,BROME GRASS,pasture_meadow_grassland_grass,3302000000,pasture_meadow_grassland_grass,3302000000 +115,CHA,TEA,aromatic_medicinal_culinary_plants_spices_herbs,3301061200,aromatic_medicinal_culinary_plants_spices_herbs,3301061200 +018,SOJA,SOYBEAN,oilseed_crops,3301060800,oilseed_crops,3301060800 +988,ELP PATRIMÓNIO CULTURAL - ÁREA ÚTIL,ELP CULTURAL HERITAGE - USABLE AREA,not_known_and_other,3399000000,not_known_and_other,3399000000 +133,BANANA,BANANA,orchards_fruits,3303010000,orchards_fruits,3303010000 +284,PAPAIA,PAPAYA,orchards_fruits,3303010000,orchards_fruits,3303010000 +237,RÁBANO,RADISH,unspecified_root_vegetables,3301299800,unspecified_root_vegetables,3301299800 +292,ANAFA,ANAFA,pasture_meadow_grassland_grass,3302000000,pasture_meadow_grassland_grass,3302000000 +327,CANÓNIGOS,LAMB'S LETTUCE,salads_lettuce_leaf_vegetables,3301310000,salads_lettuce_leaf_vegetables,3301310000 +323,FUNCHO,FENNEL,aromatic_medicinal_culinary_plants_spices_herbs,3301061200,aromatic_medicinal_culinary_plants_spices_herbs,3301061200 +238,RUTABAGA,RUTABAGA,turnips,3301290800,turnips,3301290800 +308,CARQUEJA,BROOM SHRUB,shrubberries_shrubs,3303080000,wire_bush,3303080700 diff --git a/tests/test_convert.py b/tests/test_convert.py index d3ce8c7e..10671ea1 100644 --- a/tests/test_convert.py +++ b/tests/test_convert.py @@ -32,6 +32,7 @@ "nl", "nl_block", "pt", + "pt#2025", "dk", "be_wal", "se", @@ -122,20 +123,23 @@ def _input_files(converter, *names): def test_converter(load_ec_mock, capsys, tmp_parquet_file, converter): from fiboa_cli import Registry # noqa + # "#