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

Geopoint coordinates: integer or floating-point #655

Closed
iSnow opened this issue Dec 11, 2019 · 1 comment · Fixed by frictionlessdata/datapackage-v2-draft#14
Closed

Geopoint coordinates: integer or floating-point #655

iSnow opened this issue Dec 11, 2019 · 1 comment · Fixed by frictionlessdata/datapackage-v2-draft#14

Comments

@iSnow
Copy link
Contributor

iSnow commented Dec 11, 2019

in table-schema.md, the definition of a geopoint field is:

geopoint

The field contains data describing a geographic point.

format:

  • default: A string of the pattern "lon, lat", where lon is the longitude
    and lat is the latitude (note the space is optional after the ,). E.g. "90, 45".
  • array: A JSON array, or a string parsable as a JSON array, of exactly two items, where each item is a number, and the first item is lon and the second
    item is lat e.g. [90, 45]
  • object: A JSON object with exactly two keys, lat and lon and each value is a number e.g. {"lon": 90, "lat": 45}

The example uses integer coordinates (90 and 45 respectively), but from every GIS API and library, it seems that it should support double-precision floating-point values.

I understand this is not a big issue for Python and JS, but strongly typed languages like Java make a distinction here; in fact the tableschema-java library used integers - I proactively switched this to doubles, but guidance would be appreciated (and maybe make one coordinate float in the example).

@roll roll added this to Specifications in Frictionless General Dec 17, 2019
@roll roll added this to the v2 milestone Jan 3, 2024
@nichtich
Copy link
Contributor

nichtich commented Jan 4, 2024

JSON does not differentiate between integer and fixed point numbers, so I don't see this as an issue with the specification.
We could change the example to also include numbers with fractional parts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Frictionless General
  
Specifications
Development

Successfully merging a pull request may close this issue.

3 participants