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

[Spec] Spatial Data Types #1878

Closed
John0x opened this issue May 6, 2020 · 1 comment
Closed

[Spec] Spatial Data Types #1878

John0x opened this issue May 6, 2020 · 1 comment

Comments

@John0x
Copy link
Contributor

John0x commented May 6, 2020

Spatial Data Types

Introduction

We should have a basic set of spatial data types built in. They can then be extended by other developers to add something like "asGeoJson" for example.

References

Proposal

All proposed types are open for discussion.

input CoordinateInput {
    x: Int!
    y: Int!
}

type Coordinate {
    x: Int!
    y: Int!
}
"----------------------------------------------------------------"
input PointInput {
  srid: Int
  coordinate: CoordinateInput!
}

type Point {
  srid: Int!
  coordinate: Coordinate!
}
"----------------------------------------------------------------"
input LineStringInput {
  srid: Int
  coordinates: [CoordinateInput!]!
}

type LineString {
  srid: Int!
  coordinates: [Coordinate!]!
}
"----------------------------------------------------------------"
input PolygonInput {
  srid: Int
  coordinates: [[CoordinateInput!]]!
}

type Polygon {
  srid: Int!
  coordinates: [[Coordinate!]]!
}
"----------------------------------------------------------------"
input MultiPointInput {
  srid: Int
  coordinates: [CoordinateInput!]!
}

type MultiPoint {
  srid: Int!
  coordinates: [Coordinate!]!
}
"----------------------------------------------------------------"
input MultiLineStringInput {
  srid: Int
  coordinates: [[CoordinateInput!]]!
}

type MultiLineString {
  srid: Int!
  coordinates: [[Coordinate!]]!
}
"----------------------------------------------------------------"
input MultiPolygonInput {
  srid: Int
  coordinates: [[[CoordinateInput!]]]!
}

type MultiPolygon {
  srid: Int!
  coordinates: [[[Coordinate!]]]!
}

This would almost be like GeoJson:
https://medium.com/@sumit.arora/what-is-geojson-geojson-basics-visualize-geojson-open-geojson-using-qgis-open-geojson-3432039e336d

@steveoh
Copy link
Contributor

steveoh commented Jun 4, 2020

Should this have been closed with #1870

@John0x John0x closed this as completed Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants