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

Layer definition of JRC is unclear #51

Closed
matthiasschaub opened this issue Jun 9, 2021 · 1 comment · Fixed by #503
Closed

Layer definition of JRC is unclear #51

matthiasschaub opened this issue Jun 9, 2021 · 1 comment · Fixed by #503
Labels

Comments

@matthiasschaub
Copy link
Collaborator

  filter: |
    power=plant
  ratio_filter: |
    power=plant and power=* and name=*

-> doesn't power=plant invalidate power=*? So the difference between the filters is that the second one only returns named powerplants. The description gives no indication of whether this is the intended behavior.

@joker234
Copy link
Member

joker234 commented Jul 2, 2021

Yes you're right. See this exemplary query:

% curl -X POST https://api.ohsome.org/v1/elements/count/ratio -d "bboxes=-180,-90,180,90" -d "filter=power=plant" -d "filter2=power=plant and power=* and name=*"
{
  "attribution" : {
    "url" : "https://ohsome.org/copyrights",
    "text" : "© OpenStreetMap contributors"
  },
  "apiVersion" : "1.5.0",
  "ratioResult" : [ {
    "timestamp" : "2021-06-28T09:00:00Z",
    "value" : 39314.0,
    "value2" : 23156.0,
    "ratio" : 0.589001
  } ]
}

% curl -X POST https://api.ohsome.org/v1/elements/count/ratio -d "bboxes=-180,-90,180,90" -d "filter=power=plant" -d "filter2=power=plant and name=*" 
{
  "attribution" : {
    "url" : "https://ohsome.org/copyrights",
    "text" : "© OpenStreetMap contributors"
  },
  "apiVersion" : "1.5.0",
  "ratioResult" : [ {
    "timestamp" : "2021-06-28T09:00:00Z",
    "value" : 39314.0,
    "value2" : 23156.0,
    "ratio" : 0.589001
  } ]
}

I would assume that JRC wants the ratio of power plants with a name, so power=plant and name=* should be sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants