From 51711d41ab13b19c07205a3c3b90138bc8299a66 Mon Sep 17 00:00:00 2001
From: Tom Kralidis
Date: Thu, 30 Nov 2023 13:22:39 -0500
Subject: [PATCH 1/3] update OGC Compliance links in docs
---
docs/source/_templates/indexsidebar.html | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/source/_templates/indexsidebar.html b/docs/source/_templates/indexsidebar.html
index 79b9effb7..7990bf4d1 100644
--- a/docs/source/_templates/indexsidebar.html
+++ b/docs/source/_templates/indexsidebar.html
@@ -5,13 +5,13 @@
-
+
-
+
-
+
From f1a0357478ec87b4e0e2433fa4b086c16297c954 Mon Sep 17 00:00:00 2001
From: Jo
Date: Fri, 8 Dec 2023 22:36:13 +0000
Subject: [PATCH 2/3] Fixing pydantic validation issue of tilejson metadata
(#1421)
* - on MVTilejson model, set default value on optional fields, so that they are not required.
* - fixed formatting (flake8)
* Update base.py
---------
Co-authored-by: doublebyte1
Co-authored-by: Francesco Bartoli
---
pygeoapi/models/provider/base.py | 98 ++++++++++++++++----------------
pygeoapi/models/provider/mvt.py | 18 +++---
2 files changed, 59 insertions(+), 57 deletions(-)
diff --git a/pygeoapi/models/provider/base.py b/pygeoapi/models/provider/base.py
index db2b68741..2da39030b 100644
--- a/pygeoapi/models/provider/base.py
+++ b/pygeoapi/models/provider/base.py
@@ -3,8 +3,10 @@
# =================================================================
#
# Authors: Antonio Cerciello
+# Francesco Bartoli
#
# Copyright (c) 2022 Antonio Cerciello
+# Copyright (c) 2023 Francesco Bartoli
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
@@ -113,103 +115,103 @@ class TileMatrixLimitsType(BaseModel):
class TwoDBoundingBoxType(BaseModel):
lowerLeft: List[float]
upperRight: List[float]
- crs: Optional[str]
+ crs: Optional[str] = None
class LinkType(BaseModel):
href: str
- rel: Optional[str]
- type_: Optional[str]
- hreflang: Optional[str]
- title: Optional[str]
- length: Optional[int]
+ rel: Optional[str] = None
+ type_: Optional[str] = None
+ hreflang: Optional[str] = None
+ title: Optional[str] = None
+ length: Optional[int] = None
class GeospatialDataType(BaseModel):
- id: Optional[str]
+ id: Optional[str] = None
title: Optional[str] = None
- description: Optional[str]
- keywords: Optional[List[str]]
+ description: Optional[str] = None
+ keywords: Optional[List[str]] = None
dataType: DataTypeEnum = DataTypeEnum.VECTOR
- geometryDimension: Optional[GeometryDimensionEnum]
- maxTileMatrix: Optional[str]
- minTileMatrix: Optional[str]
- minScaleDenominator: Optional[float]
- maxScaleDenominator: Optional[float]
- minCellSize: Optional[float]
- maxCellSize: Optional[float]
- boundingBox: Optional[TwoDBoundingBoxType]
- links: Optional[LinkType]
- propertiesSchema: Optional[dict]
+ geometryDimension: Optional[GeometryDimensionEnum] = None
+ maxTileMatrix: Optional[str] = None
+ minTileMatrix: Optional[str] = None
+ minScaleDenominator: Optional[float] = None
+ maxScaleDenominator: Optional[float] = None
+ minCellSize: Optional[float] = None
+ maxCellSize: Optional[float] = None
+ boundingBox: Optional[TwoDBoundingBoxType] = None
+ links: Optional[LinkType] = None
+ propertiesSchema: Optional[dict] = None
class StyleType(BaseModel):
- id: Optional[str]
- title: Optional[str]
- description: Optional[str]
- keywords: Optional[List[str]]
- links: Optional[LinkType]
+ id: Optional[str] = None
+ title: Optional[str] = None
+ description: Optional[str] = None
+ keywords: Optional[List[str]] = None
+ links: Optional[LinkType] = None
class TilePointType(BaseModel):
crs: str
- coordinates: Optional[List[float]]
- scaleDenominator: Optional[float]
- cellSize: Optional[float]
+ coordinates: Optional[List[float]] = None
+ scaleDenominator: Optional[float] = None
+ cellSize: Optional[float] = None
# CodeType as adaptation of MD_Identifier class ISO 19115
tileMatrix: str
- cellSize: Optional[str]
+ cellSize: Optional[str] = None
class TileSetMetadata(BaseModel):
# A title for this tileset
- title: Optional[str]
+ title: Optional[str] = None
# Brief narrative description of this tile set
- description: Optional[str]
+ description: Optional[str] = None
# keywords about this tileset
- keywords: Optional[List[str]]
+ keywords: Optional[List[str]] = None
# Version of the Tile Set. Changes if the data behind the tiles
# has been changed
- version: Optional[str]
+ version: Optional[str] = None
# Useful information to contact the authors or custodians for the Tile Set
- pointOfContact: Optional[str]
+ pointOfContact: Optional[str] = None
# Short reference to recognize the author or provider
- attribution: Optional[str]
+ attribution: Optional[str] = None
# License applicable to the tiles
- license_: Optional[str]
+ license_: Optional[str] = None
# Restrictions on the availability of the Tile Set that the user needs to
# be aware of before using or redistributing the Tile Set
accessConstraints: Optional[AccessConstraintsEnum] = AccessConstraintsEnum.UNCLASSIFIED
# Media types available for the tiles
- mediaTypes: Optional[List[str]]
+ mediaTypes: Optional[List[str]] = None
# Type of data represented in the tileset
dataType: DataTypeEnum = DataTypeEnum.VECTOR
# Limits for the TileRow and TileCol values for each TileMatrix in the
# tileMatrixSet. If missing, there are no limits other that the ones
# imposed by the TileMatrixSet. If present the TileMatrices listed are
# limited and the rest not available at all
- tileMatrixSetLimits: Optional[TileMatrixLimitsType]
+ tileMatrixSetLimits: Optional[TileMatrixLimitsType] = None
# Coordinate Reference System (CRS)
- crs: Optional[str]
+ crs: Optional[str] = None
# Epoch of the Coordinate Reference System (CRS)
- epoch: Optional[int]
+ epoch: Optional[int] = None
# Minimum bounding rectangle surrounding the tile matrix set, in the
# supported CRS
- boundingBox: Optional[TwoDBoundingBoxType]
+ boundingBox: Optional[TwoDBoundingBoxType] = None
# When the Tile Set was first produced
- created: Optional[datetime]
+ created: Optional[datetime] = None
# Last Tile Set change/revision
- updated: Optional[datetime]
- layers: Optional[GeospatialDataType]
+ updated: Optional[datetime] = None
+ layers: Optional[GeospatialDataType] = None
# Style involving all layers used to generate the tileset
- style: Optional[StyleType]
+ style: Optional[StyleType] = None
# Location of a tile that nicely represents the tileset.
# Implementations may use this center value to set the default location
# or to present a representative tile in a user interface
- centerPoint: Optional[TilePointType]
+ centerPoint: Optional[TilePointType] = None
# Tile matrix set definition
- tileMatrixSet: Optional[str]
+ tileMatrixSet: Optional[str] = None
# Reference to a Tile Matrix Set on an official source
- tileMatrixSetURI: Optional[str]
+ tileMatrixSetURI: Optional[str] = None
# Links to related resources.
- links: Optional[List[LinkType]]
+ links: Optional[List[LinkType]] = None
diff --git a/pygeoapi/models/provider/mvt.py b/pygeoapi/models/provider/mvt.py
index 73f318e10..c3344150d 100644
--- a/pygeoapi/models/provider/mvt.py
+++ b/pygeoapi/models/provider/mvt.py
@@ -41,12 +41,12 @@ class VectorLayers(BaseModel):
class MVTTilesJson(BaseModel):
tilejson: str = "3.0.0"
- name: Optional[str]
- tiles: Optional[str]
- minzoom: Optional[int]
- maxzoom: Optional[int]
- bounds: Optional[str]
- center: Optional[str]
- attribution: Optional[str]
- description: Optional[str]
- vector_layers: Optional[List[VectorLayers]]
+ name: Optional[str] = None
+ tiles: Optional[str] = None
+ minzoom: Optional[int] = None
+ maxzoom: Optional[int] = None
+ bounds: Optional[str] = None
+ center: Optional[str] = None
+ attribution: Optional[str] = None
+ description: Optional[str] = None
+ vector_layers: Optional[List[VectorLayers]] = None
From e7264e89bce3b14f2f013376b0c1159b9b5fa634 Mon Sep 17 00:00:00 2001
From: Jo
Date: Sun, 10 Dec 2023 12:00:18 +0000
Subject: [PATCH 3/3] Support jsonld for items with null geometry (#1423)
* - added condition to avoid doing operations on the geometry, when the geometry is null (case of records)
* - moving id out of the geometry condition
* - removed commented line
---------
Co-authored-by: doublebyte1
---
pygeoapi/linked_data.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/pygeoapi/linked_data.py b/pygeoapi/linked_data.py
index c502922b2..b79a72aaf 100644
--- a/pygeoapi/linked_data.py
+++ b/pygeoapi/linked_data.py
@@ -211,8 +211,10 @@ def geojson2jsonld(cls, data: dict, dataset: str,
data.update(data.pop('properties'))
# Include multiple geometry encodings
- data['type'] = 'schema:Place'
- jsonldify_geometry(data)
+ if (data.get('geometry') is not None):
+ data['type'] = 'schema:Place'
+ jsonldify_geometry(data)
+
data['@id'] = identifier
else: