Skip to content
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

DataPackage: Add "references" property in resource #58

Closed
maesbri opened this issue Jun 20, 2019 · 7 comments
Closed

DataPackage: Add "references" property in resource #58

maesbri opened this issue Jun 20, 2019 · 7 comments
Assignees
Labels
BB: Data Dashboard Data Dashboard Building Block BB: Data Package Tool Data Package Export and Import Tool Building Block question Further information is requested

Comments

@maesbri
Copy link

maesbri commented Jun 20, 2019

@fgeyer16 , @patrickkaleta I need to create a "references" property (in the dp_resource object) which is an array of unlimited number of subarrays (which have a lenght = 3), any idea on how can I model this in Drupal?

For the moment it would be fine if we cannot limit the length of the sub-arrays. The content of the subarrays is just text.

See below an example with 2 sub-arrays:
"references": [
["@mapview:ogc:wms", "#/path", "https://clarity.meteogrid.com/geoserver/Local_Effects/wms?service=WMS&version=1.1.0&request=GetMap&layers=Local_Effects:LE_Tmrt_FrequentEvent_1971-2000_observations_Naples&bbox=4647500,1947000,4720500,2008000&width=725&height=768&srs=EPSG:3035&format=image/png"],
["@resource:hazard-event:heat-wave-duration:$temperature=28:$duration=6", "#/resources/[name='hazard_event-HW.6d_28C']"]
]

@maesbri maesbri self-assigned this Jun 20, 2019
@p-a-s-c-a-l p-a-s-c-a-l added the question Further information is requested label Jun 24, 2019
@p-a-s-c-a-l p-a-s-c-a-l added this to To do in T1.3 Climate Services Co-creation via automation Jun 24, 2019
@p-a-s-c-a-l p-a-s-c-a-l added this to the D1.4 CLARITY CSIS v2 milestone Jun 24, 2019
@therter
Copy link

therter commented Jun 25, 2019

@maesbri Have you already changed the url property for the map view? Because now I retrieve an array instead of a string when I query the dp_resource objects.

@maesbri
Copy link
Author

maesbri commented Jun 25, 2019

Hmm, it has been changed but I think it was @patrickkaleta . However, this doesn't correspond to this issue and in any case, if I recall correctly, my indication was that the "path" property (within the resource object) is the one to be converted into an array (it is now).

Anyhow, just to let you know that in parallel I am implementing the "references" properties, which will replace among others the "mapview" one. I'll let you know when it is ready so you can test it (and later on I will remove the "obsolete" properties, but of course, having copied their contents to the new properties)

@maesbri
Copy link
Author

maesbri commented Jun 25, 2019

I managed to implement this property

@p-a-s-c-a-l
Copy link
Member

How is the current DP Implementation in Drupal affected by the references property?
Which properties will be replaced by references? path? mapview? what else?

@maesbri
Copy link
Author

maesbri commented Jun 28, 2019

The "references" property makes obsolete the following properties:

  • mapview
  • hazardEvent

the "path" property stays as it is (it is part of the original Frictionless Data Package specification).

With the references now we can describe things like:

"references": [
["@mapview:ogc:wms", "damage-class:population:d1", "https://service.emikat.at/geoserver/clarity/wms?service=WMS&version=1.1.0&request=GetMap&layers=clarity:view.2813&styles=DamageLevel1Q&bbox=4650500.0,1942000.0,4713000.0,1995500.0&width=768&height=657&srs=EPSG:3035&format=image/gif&cql_filter=HAZARD_EVENT='HW.6d_34C'"],
["@mapview:ogc:wms", "damage-class:population:d2", "https://service.emikat.at/geoserver/clarity/wms?service=WMS&version=1.1.0&request=GetMap&layers=clarity:view.2813&styles=DamageLevel2Q&bbox=4650500.0,1942000.0,4713000.0,1995500.0&width=768&height=657&srs=EPSG:3035&format=image/gif&cql_filter=HAZARD_EVENT='HW.6d_34C'"],
["@mapview:ogc:wms", "damage-class:population:d3", "https://service.emikat.at/geoserver/clarity/wms?service=WMS&version=1.1.0&request=GetMap&layers=clarity:view.2813&styles=DamageLevel3Q&bbox=4650500.0,1942000.0,4713000.0,1995500.0&width=768&height=657&srs=EPSG:3035&format=image/gif&cql_filter=HAZARD_EVENT='HW.6d_34C'"],
["@mapview:ogc:wms", "damage-class:population:d4", "https://service.emikat.at/geoserver/clarity/wms?service=WMS&version=1.1.0&request=GetMap&layers=clarity:view.2813&styles=DamageLevel4Q&bbox=4650500.0,1942000.0,4713000.0,1995500.0&width=768&height=657&srs=EPSG:3035&format=image/gif&cql_filter=HAZARD_EVENT='HW.6d_34C'"],
["@mapview:ogc:wms", "damage-class:population:d5", "https://service.emikat.at/geoserver/clarity/wms?service=WMS&version=1.1.0&request=GetMap&layers=clarity:view.2813&styles=DamageLevel5Q&bbox=4650500.0,1942000.0,4713000.0,1995500.0&width=768&height=657&srs=EPSG:3035&format=image/gif&cql_filter=HAZARD_EVENT='HW.6d_34C'"]
]

or

"references": [
["@mapview:ogc:wms", "#/path", "https://clarity.meteogrid.com/geoserver/Exposure/wms?service=WMS&version=1.1.0&request=GetMap&layers=Exposure:Population_mayor65_naples&bbox=4647500,1947000,4716000,2003000&width=725&height=768&srs=EPSG:3035&format=image/png"]
]
In this case, we are indicating that the data available in "path" has its mapview representation in the attached link (this would be also equivalent to:
["@mapview:ogc:wms", "vulnerability-class:population:age-group>65", "https://clarity.meteogrid.com/geoserver/Exposure/wms?service=WMS&version=1.1.0&request=GetMap&layers=Exposure:Population_mayor65_naples&bbox=4647500,1947000,4716000,2003000&width=725&height=768&srs=EPSG:3035&format=image/png"]
]

In addition, if we had a resource with multiple path values (imagine for instance a resource considered as a whole, but it is split in multiple files) we could have for instance something like this:
"references": [["@mapview:ogc:wms", "#/path[0]", "http://geoserver/wms....."],
["@mapview:ogc:wms", "#/path[1]", "http://geoserver/wms....."],
["@mapview:ogc:wms", "#/path[2]", "http://geoserver/wms....."]
]

With the references properties we can also make references to other resources within the Data Package (e.g., local effect resource pointing to the hazard-event to which is linked):
"references": [
["@resource:hazard-event:heat-wave-duration:$temperature=28:$duration=6", "#/resources/[name='hazard_event-HW.6d_28C']"]]

Finally, we can also refer to external metadata repository if we want to know more about it:
"references": [
["@metadata:ogc:cws", "#/path", "http://some-ip/catalog/cws..."]
]

@maesbri
Copy link
Author

maesbri commented Jun 28, 2019

btw, I use "@" to indicate what kind of reference we are providing (i.e., "@tag", "@resource", "@metadata", "@mapview"). If it is confusing then we might consider removing it

@maesbri
Copy link
Author

maesbri commented Jun 28, 2019

With respect to the "tags" property, it replaces the following individual properties:

  • service_type
  • resource_type
  • workflow_step
  • hazards
  • index
  • emissions_scenarios
  • elements_at_risk
  • vulnerability_classes
  • damage_classes

@p-a-s-c-a-l p-a-s-c-a-l added BB: Data Dashboard Data Dashboard Building Block BB: Data Package Tool Data Package Export and Import Tool Building Block labels Aug 19, 2019
@p-a-s-c-a-l p-a-s-c-a-l added this to To do in T4.3 Scenario Management via automation Oct 30, 2019
@p-a-s-c-a-l p-a-s-c-a-l moved this from To do to Done in T4.3 Scenario Management Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BB: Data Dashboard Data Dashboard Building Block BB: Data Package Tool Data Package Export and Import Tool Building Block question Further information is requested
Projects
No open projects
Development

No branches or pull requests

5 participants