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

Add missing type and range checks to GlobeCoordinateValue #53

Merged
merged 1 commit into from
May 8, 2017

Conversation

thiemowmde
Copy link
Contributor

@thiemowmde thiemowmde commented Nov 10, 2015

This patch includes two relevant changes to the classes behavior:

  • The precision parameter's range is checked to be between -360 and +360. This is identical to the allowed range of the coordinate itself. This partly fixes Latitude +/- 360? #68.
  • The globe is not allowed to be an empty string any more.

@thiemowmde
Copy link
Contributor Author

thiemowmde commented May 4, 2017

Here is proof this change is fine:

SELECT ?x ?y ?precision WITH {
  SELECT ?precision WHERE {
    [] wikibase:geoPrecision ?precision.
    FILTER(?precision >= 180).
  }
  LIMIT 10
} AS %results WHERE {
  INCLUDE %results.
  ?x ?y [ wikibase:geoPrecision ?precision ].
}

When we run this today we found:

@bekh6ex bekh6ex merged commit 4564ad5 into master May 8, 2017
@thiemowmde thiemowmde deleted the geoRange branch May 8, 2017 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Latitude +/- 360?
3 participants