Skip to content

Commit

Permalink
Merge pull request #552 from TOMP-WG/546-geometry-problem
Browse files Browse the repository at this point in the history
546 geometry problem
  • Loading branch information
edwinvandenbelt authored Jan 23, 2025
2 parents 2ec0920 + 52efee7 commit 553a740
Show file tree
Hide file tree
Showing 18 changed files with 67 additions and 33 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ OpenAPI 3.0 documentation is available at [Swaggerhub](https://app.swaggerhub.co
The Blueprint for an Transport Operator to Mobility-as-a-service Provider API is available at the [documentation page](https://github.com/TOMP-WG/TOMP-API/tree/master/documents).

How can I join the TOMP working group?
Join our [Slack space](https://join.slack.com/t/tomp-wg/shared_invite/zt-e3fftun7-qCs8FyXZPPy9pt_opyFw0QPlease) or contact Ayse ([email protected]) to be added to our mailing list and to receive invites for the working group meetings.
---

Join our [Slack space](https://join.slack.com/t/tomp-wg/shared_invite/zt-e3fftun7-qCs8FyXZPPy9pt_opyFw0QPlease) or contact Jed ([email protected]) to be added to our mailing list and to receive invites for the working group meetings.

The working group meetings take place every month with the goal to develop and specify a generic TOMP-API for use by Transport Operators and Mobility-as-a-service Providers. All reports can be found at the [documentation page](https://github.com/TOMP-WG/TOMP-API/tree/master/documents/working%20group%20reports).

Expand All @@ -28,5 +30,4 @@ Code of conduct

[Our code of conduct](https://github.com/TOMP-WG/TOMP-API/blob/master/code_of_conduct.md) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](code_of_conduct.md)


<img align="center" src="https://github.com/TOMP-WG/website/blob/master/wiki/images/TOMP%20WG%20grey.png" width="300">
95 changes: 64 additions & 31 deletions TOMP-API.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3017,60 +3017,93 @@ components:
meta:
type: object
additionalProperties: true

geojsonLine:
description: An array of WGS84 coordinate pairs
type: array
example: [[6.169639, 52.253279], [6.05623, 52.63473]]
items:
$ref: "#/components/schemas/geojsonPoint"
type: object
description: An array of WGS84 coordinate pairs
allOf:
- $ref: "#/components/schemas/geojsonGeometry"
- type: object
properties:
coordinates:
description: Geojson Coordinate
type: array
example: [ [ 6.169639, 52.253279 ], [ 6.05623, 52.63473 ] ]
items:
$ref: "#/components/schemas/basePoint"

geojsonPoint:
description: Geojson Coordinate
basePoint:
type: array
minItems: 2
maxItems: 2
items:
type: number
format: float
minimum: 0.0
example: [4.53432, 55.324523]
example: [ 4.53432, 55.324523 ]

geojsonPoint:
type: object
description: Geojson Coordinate
allOf:
- $ref: "#/components/schemas/geojsonGeometry"
- type: object
properties:
coordinates:
$ref: "#/components/schemas/basePoint"

geojsonPolygon:
type: object
description: geojson representation of a polygon. First and last point must be equal. See also https://geojson.org/geojson-spec.html#polygon and example https://geojson.org/geojson-spec.html#id4. The order should be lon, lat [[[lon1, lat1], [lon2,lat2], [lon3,lat3], [lon1,lat1]]], the first point should match the last point.
type: array
items:
$ref: "#/components/schemas/geojsonLine"
example: [[[1.0, 1.0], [0.0, 1.0], [0.0, 0.0], [1.0,0.0], [1.0, 1.0]]]
allOf:
- $ref: "#/components/schemas/geojsonGeometry"
- type: object
properties:
coordinates:
type: array
example: [[[1.0, 1.0], [0.0, 1.0], [0.0, 0.0], [1.0,0.0], [1.0, 1.0]]]
items:
type: array
items:
$ref: "#/components/schemas/basePoint"

geojsonMultiPolygon:
type: object
description: geojson representation of a multi polygon. See also https://geojson.org/geojson-spec.html#multipolygon
type: array
items:
$ref: "#/components/schemas/geojsonPolygon"
example: [[[[1.0, 1.0], [0.0, 1.0], [0.0, 0.0], [1.0,0.0], [1.0, 1.0]]]]
allOf:
- $ref: "#/components/schemas/geojsonGeometry"
- type: object
properties:
coordinates:
type: array
example: [[[[1.0, 1.0], [0.0, 1.0], [0.0, 0.0], [1.0,0.0], [1.0, 1.0]]]]
items:
type: array
items:
type: array
items:
$ref: "#/components/schemas/basePoint"

geojsonGeometry:
type: object
description: geoJSON geometry
required:
- type
description:
geoJSON geometry
- type
properties:
type:
type: string
enum:
- Point
- LineString
- Polygon
- MultiPolygon
coordinates:
oneOf:
- $ref: "#/components/schemas/geojsonPoint"
- $ref: "#/components/schemas/geojsonLine"
- $ref: "#/components/schemas/geojsonPolygon"
- $ref: "#/components/schemas/geojsonMultiPolygon"
enum:
- Point
- LineString
- Polygon
- MultiPolygon
discriminator:
propertyName: type
mapping:
Point: "#/components/schemas/geojsonPoint"
LineString: "#/components/schemas/geojsonLine"
Polygon: "#/components/schemas/geojsonPolygon"
MultiPolygon: "#/components/schemas/geojsonMultiPolygon"

information:
description: Information provided to end users
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 553a740

Please sign in to comment.