Coder Social home page Coder Social logo

Feature attribute metadata? about emodnetwfs HOT 7 CLOSED

emodnet avatar emodnet commented on August 15, 2024
Feature attribute metadata?

from emodnetwfs.

Comments (7)

salvafern avatar salvafern commented on August 15, 2024

Hi @annakrystalli

You can get some info about the attributes using a DescribeFeatureType request. But this info is very limited, I don't think this is what you are looking for. It seems it is not possible to describe the attributes (at least using geoserver).

https://ows.emodnet-humanactivities.eu/wfs?service=wfs&request=DescribeFeatureType&version=2.0.0&typeNames=emodnet:windfarms

<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:emodnet="www.emodnet.co.uk" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="www.emodnet.co.uk">
  <xsd:import namespace="http://www.opengis.net/gml/3.2" schemaLocation="https://ows.emodnet-humanactivities.eu/geoserver/schemas/gml/3.2.1/gml.xsd"/>
  <xsd:complexType name="windfarmsType">
    <xsd:complexContent>
      <xsd:extension base="gml:AbstractFeatureType">
        <xsd:sequence>
          <xsd:element maxOccurs="1" minOccurs="0" name="country" nillable="true" type="xsd:string"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="n_turbines" nillable="true" type="xsd:decimal"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="power_mw" nillable="true" type="xsd:decimal"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="status" nillable="true" type="xsd:string"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="start" nillable="true" type="xsd:string"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="dist_coast" nillable="true" type="xsd:decimal"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="notes" nillable="true" type="xsd:string"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="ljstatus" nillable="true" type="xsd:string"/>
          <xsd:element maxOccurs="1" minOccurs="0" name="the_geom" nillable="true" type="gml:GeometryPropertyType"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="windfarms" substitutionGroup="gml:AbstractFeature" type="emodnet:windfarmsType"/>
</xsd:schema>

Although in this specific layer I can see there is some information in the abstract, but of course this is not machine-readable.

library(EMODnetWFS)

wfs <- emodnet_init_wfs_client("human_activities")
#> Loading ISO 19139 XML schemas...
#> Loading ISO 19115 codelists...
#> v WFS client created succesfully
#> i Service: 'https://ows.emodnet-humanactivities.eu/wfs'
#> i Version: '2.0.0'

windfarms_info <- emodnet_get_layer_info(wfs, layers = "windfarms")

cat(windfarms_info$abstract)
#> The database on offshore wind farms in the EU was created in 2014 by CETMAR for the European Marine Observation and Data Network (EMODnet). It is the result of the aggregation and harmonization of datasets provided by several sources from all across the EU. It is updated every year, and is available for viewing and download on EMODnet - Human Activities web portal (www.emodnet-humanactivities.eu). The database contains points and/or (where available) polygons representing offshore wind farms in the following countries: Belgium, Denmark, Estonia, Finland, France, Germany, Greece, Ireland, Italy, Latvia, Lithuania, Netherlands, Norway, Poland, Portugal, Spain, Sweden and United Kingdom. Each point has the following attributes (where available): Name, Nº of turbines, Status (Authorised, Operational, Planned, Under Construction), Country, Year, Website, Power (MW), Distance to coast (metres), Perimeter (kilometres), Surface (square kilometres) only for polygons. The distance to coast from polygon centroid or point has been calculated using the Reference Coordinates System with identifier EPSG: 3034 - Single CRS for all Europe (Used for conformal mapping at scales of 1:500,000 and smaller). Compared with the previous version this new version has been updated and reviewed.

Created on 2021-08-23 by the reprex package (v2.0.0)

I'll let you know if I learn something else!

from emodnetwfs.

annakrystalli avatar annakrystalli commented on August 15, 2024

Thanks @salvafern . I've found the DescribeFeatureType() method and written a function in EMODnetWFS to print it (see layer_attribute_descriptions() in #17) so users can inspect attributes to help develop appropriate filters. However, it still doesn't give enough detailed information. I would expect at the very least a longer description of each feature attribute, so it is very clear what it is, and units if applicable. What do you think?

I know the human activities service is not one you manage. But I imagine it's the same for the Biology data?

from emodnetwfs.

annakrystalli avatar annakrystalli commented on August 15, 2024

DOH!! Sorry Salva. Just looked more closely and seen that indeed there is useful info (including units) in the abstract. You are right it's not machine readable but at least it is available. I'll have a look at a few more abstracts too. If there is a way to get machine readable info it would indeed be better though.

from emodnetwfs.

salvafern avatar salvafern commented on August 15, 2024

But of course these descriptions are just free text that someone wrote - so for the wind farms we have the units but there will be cases that won't describe as much.

In biology we use geoserver to serve data as WFS/WMS etc (see geo.vliz.be). I don't see any option in geoserver to describe the attributes in a more structured way than the abstract. I'll keep looking for ti anyways but it is likely that these descriptions don't exist!

An alternative would be to print as a message() the layer abstract when you load it? Make more obvious to the user what is the dataset they are looking at.

from emodnetwfs.

salvafern avatar salvafern commented on August 15, 2024

I asked @bart-v and he suggested we could look into geonetwork and CSW (see list of services in this link). But this is probably not completely structured - not machine readable yet. Not all the EMODnet lots have this service readily available.

from emodnetwfs.

maelle avatar maelle commented on August 15, 2024

I think this is related to #72

from emodnetwfs.

salvafern avatar salvafern commented on August 15, 2024

I think this is done from 1d155af with layer_attributes_get_names() and layer_attribute_inspect(). Will close for now

from emodnetwfs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.