0

Is there a way to calculate the median of several standard land values from the following WMS service of a given map extent? I want to use it as a dynamic text via expression. I am using the Atlas Tool.

For example: 4 Zones in a given map extent (50, 60, 60 and 80 Euro per sqm) result in a median of 60 in my may Layout.

https://geodatenkatalog.frankfurt.de/geonetwork/srv/ger/catalog.search#/metadata/b3c48b5b-54d7-46b6-b703-5a2d1b4bdeec/formatters/customed-xsl-view?root=div&view=gdiffm

I have tried the following, but without success:

aggregate( 
layer:='Bodenrichtwert_Bodenrichtwertzone_34cc603d_9bb9_45d5_a63f_0f0fdf8fbaf2',
aggregate:=mean("bodenrichtwert"),
expression:=$id,
filter:=within($geometry,@atlas_geometry)
        )

1 Answer 1

1

It won't be possible, because you can't get at the full set of underlying data values though a single request via the WMS interface; you can only get data from a point location (through a GetFeatureInfo request).

For example a GeoJSON GetFeatureInfo request at pixel location i=100,j=100 in your example GetMap request gives:

  {
    "type": "FeatureCollection",
    "features": [
      {
        "type": "Feature",
        "geometry": null,
        "properties": {
          "OBJECTID": "3129",
          "gemeindename": "Frankfurt am Main",
          "bodenrichtwert": "21",
          "stichtag": "01.01.2022",
          "bodenrichtwertzoneName": "1630",
          "entwicklungszustand": "Fläche der Land- und Forstwirtschaft",
          "beitragsAbgeaberechtlicherZustand": "Null",
          "nutzungart": "Erwerbsgartenanbaufläche",
          "nutzungergaenzung": "Null",
          "gutachterausschussbezeichnung": "Gutachterausschuss für Immobilienwerte für den Bereich der Stadt Frankfurt am Main",
          "VERF": "Null",
          "WNUM": "16301252",
          "wertrelevanteGeschossflaechenzahl": "Null"
        },
        "layerName": "Bodenrichtwertzone"   
      }
    ]
  }

Sometimes there is a complementary WFS service to allow data access, but that is not available in this case

1
  • Thank you very much.
    – user215393
    Nov 22, 2022 at 12:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.