diff --git a/data/output/openapi.yaml b/data/output/openapi.yaml index e25dbe1dc..73c958285 100644 --- a/data/output/openapi.yaml +++ b/data/output/openapi.yaml @@ -830,7 +830,7 @@ paths: examples: - Waiting for first sync with TUMonline tags: - - core + - calendar '/api/locations/{id}/preview': get: operationId: previews @@ -901,6 +901,51 @@ paths: - Not found tags: - maps + /api/maps/indoor: + get: + operationId: list-indoor-maps + summary: Lists indoor maps in bounding box + description: Returns all the available maps for a given bbox + parameters: + - name: bbox + in: query + description: 'Bounding box according to https://datatracker.ietf.org/doc/html/rfc7946#section-5' + required: true + schema: + type: string + pattern: '-?[\d]+.[\d]+,-?[\d]+.[\d]+,-?[\d]+.[\d]+,-?[\d]+.[\d]+' + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/RemoteMap' + tags: + - maps + '/api/maps/indoor/{id}': + get: + operationId: get-indoor-map + summary: Get indoor features + description: Get all features of a certain indoor map + parameters: + - name: id + in: path + description: id of the map returned by prior listing + required: true + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/FeatureCollection' + tags: + - maps /api/feedback/get_token: post: operationId: get_token @@ -1290,6 +1335,258 @@ paths: - health components: schemas: + RemoteMap: + type: object + properties: + name: + type: string + path: + type: string + required: + - name + - path + GeoJsonObject: + description: | + GeoJSon object The coordinate reference system for all GeoJSON coordinates is a geographic coordinate reference system, using the World Geodetic System 1984 (WGS 84) datum, with longitude and latitude units of decimal degrees. This is equivalent to the coordinate reference system identified by the Open Geospatial Consortium (OGC) URN An OPTIONAL third-position element SHALL be the height in meters above or below the WGS 84 reference ellipsoid. In the absence of elevation values, applications sensitive to height or depth SHOULD interpret positions as being at local ground or sea level. + type: object + properties: + type: + type: string + enum: + - Feature + - FeatureCollection + - Point + - MultiPoint + - LineString + - MultiLineString + - Polygon + - MultiPolygon + - GeometryCollection + bbox: + description: | + A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. + type: array + items: + type: number + discriminator: + propertyName: type + externalDocs: + url: 'https://tools.ietf.org/html/rfc7946#section-3' + required: + - type + Geometry: + description: | + Abstract type for all GeoJSon object except Feature and FeatureCollection + allOf: + - $ref: '#/components/schemas/GeoJsonObject' + - type: object + properties: + type: + type: string + enum: + - Point + - MultiPoint + - LineString + - MultiLineString + - Polygon + - MultiPolygon + - GeometryCollection + required: + - type + discriminator: + propertyName: type + externalDocs: + url: 'https://tools.ietf.org/html/rfc7946#section-3' + GeometryElement: + description: | + Abstract type for all GeoJSon 'Geometry' object the type of which is not 'GeometryCollection' + allOf: + - $ref: '#/components/schemas/Geometry' + - type: object + properties: + type: + type: string + enum: + - Point + - MultiPoint + - LineString + - MultiLineString + - Polygon + - MultiPolygon + required: + - type + discriminator: + propertyName: type + externalDocs: + url: 'https://tools.ietf.org/html/rfc7946#section-3' + Feature: + description: GeoJSon 'Feature' object + allOf: + - $ref: '#/components/schemas/GeoJsonObject' + - type: object + required: + - geometry + - properties + properties: + geometry: + allOf: + - nullable: true + - $ref: '#/components/schemas/Geometry' + properties: + type: object + nullable: true + id: + oneOf: + - type: number + - type: string + externalDocs: + url: 'https://tools.ietf.org/html/rfc7946#section-3.2' + FeatureCollection: + description: GeoJSon 'FeatureCollection' object + allOf: + - $ref: '#/components/schemas/GeoJsonObject' + - type: object + required: + - features + properties: + features: + type: array + items: + $ref: '#/components/schemas/Feature' + externalDocs: + url: 'https://tools.ietf.org/html/rfc7946#section-3.3' + Position: + description: | + GeoJSon fundamental geometry construct. A position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, or easting and northing, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element. Implementations SHOULD NOT extend positions beyond three elements because the semantics of extra elements are unspecified and ambiguous. Historically, some implementations have used a fourth element to carry a linear referencing measure (sometimes denoted as "M") or a numerical timestamp, but in most situations a parser will not be able to properly interpret these values. The interpretation and meaning of additional elements is beyond the scope of this specification, and additional elements MAY be ignored by parsers. + type: array + items: + type: number + externalDocs: + url: 'https://tools.ietf.org/html/rfc7946#section-3.1.1' + maxItems: 3 + minItems: 2 + LineStringCoordinates: + description: | + GeoJSon fundamental geometry construct, array of two or more positions. + type: array + items: + $ref: '#/components/schemas/Position' + externalDocs: + url: 'https://tools.ietf.org/html/rfc7946#section-3.1.4' + minItems: 2 + LinearRing: + description: | + A linear ring is a closed LineString with four or more positions. The first and last positions are equivalent, and they MUST contain identical values; their representation SHOULD also be identical. A linear ring is the boundary of a surface or the boundary of a hole in a surface. A linear ring MUST follow the right-hand rule with respect to the area it bounds, i.e., exterior rings are counterclockwise, and holes are clockwise. + type: array + items: + $ref: '#/components/schemas/Position' + externalDocs: + url: 'https://tools.ietf.org/html/rfc7946#section-3.1.6' + minItems: 4 + Point: + description: GeoJSon geometry + allOf: + - $ref: '#/components/schemas/GeometryElement' + - type: object + required: + - type + - coordinates + properties: + type: + type: string + enum: + - Point + coordinates: + $ref: '#/components/schemas/Position' + externalDocs: + url: 'https://tools.ietf.org/html/rfc7946#section-3.1.2' + MultiPoint: + description: GeoJSon geometry + allOf: + - $ref: '#/components/schemas/GeometryElement' + - type: object + required: + - coordinates + properties: + coordinates: + type: array + items: + $ref: '#/components/schemas/Position' + externalDocs: + url: 'https://tools.ietf.org/html/rfc7946#section-3.1.3' + LineString: + description: GeoJSon geometry + allOf: + - $ref: '#/components/schemas/GeometryElement' + - type: object + required: + - coordinates + properties: + coordinates: + $ref: '#/components/schemas/LineStringCoordinates' + externalDocs: + url: 'https://tools.ietf.org/html/rfc7946#section-3.1.4' + MultiLineString: + description: GeoJSon geometry + allOf: + - $ref: '#/components/schemas/GeometryElement' + - type: object + required: + - coordinates + properties: + coordinates: + type: array + items: + $ref: '#/components/schemas/LineStringCoordinates' + externalDocs: + url: 'https://tools.ietf.org/html/rfc7946#section-3.1.5' + Polygon: + description: GeoJSon geometry + allOf: + - $ref: '#/components/schemas/GeometryElement' + - type: object + required: + - coordinates + properties: + coordinates: + type: array + items: + $ref: '#/components/schemas/LinearRing' + externalDocs: + url: 'https://tools.ietf.org/html/rfc7946#section-3.1.6' + MultiPolygon: + description: GeoJSon geometry + allOf: + - $ref: '#/components/schemas/GeometryElement' + - type: object + required: + - coordinates + properties: + coordinates: + type: array + items: + type: array + items: + $ref: '#/components/schemas/LinearRing' + externalDocs: + url: 'https://tools.ietf.org/html/rfc7946#section-3.1.7' + GeometryCollection: + description: | + GeoJSon geometry collection GeometryCollections composed of a single part or a number of parts of a single type SHOULD be avoided when that single part or a single object of multipart type (MultiPoint, MultiLineString, or MultiPolygon) could be used instead. + type: object + allOf: + - $ref: '#/components/schemas/Geometry' + - type: object + required: + - geometries + properties: + geometries: + type: array + items: + $ref: '#/components/schemas/GeometryElement' + minItems: 0 + externalDocs: + url: 'https://tools.ietf.org/html/rfc7946#section-3.1.8' Props: description: Data for the info-card table type: object diff --git a/map/README.md b/map/README.md index eeee6196c..13a7ff79d 100644 --- a/map/README.md +++ b/map/README.md @@ -26,7 +26,7 @@ If you really need a tileset and can't meet these requirements, shoot us a messa Generating `europe` takes 3h10m on a modern laptop with 32GB RAM and an SSD. The following commands are optimised for this. -From the root of the repository, run either (depending on your waiting tolerance and avaliable RAM): +From the root of the repository, run either (depending on your waiting tolerance and available RAM): -
[~minutes] Only Germany with approx 64GB of RAM @@ -110,7 +110,7 @@ docker run -it --rm -p 8888:8888 maputnik/editor > After exporting the edited style don't forget to revert the change to the vector url 😉 | Step 1 | Step 2 | -| ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +|------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------| | ![Where in Maputnik to click to import a style](/resources/documentation/maputnik-import1.png) | ![Where in Maputnik to click then to import a style](/resources/documentation/maputnik-import2.png) | ### Fonts + Sprites diff --git a/webclient/app/api_types/index.ts b/webclient/app/api_types/index.ts index b5ce622cb..b786867b0 100644 --- a/webclient/app/api_types/index.ts +++ b/webclient/app/api_types/index.ts @@ -56,6 +56,26 @@ export type paths = { */ get: operations["previews"]; }; + "/api/maps/indoor": { + /** + * Lists indoor maps in bounding box + * @description Returns all the available maps for a given bbox + */ + get: operations["list-indoor-maps"]; + }; + "/api/maps/indoor/{id}": { + /** + * Get indoor features + * @description Get all features of a certain indoor map + */ + get: operations["get-indoor-map"]; + parameters: { + path: { + /** @description id of the map returned by prior listing */ + id: string; + }; + }; + }; "/api/feedback/get_token": { /** * Get a feedback-token @@ -144,6 +164,101 @@ export type webhooks = Record; export type components = { schemas: { + /** @description GeoJSon object The coordinate reference system for all GeoJSON coordinates is a geographic coordinate reference system, using the World Geodetic System 1984 (WGS 84) datum, with longitude and latitude units of decimal degrees. This is equivalent to the coordinate reference system identified by the Open Geospatial Consortium (OGC) URN An OPTIONAL third-position element SHALL be the height in meters above or below the WGS 84 reference ellipsoid. In the absence of elevation values, applications sensitive to height or depth SHOULD interpret positions as being at local ground or sea level. */ + readonly GeoJsonObject: { + /** @enum {string} */ + readonly type: + | "Feature" + | "FeatureCollection" + | "Point" + | "MultiPoint" + | "LineString" + | "MultiLineString" + | "Polygon" + | "MultiPolygon" + | "GeometryCollection"; + /** @description A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. */ + readonly bbox?: readonly number[]; + }; + /** @description Abstract type for all GeoJSon object except Feature and FeatureCollection */ + readonly Geometry: { + type: "Geometry"; + } & Omit & { + /** @enum {string} */ + readonly type: + | "Point" + | "MultiPoint" + | "LineString" + | "MultiLineString" + | "Polygon" + | "MultiPolygon" + | "GeometryCollection"; + }; + /** @description Abstract type for all GeoJSon 'Geometry' object the type of which is not 'GeometryCollection' */ + readonly GeometryElement: components["schemas"]["Geometry"] & { + /** @enum {string} */ + readonly type: "Point" | "MultiPoint" | "LineString" | "MultiLineString" | "Polygon" | "MultiPolygon"; + }; + /** @description GeoJSon 'Feature' object */ + readonly Feature: { + type: "Feature"; + } & Omit & { + readonly geometry: components["schemas"]["Geometry"]; + readonly properties: Record | null; + readonly id?: number | string; + }; + /** @description GeoJSon 'FeatureCollection' object */ + readonly FeatureCollection: { + type: "FeatureCollection"; + } & Omit & { + readonly features: readonly components["schemas"]["Feature"][]; + }; + /** @description GeoJSon fundamental geometry construct. A position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, or easting and northing, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element. Implementations SHOULD NOT extend positions beyond three elements because the semantics of extra elements are unspecified and ambiguous. Historically, some implementations have used a fourth element to carry a linear referencing measure (sometimes denoted as "M") or a numerical timestamp, but in most situations a parser will not be able to properly interpret these values. The interpretation and meaning of additional elements is beyond the scope of this specification, and additional elements MAY be ignored by parsers. */ + readonly Position: readonly [number, number] | readonly [number, number, number]; + /** @description GeoJSon fundamental geometry construct, array of two or more positions. */ + readonly LineStringCoordinates: readonly [ + components["schemas"]["Position"], + components["schemas"]["Position"], + ...components["schemas"]["Position"][], + ]; + /** @description A linear ring is a closed LineString with four or more positions. The first and last positions are equivalent, and they MUST contain identical values; their representation SHOULD also be identical. A linear ring is the boundary of a surface or the boundary of a hole in a surface. A linear ring MUST follow the right-hand rule with respect to the area it bounds, i.e., exterior rings are counterclockwise, and holes are clockwise. */ + readonly LinearRing: readonly [ + components["schemas"]["Position"], + components["schemas"]["Position"], + components["schemas"]["Position"], + components["schemas"]["Position"], + ...components["schemas"]["Position"][], + ]; + /** @description GeoJSon geometry */ + readonly Point: components["schemas"]["GeometryElement"] & { + /** @enum {string} */ + readonly type: "Point"; + readonly coordinates: components["schemas"]["Position"]; + }; + /** @description GeoJSon geometry */ + readonly MultiPoint: components["schemas"]["GeometryElement"] & { + readonly coordinates: readonly components["schemas"]["Position"][]; + }; + /** @description GeoJSon geometry */ + readonly LineString: components["schemas"]["GeometryElement"] & { + readonly coordinates: components["schemas"]["LineStringCoordinates"]; + }; + /** @description GeoJSon geometry */ + readonly MultiLineString: components["schemas"]["GeometryElement"] & { + readonly coordinates: readonly components["schemas"]["LineStringCoordinates"][]; + }; + /** @description GeoJSon geometry */ + readonly Polygon: components["schemas"]["GeometryElement"] & { + readonly coordinates: readonly components["schemas"]["LinearRing"][]; + }; + /** @description GeoJSon geometry */ + readonly MultiPolygon: components["schemas"]["GeometryElement"] & { + readonly coordinates: readonly (readonly components["schemas"]["LinearRing"][])[]; + }; + /** @description GeoJSon geometry collection GeometryCollections composed of a single part or a number of parts of a single type SHOULD be avoided when that single part or a single object of multipart type (MultiPoint, MultiLineString, or MultiPolygon) could be used instead. */ + readonly GeometryCollection: components["schemas"]["Geometry"] & { + readonly geometries: readonly components["schemas"]["GeometryElement"][]; + }; /** @description Data for the info-card table */ readonly Props: { /** @description The operator of the room */ @@ -680,6 +795,23 @@ export type components = { /** Format: double */ readonly lon: number; }; + readonly IndoorMap: { + readonly beforeLayerId?: string; + readonly bounds: readonly number[]; + readonly defaultLevel: string; + readonly geojson: components["schemas"]["FeatureCollection"]; + readonly layers: readonly string[]; + readonly layersToHide: readonly string[]; + readonly levelsRange: { + readonly min: number; + readonly max: number; + }; + readonly showFeaturesWithEmptyLevel: boolean; + }; + readonly RemoteMap: { + readonly name: string; + readonly path: string; + }; }; responses: never; parameters: never; @@ -906,6 +1038,45 @@ export type operations = { }; }; }; + /** + * Lists indoor maps in bounding box + * @description Returns all the available maps for a given bbox + */ + "list-indoor-maps": { + parameters: { + query: { + /** @description Bounding box according to https://datatracker.ietf.org/doc/html/rfc7946#section-5 */ + bbox: string; + }; + }; + responses: { + 200: { + content: { + readonly "application/json": readonly components["schemas"]["RemoteMap"][]; + }; + }; + }; + }; + /** + * Get indoor features + * @description Get all features of a certain indoor map + */ + "get-indoor-map": { + parameters: { + path: { + /** @description id of the map returned by prior listing */ + id: string; + }; + }; + responses: { + /** @description OK */ + 200: { + content: { + readonly "application/json": components["schemas"]["FeatureCollection"]; + }; + }; + }; + }; /** * Get a feedback-token * @description ***Do not abuse this endpoint.***