-
Notifications
You must be signed in to change notification settings - Fork 1
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
Geo coordinates must be floats #369
Comments
I noticed that this issue states that the precision should be 4 or more decimal places, but the OpenActive spec specifies 2 or more decimal places. |
And to mix that up a little more, there is already a precision rule that covers latitude to 3 decimal places. |
I was just about to comment on this issue @Lathrisk but you beat me to it with your discovery of the precision rule - the issue itself is in fact largely redundant, though hopefully still a good academic exercise to get your head into the codebase.
The reason this is a notice and not an error or warning is that some data does actually legitimately have 1, 2 or 3 decimal places. Limited historical context: openactive-archive/developer-microsite#39 A real example:
Data model reference: "latitude": {
"fieldName": "latitude",
"sameAs": "https://schema.org/latitude",
"requiredType": "https://schema.org/Number",
"minDecimalPlaces": 3,
"example": 51.522338,
"description": [
"The latitude of a location. For example 51.522338 (WGS 84)."
]
},
"longitude": {
"fieldName": "longitude",
"sameAs": "https://schema.org/longitude",
"requiredType": "https://schema.org/Number",
"minDecimalPlaces": 3,
"example": -0.083437,
"description": [
"The longitude of a location. For example -0.083437 (WGS 84)."
]
} |
Thanks for the update, Nick. That makes sense. It's been a good introduction to the validator, the spec, and the models! |
Closing this based on the above |
geo.latitude
andgeo.longitude
need to be expressed as floats with a minimum precision of four decimal places. They MUST NOT be rounded to integers.The text was updated successfully, but these errors were encountered: