specs icon indicating copy to clipboard operation
specs copied to clipboard

Geopoint coordinates: integer or floating-point

Open iSnow opened this issue 6 years ago • 0 comments

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).

iSnow avatar Dec 11 '19 14:12 iSnow