Csv output de:regionalschlüssel and NUTS 3 classification

I have a question and I can’t find an answer for hours now…

I changed this code to select all regions with NUTS 3 classifications. But in the output CSV it displays the regional keys. Since the filter is for NUTS3 keys starting with “DE” there should be a way to export these keys as well right?

An example:
NUTS 3 key Stuttgart: DE111
regional key Stuttgart: 08111 or 081110000000

for other regions it is 09 in the beginning, so 08 doesn’t equal DE and also the last 3 digits differ for some regions.

The ones exported right now are the regional keys and don’t start with “DE”

[out:csv( "de:regionalschluessel", name, total, nodes, ways, relations )][date:"2020-12-31T23:59:59Z"][timeout:20];

//All NUTS 3 regions in Germany

// Count the fuel stations in each area
  // Collect all Nodes, Ways and Relations wth amenity=fuel in the current area
  ( node(area.regio)[amenity=fuel];
  make count "de:regionalschluessel" = regio.set(t[ "de:regionalschluessel"]),
             name = regio.set(t["name"]),
             total = count(nodes) + count(ways) + count(relations),
             nodes = count(nodes),
             ways = count(ways),
             relations = count(relations);

5 posts - 2 participants

Read full topic

Ce sujet de discussion accompagne la publication sur https://community.openstreetmap.org/t/csv-output-de-regionalschlussel-and-nuts-3-classification/104971