diff --git a/docs/hierarchy.html b/docs/hierarchy.html
index 6ad3107..2b41971 100644
--- a/docs/hierarchy.html
+++ b/docs/hierarchy.html
@@ -1 +1 @@
-
diff --git a/docs/index.html b/docs/index.html
index f38f261..d17e37a 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1,4 +1,4 @@
-
diff --git a/docs/interfaces/BaseFeature.html b/docs/interfaces/BaseFeature.html
index a0752b3..c549c85 100644
--- a/docs/interfaces/BaseFeature.html
+++ b/docs/interfaces/BaseFeature.html
@@ -1,2 +1,2 @@
-
diff --git a/docs/interfaces/BaseFeatureCollection.html b/docs/interfaces/BaseFeatureCollection.html
index 28231c2..159a8e1 100644
--- a/docs/interfaces/BaseFeatureCollection.html
+++ b/docs/interfaces/BaseFeatureCollection.html
@@ -1,2 +1,2 @@
-
diff --git a/docs/interfaces/BaseGeometry.html b/docs/interfaces/BaseGeometry.html
index 0ab307d..9855d54 100644
--- a/docs/interfaces/BaseGeometry.html
+++ b/docs/interfaces/BaseGeometry.html
@@ -1,2 +1,2 @@
-
diff --git a/docs/interfaces/S2Feature.html b/docs/interfaces/S2Feature.html
index 54def6d..ec4fd86 100644
--- a/docs/interfaces/S2Feature.html
+++ b/docs/interfaces/S2Feature.html
@@ -1,2 +1,2 @@
-
diff --git a/docs/interfaces/S2FeatureCollection.html b/docs/interfaces/S2FeatureCollection.html
index f34315c..9203d53 100644
--- a/docs/interfaces/S2FeatureCollection.html
+++ b/docs/interfaces/S2FeatureCollection.html
@@ -1,2 +1,2 @@
-
diff --git a/docs/interfaces/TileStoreOptions.html b/docs/interfaces/TileStoreOptions.html
index e110239..678812a 100644
--- a/docs/interfaces/TileStoreOptions.html
+++ b/docs/interfaces/TileStoreOptions.html
@@ -1,4 +1,4 @@
-
Interface TileStoreOptions
diff --git a/docs/interfaces/VectorBaseGeometry.html b/docs/interfaces/VectorBaseGeometry.html
index ddaf8f7..0f38cae 100644
--- a/docs/interfaces/VectorBaseGeometry.html
+++ b/docs/interfaces/VectorBaseGeometry.html
@@ -1,2 +1,2 @@
-
VectorBaseGeometry | s2json-spec - v1.4.0 Interface VectorBaseGeometry<T, C, O, B>
+
VectorBaseGeometry | s2json-spec - v1.4.1 Interface VectorBaseGeometry<T, C, O, B>
diff --git a/docs/interfaces/VectorPoint.html b/docs/interfaces/VectorPoint.html
index e697375..01114d3 100644
--- a/docs/interfaces/VectorPoint.html
+++ b/docs/interfaces/VectorPoint.html
@@ -1,2 +1,2 @@
-
VectorPoint | s2json-spec - v1.4.0
+
VectorPoint | s2json-spec - v1.4.1
diff --git a/docs/modules.html b/docs/modules.html
index e60f665..2d634e7 100644
--- a/docs/modules.html
+++ b/docs/modules.html
@@ -1,4 +1,4 @@
-
s2json-spec - v1.4.0
diff --git a/docs/modules/MercPoint.html b/docs/modules/MercPoint.html
index c8e7c55..1ded931 100644
--- a/docs/modules/MercPoint.html
+++ b/docs/modules/MercPoint.html
@@ -1,4 +1,4 @@
-
MercPoint | s2json-spec - v1.4.0 Index Type Aliases Sources
+
MercPoint | s2json-spec - v1.4.1
+
diff --git a/docs/modules/S2CellID.html b/docs/modules/S2CellID.html
index 7c3105d..44fecf9 100644
--- a/docs/modules/S2CellID.html
+++ b/docs/modules/S2CellID.html
@@ -1,4 +1,4 @@
-
S2CellID | s2json-spec - v1.4.0 Index Functions boundsST
+
S2CellID | s2json-spec - v1.4.1
+
diff --git a/docs/modules/S2Point.html b/docs/modules/S2Point.html
index 3cc9398..b9e0789 100644
--- a/docs/modules/S2Point.html
+++ b/docs/modules/S2Point.html
@@ -1,4 +1,4 @@
-
S2Point | s2json-spec - v1.4.0 Index Functions add
+
S2Point | s2json-spec - v1.4.1
+
diff --git a/docs/modules/mercID.html b/docs/modules/mercID.html
index 5d9c22c..68ff7db 100644
--- a/docs/modules/mercID.html
+++ b/docs/modules/mercID.html
@@ -1,4 +1,4 @@
-
mercID | s2json-spec - v1.4.0 Index Functions children
+
mercID | s2json-spec - v1.4.1
+
diff --git a/docs/types/Attributions.html b/docs/types/Attributions.html
index d0182f9..3d942dc 100644
--- a/docs/types/Attributions.html
+++ b/docs/types/Attributions.html
@@ -1,4 +1,4 @@
-
Attributions | s2json-spec - v1.4.0 Attributions : Record < string , string >
diff --git a/docs/types/BBOX.html b/docs/types/BBOX.html
index 94e3532..e50c169 100644
--- a/docs/types/BBOX.html
+++ b/docs/types/BBOX.html
@@ -1,2 +1,2 @@
-
BBOX | s2json-spec - v1.4.0
+
BBOX | s2json-spec - v1.4.1
diff --git a/docs/types/BBox-1.html b/docs/types/BBox-1.html
index 73c6217..72cb37c 100644
--- a/docs/types/BBox-1.html
+++ b/docs/types/BBox-1.html
@@ -1,3 +1,3 @@
-
BBox | s2json-spec - v1.4.0 BBox : [ left: number , bottom: number , right: number , top: number ]
diff --git a/docs/types/BBox3D.html b/docs/types/BBox3D.html
index 155589a..fa8e655 100644
--- a/docs/types/BBox3D.html
+++ b/docs/types/BBox3D.html
@@ -1,3 +1,3 @@
-
BBox3D | s2json-spec - v1.4.0 BBox3D : [ left: number , bottom: number , right: number , top: number , front: number , back: number ]
diff --git a/docs/types/ConvertedGeometry.html b/docs/types/ConvertedGeometry.html
index c1884ff..432c445 100644
--- a/docs/types/ConvertedGeometry.html
+++ b/docs/types/ConvertedGeometry.html
@@ -1,2 +1,2 @@
-
ConvertedGeometry | s2json-spec - v1.4.0 Type Alias ConvertedGeometry
+
ConvertedGeometry | s2json-spec - v1.4.1 Type Alias ConvertedGeometry
diff --git a/docs/types/Coordinates.html b/docs/types/Coordinates.html
index 18ff0af..4293ec8 100644
--- a/docs/types/Coordinates.html
+++ b/docs/types/Coordinates.html
@@ -1,2 +1,2 @@
-
Coordinates | s2json-spec - v1.4.0
+
Coordinates | s2json-spec - v1.4.1
diff --git a/docs/types/Face.html b/docs/types/Face.html
index df5ce73..704b531 100644
--- a/docs/types/Face.html
+++ b/docs/types/Face.html
@@ -1,2 +1,2 @@
-
Face | s2json-spec - v1.4.0 Face : Â Â Â Â | 0 Â Â Â Â | 1 Â Â Â Â | 2 Â Â Â Â | 3 Â Â Â Â | 4 Â Â Â Â | 5
+
Face | s2json-spec - v1.4.1 Face : Â Â Â Â | 0 Â Â Â Â | 1 Â Â Â Â | 2 Â Â Â Â | 3 Â Â Â Â | 4 Â Â Â Â | 5
diff --git a/docs/types/Feature.html b/docs/types/Feature.html
index 4ac8924..4f76338 100644
--- a/docs/types/Feature.html
+++ b/docs/types/Feature.html
@@ -1,2 +1,2 @@
-
Feature | s2json-spec - v1.4.0 Type Alias Feature<P, M, G>
+
Feature | s2json-spec - v1.4.1 Type Alias Feature<P, M, G>
diff --git a/docs/types/FeatureCollection.html b/docs/types/FeatureCollection.html
index b5f4d25..dc5bb49 100644
--- a/docs/types/FeatureCollection.html
+++ b/docs/types/FeatureCollection.html
@@ -1,2 +1,2 @@
-
FeatureCollection | s2json-spec - v1.4.0 Type Alias FeatureCollection
+
FeatureCollection | s2json-spec - v1.4.1 Type Alias FeatureCollection
diff --git a/docs/types/FeatureCollectionType.html b/docs/types/FeatureCollectionType.html
index c2b0fcd..b1273f5 100644
--- a/docs/types/FeatureCollectionType.html
+++ b/docs/types/FeatureCollectionType.html
@@ -1,2 +1,2 @@
-
FeatureCollectionType | s2json-spec - v1.4.0 Type Alias FeatureCollectionType Feature Collection Type : "FeatureCollection" | "S2FeatureCollection"
+
FeatureCollectionType | s2json-spec - v1.4.1 Type Alias FeatureCollectionType Feature Collection Type : "FeatureCollection" | "S2FeatureCollection"
diff --git a/docs/types/FeatureCollections.html b/docs/types/FeatureCollections.html
index bdc94b1..1249dac 100644
--- a/docs/types/FeatureCollections.html
+++ b/docs/types/FeatureCollections.html
@@ -1,2 +1,2 @@
-
FeatureCollections | s2json-spec - v1.4.0 Type Alias FeatureCollections
+
FeatureCollections | s2json-spec - v1.4.1 Type Alias FeatureCollections
diff --git a/docs/types/FeatureType.html b/docs/types/FeatureType.html
index be5aee6..d9b030d 100644
--- a/docs/types/FeatureType.html
+++ b/docs/types/FeatureType.html
@@ -1,2 +1,2 @@
-
FeatureType | s2json-spec - v1.4.0 Feature Type : "Feature" | "VectorFeature" | "S2Feature"
+
FeatureType | s2json-spec - v1.4.1 Feature Type : "Feature" | "VectorFeature" | "S2Feature"
diff --git a/docs/types/Features.html b/docs/types/Features.html
index cdc5e5a..5e86dbd 100644
--- a/docs/types/Features.html
+++ b/docs/types/Features.html
@@ -1,2 +1,2 @@
-
Features | s2json-spec - v1.4.0
+
Features | s2json-spec - v1.4.1
diff --git a/docs/types/Geometry.html b/docs/types/Geometry.html
index f062383..5c77653 100644
--- a/docs/types/Geometry.html
+++ b/docs/types/Geometry.html
@@ -1,2 +1,2 @@
-
Geometry | s2json-spec - v1.4.0
+
Geometry | s2json-spec - v1.4.1
diff --git a/docs/types/GeometryType.html b/docs/types/GeometryType.html
index bc9d90a..72d3802 100644
--- a/docs/types/GeometryType.html
+++ b/docs/types/GeometryType.html
@@ -1,2 +1,2 @@
-
GeometryType | s2json-spec - v1.4.0 Geometry Type : Â Â Â Â | "Point" Â Â Â Â | "MultiPoint" Â Â Â Â | "LineString" Â Â Â Â | "MultiLineString" Â Â Â Â | "Polygon" Â Â Â Â | "MultiPolygon" Â Â Â Â | "Point3D" Â Â Â Â | "MultiPoint3D" Â Â Â Â | "LineString3D" Â Â Â Â | "MultiLineString3D" Â Â Â Â | "Polygon3D" Â Â Â Â | "MultiPolygon3D"
+
GeometryType | s2json-spec - v1.4.1 Geometry Type : Â Â Â Â | "Point" Â Â Â Â | "MultiPoint" Â Â Â Â | "LineString" Â Â Â Â | "MultiLineString" Â Â Â Â | "Polygon" Â Â Â Â | "MultiPolygon" Â Â Â Â | "Point3D" Â Â Â Â | "MultiPoint3D" Â Â Â Â | "LineString3D" Â Â Â Â | "MultiLineString3D" Â Â Â Â | "Polygon3D" Â Â Â Â | "MultiPolygon3D"
diff --git a/docs/types/JSONCollection.html b/docs/types/JSONCollection.html
index 56e6593..6fcb2e3 100644
--- a/docs/types/JSONCollection.html
+++ b/docs/types/JSONCollection.html
@@ -1,2 +1,2 @@
-
JSONCollection | s2json-spec - v1.4.0 Type Alias JSONCollection
+
JSONCollection | s2json-spec - v1.4.1 Type Alias JSONCollection
diff --git a/docs/types/LineString.html b/docs/types/LineString.html
index 52aba55..b3ae856 100644
--- a/docs/types/LineString.html
+++ b/docs/types/LineString.html
@@ -1,2 +1,2 @@
-
LineString | s2json-spec - v1.4.0
+
LineString | s2json-spec - v1.4.1
diff --git a/docs/types/LineString3D.html b/docs/types/LineString3D.html
index 3744432..ca64f60 100644
--- a/docs/types/LineString3D.html
+++ b/docs/types/LineString3D.html
@@ -1,2 +1,2 @@
-
LineString3D | s2json-spec - v1.4.0
+
LineString3D | s2json-spec - v1.4.1
diff --git a/docs/types/LineString3DGeometry.html b/docs/types/LineString3DGeometry.html
index 6e1f669..9c70449 100644
--- a/docs/types/LineString3DGeometry.html
+++ b/docs/types/LineString3DGeometry.html
@@ -1,2 +1,2 @@
-
LineString3DGeometry | s2json-spec - v1.4.0 Type Alias LineString3DGeometry<M>
+
LineString3DGeometry | s2json-spec - v1.4.1 Type Alias LineString3DGeometry<M>
diff --git a/docs/types/LineStringGeometry.html b/docs/types/LineStringGeometry.html
index af41ea0..e25ecb0 100644
--- a/docs/types/LineStringGeometry.html
+++ b/docs/types/LineStringGeometry.html
@@ -1,2 +1,2 @@
-
LineStringGeometry | s2json-spec - v1.4.0 Type Alias LineStringGeometry<M>
+
LineStringGeometry | s2json-spec - v1.4.1 Type Alias LineStringGeometry<M>
diff --git a/docs/types/LineStringMValues.html b/docs/types/LineStringMValues.html
index 101c420..53de53c 100644
--- a/docs/types/LineStringMValues.html
+++ b/docs/types/LineStringMValues.html
@@ -1,2 +1,2 @@
-
LineStringMValues | s2json-spec - v1.4.0 Type Alias LineStringMValues<M> Line StringMValues < M > : M []
+
LineStringMValues | s2json-spec - v1.4.1 Type Alias LineStringMValues<M> Line StringMValues < M > : M []
diff --git a/docs/types/MValue.html b/docs/types/MValue.html
index ffd88bd..5594629 100644
--- a/docs/types/MValue.html
+++ b/docs/types/MValue.html
@@ -1,2 +1,2 @@
-
MValue | s2json-spec - v1.4.0
+
MValue | s2json-spec - v1.4.1
diff --git a/docs/types/MValues.html b/docs/types/MValues.html
index 351f995..9283ce9 100644
--- a/docs/types/MValues.html
+++ b/docs/types/MValues.html
@@ -1,2 +1,2 @@
-
MValues | s2json-spec - v1.4.0
+
MValues | s2json-spec - v1.4.1
diff --git a/docs/types/MercPoint.Sources.html b/docs/types/MercPoint.Sources.html
index 3968bdd..3f0e75e 100644
--- a/docs/types/MercPoint.Sources.html
+++ b/docs/types/MercPoint.Sources.html
@@ -1,2 +1,2 @@
-
Sources | s2json-spec - v1.4.0 Sources : "WGS84" | "900913"
+
Sources | s2json-spec - v1.4.1 Sources : "WGS84" | "900913"
diff --git a/docs/types/MultiLineString.html b/docs/types/MultiLineString.html
index b518eb0..cbce39a 100644
--- a/docs/types/MultiLineString.html
+++ b/docs/types/MultiLineString.html
@@ -1,2 +1,2 @@
-
MultiLineString | s2json-spec - v1.4.0 Type Alias MultiLineString
+
MultiLineString | s2json-spec - v1.4.1 Type Alias MultiLineString
diff --git a/docs/types/MultiLineString3D.html b/docs/types/MultiLineString3D.html
index 96b9780..32ea993 100644
--- a/docs/types/MultiLineString3D.html
+++ b/docs/types/MultiLineString3D.html
@@ -1,2 +1,2 @@
-
MultiLineString3D | s2json-spec - v1.4.0 Type Alias MultiLineString3D
+
MultiLineString3D | s2json-spec - v1.4.1 Type Alias MultiLineString3D
diff --git a/docs/types/MultiLineString3DGeometry.html b/docs/types/MultiLineString3DGeometry.html
index 91a3acf..50dff8a 100644
--- a/docs/types/MultiLineString3DGeometry.html
+++ b/docs/types/MultiLineString3DGeometry.html
@@ -1,2 +1,2 @@
-
MultiLineString3DGeometry | s2json-spec - v1.4.0 Type Alias MultiLineString3DGeometry<M>
+
MultiLineString3DGeometry | s2json-spec - v1.4.1 Type Alias MultiLineString3DGeometry<M>
diff --git a/docs/types/MultiLineStringGeometry.html b/docs/types/MultiLineStringGeometry.html
index db9c8f8..e71d443 100644
--- a/docs/types/MultiLineStringGeometry.html
+++ b/docs/types/MultiLineStringGeometry.html
@@ -1,2 +1,2 @@
-
MultiLineStringGeometry | s2json-spec - v1.4.0 Type Alias MultiLineStringGeometry<M>
+
MultiLineStringGeometry | s2json-spec - v1.4.1 Type Alias MultiLineStringGeometry<M>
diff --git a/docs/types/MultiLineStringMValues.html b/docs/types/MultiLineStringMValues.html
index bcd41af..500406d 100644
--- a/docs/types/MultiLineStringMValues.html
+++ b/docs/types/MultiLineStringMValues.html
@@ -1,2 +1,2 @@
-
MultiLineStringMValues | s2json-spec - v1.4.0 Type Alias MultiLineStringMValues<M> Multi Line StringMValues < M > : M [] []
+
MultiLineStringMValues | s2json-spec - v1.4.1 Type Alias MultiLineStringMValues<M> Multi Line StringMValues < M > : M [] []
diff --git a/docs/types/MultiPoint.html b/docs/types/MultiPoint.html
index d84044b..af11924 100644
--- a/docs/types/MultiPoint.html
+++ b/docs/types/MultiPoint.html
@@ -1,2 +1,2 @@
-
MultiPoint | s2json-spec - v1.4.0
+
MultiPoint | s2json-spec - v1.4.1
diff --git a/docs/types/MultiPoint3D.html b/docs/types/MultiPoint3D.html
index 0ba468d..ad43d8c 100644
--- a/docs/types/MultiPoint3D.html
+++ b/docs/types/MultiPoint3D.html
@@ -1,2 +1,2 @@
-
MultiPoint3D | s2json-spec - v1.4.0
+
MultiPoint3D | s2json-spec - v1.4.1
diff --git a/docs/types/MultiPoint3DGeometry.html b/docs/types/MultiPoint3DGeometry.html
index e2a38b3..7a84597 100644
--- a/docs/types/MultiPoint3DGeometry.html
+++ b/docs/types/MultiPoint3DGeometry.html
@@ -1,2 +1,2 @@
-
MultiPoint3DGeometry | s2json-spec - v1.4.0 Type Alias MultiPoint3DGeometry<M>
+
MultiPoint3DGeometry | s2json-spec - v1.4.1 Type Alias MultiPoint3DGeometry<M>
diff --git a/docs/types/MultiPointGeometry.html b/docs/types/MultiPointGeometry.html
index 66bf63c..9f69ea9 100644
--- a/docs/types/MultiPointGeometry.html
+++ b/docs/types/MultiPointGeometry.html
@@ -1,2 +1,2 @@
-
MultiPointGeometry | s2json-spec - v1.4.0 Type Alias MultiPointGeometry<M>
+
MultiPointGeometry | s2json-spec - v1.4.1 Type Alias MultiPointGeometry<M>
diff --git a/docs/types/MultiPolygon.html b/docs/types/MultiPolygon.html
index a4091d0..ac4700f 100644
--- a/docs/types/MultiPolygon.html
+++ b/docs/types/MultiPolygon.html
@@ -1,2 +1,2 @@
-
MultiPolygon | s2json-spec - v1.4.0
+
MultiPolygon | s2json-spec - v1.4.1
diff --git a/docs/types/MultiPolygon3D.html b/docs/types/MultiPolygon3D.html
index b3d3cd4..48a9652 100644
--- a/docs/types/MultiPolygon3D.html
+++ b/docs/types/MultiPolygon3D.html
@@ -1,2 +1,2 @@
-
MultiPolygon3D | s2json-spec - v1.4.0 Type Alias MultiPolygon3D
+
MultiPolygon3D | s2json-spec - v1.4.1 Type Alias MultiPolygon3D
diff --git a/docs/types/MultiPolygon3DGeometry.html b/docs/types/MultiPolygon3DGeometry.html
index 6355ed9..c68589b 100644
--- a/docs/types/MultiPolygon3DGeometry.html
+++ b/docs/types/MultiPolygon3DGeometry.html
@@ -1,2 +1,2 @@
-
MultiPolygon3DGeometry | s2json-spec - v1.4.0 Type Alias MultiPolygon3DGeometry<M>
+
MultiPolygon3DGeometry | s2json-spec - v1.4.1 Type Alias MultiPolygon3DGeometry<M>
diff --git a/docs/types/MultiPolygonGeometry.html b/docs/types/MultiPolygonGeometry.html
index a568fb0..e66c6ec 100644
--- a/docs/types/MultiPolygonGeometry.html
+++ b/docs/types/MultiPolygonGeometry.html
@@ -1,2 +1,2 @@
-
MultiPolygonGeometry | s2json-spec - v1.4.0 Type Alias MultiPolygonGeometry<M>
+
MultiPolygonGeometry | s2json-spec - v1.4.1 Type Alias MultiPolygonGeometry<M>
diff --git a/docs/types/MultiPolygonMValues.html b/docs/types/MultiPolygonMValues.html
index d271f1e..457e23e 100644
--- a/docs/types/MultiPolygonMValues.html
+++ b/docs/types/MultiPolygonMValues.html
@@ -1,2 +1,2 @@
-
MultiPolygonMValues | s2json-spec - v1.4.0 Type Alias MultiPolygonMValues<M> Multi PolygonMValues < M > : M [] [] []
+
MultiPolygonMValues | s2json-spec - v1.4.1 Type Alias MultiPolygonMValues<M> Multi PolygonMValues < M > : M [] [] []
diff --git a/docs/types/Point.html b/docs/types/Point.html
index 084c83c..02894fa 100644
--- a/docs/types/Point.html
+++ b/docs/types/Point.html
@@ -1,2 +1,2 @@
-
Point | s2json-spec - v1.4.0 Point : [ x: number , y: number ]
+
Point | s2json-spec - v1.4.1 Point : [ x: number , y: number ]
diff --git a/docs/types/Point3D.html b/docs/types/Point3D.html
index 5f146d1..2327d82 100644
--- a/docs/types/Point3D.html
+++ b/docs/types/Point3D.html
@@ -1,2 +1,2 @@
-
Point3D | s2json-spec - v1.4.0 Point3D : [ x: number , y: number , z: number ]
+
Point3D | s2json-spec - v1.4.1 Point3D : [ x: number , y: number , z: number ]
diff --git a/docs/types/Point3DGeometry.html b/docs/types/Point3DGeometry.html
index 69df9dd..af021fc 100644
--- a/docs/types/Point3DGeometry.html
+++ b/docs/types/Point3DGeometry.html
@@ -1,2 +1,2 @@
-
Point3DGeometry | s2json-spec - v1.4.0 Type Alias Point3DGeometry<M>
+
Point3DGeometry | s2json-spec - v1.4.1 Type Alias Point3DGeometry<M>
diff --git a/docs/types/PointGeometry.html b/docs/types/PointGeometry.html
index ea0988c..c7326e1 100644
--- a/docs/types/PointGeometry.html
+++ b/docs/types/PointGeometry.html
@@ -1,2 +1,2 @@
-
PointGeometry | s2json-spec - v1.4.0 Type Alias PointGeometry<M>
+
PointGeometry | s2json-spec - v1.4.1 Type Alias PointGeometry<M>
diff --git a/docs/types/Polygon.html b/docs/types/Polygon.html
index 9dd9215..1f4ad20 100644
--- a/docs/types/Polygon.html
+++ b/docs/types/Polygon.html
@@ -1,2 +1,2 @@
-
Polygon | s2json-spec - v1.4.0
+
Polygon | s2json-spec - v1.4.1
diff --git a/docs/types/Polygon3D.html b/docs/types/Polygon3D.html
index d6ed66b..56d1d63 100644
--- a/docs/types/Polygon3D.html
+++ b/docs/types/Polygon3D.html
@@ -1,2 +1,2 @@
-
Polygon3D | s2json-spec - v1.4.0
+
Polygon3D | s2json-spec - v1.4.1
diff --git a/docs/types/Polygon3DGeometry.html b/docs/types/Polygon3DGeometry.html
index afc18ad..5b5c37c 100644
--- a/docs/types/Polygon3DGeometry.html
+++ b/docs/types/Polygon3DGeometry.html
@@ -1,2 +1,2 @@
-
Polygon3DGeometry | s2json-spec - v1.4.0 Type Alias Polygon3DGeometry<M>
+
Polygon3DGeometry | s2json-spec - v1.4.1 Type Alias Polygon3DGeometry<M>
diff --git a/docs/types/PolygonGeometry.html b/docs/types/PolygonGeometry.html
index 8c06b17..1f62978 100644
--- a/docs/types/PolygonGeometry.html
+++ b/docs/types/PolygonGeometry.html
@@ -1,2 +1,2 @@
-
PolygonGeometry | s2json-spec - v1.4.0 Type Alias PolygonGeometry<M>
+
PolygonGeometry | s2json-spec - v1.4.1 Type Alias PolygonGeometry<M>
diff --git a/docs/types/PolygonMValues.html b/docs/types/PolygonMValues.html
index 65a4a68..c5c4617 100644
--- a/docs/types/PolygonMValues.html
+++ b/docs/types/PolygonMValues.html
@@ -1,2 +1,2 @@
-
PolygonMValues | s2json-spec - v1.4.0 Type Alias PolygonMValues<M>
+
PolygonMValues | s2json-spec - v1.4.1 Type Alias PolygonMValues<M>
diff --git a/docs/types/Primitive.html b/docs/types/Primitive.html
index c6d5823..b412c29 100644
--- a/docs/types/Primitive.html
+++ b/docs/types/Primitive.html
@@ -1,2 +1,2 @@
-
Primitive | s2json-spec - v1.4.0 Primitive :     | string     | number     | boolean     | null
+
Primitive | s2json-spec - v1.4.1 Primitive :     | string     | number     | boolean     | null
diff --git a/docs/types/Projection.html b/docs/types/Projection.html
index 0cd878f..17f17eb 100644
--- a/docs/types/Projection.html
+++ b/docs/types/Projection.html
@@ -1,2 +1,2 @@
-
Projection | s2json-spec - v1.4.0
+
Projection | s2json-spec - v1.4.1
diff --git a/docs/types/Properties.html b/docs/types/Properties.html
index d67d959..6cd6c87 100644
--- a/docs/types/Properties.html
+++ b/docs/types/Properties.html
@@ -1,2 +1,2 @@
-
Properties | s2json-spec - v1.4.0 Properties : Record < string , Value >
+
Properties | s2json-spec - v1.4.1 Properties : Record < string , Value >
diff --git a/docs/types/STPoint.html b/docs/types/STPoint.html
index f1a3a4d..1acff22 100644
--- a/docs/types/STPoint.html
+++ b/docs/types/STPoint.html
@@ -1,2 +1,2 @@
-
STPoint | s2json-spec - v1.4.0 STPoint : { Â Â Â Â face : Face ; Â Â Â Â m ?: MValue ; Â Â Â Â s : number ; Â Â Â Â t : number ; Â Â Â Â z ?: number ; }
+
STPoint | s2json-spec - v1.4.1 STPoint : { Â Â Â Â face : Face ; Â Â Â Â m ?: MValue ; Â Â Â Â s : number ; Â Â Â Â t : number ; Â Â Â Â z ?: number ; }
diff --git a/docs/types/Value.html b/docs/types/Value.html
index f7439db..32c936a 100644
--- a/docs/types/Value.html
+++ b/docs/types/Value.html
@@ -1,5 +1,5 @@
-
Value | s2json-spec - v1.4.0
diff --git a/docs/types/ValueArray.html b/docs/types/ValueArray.html
index f07d0bd..2f76c32 100644
--- a/docs/types/ValueArray.html
+++ b/docs/types/ValueArray.html
@@ -1,3 +1,3 @@
-
ValueArray | s2json-spec - v1.4.0 Value Array : ( Primitive | { Â Â Â Â Â Â Â Â [
key :
string ]
: Primitive ; Â Â Â Â } ) [] extends ( infer U ) [] Â Â Â Â ? U [] Â Â Â Â : never
diff --git a/docs/types/VectorCoordinates.html b/docs/types/VectorCoordinates.html
index 211fc4e..cd5d500 100644
--- a/docs/types/VectorCoordinates.html
+++ b/docs/types/VectorCoordinates.html
@@ -1,2 +1,2 @@
-
VectorCoordinates | s2json-spec - v1.4.0 Type Alias VectorCoordinates
+
VectorCoordinates | s2json-spec - v1.4.1 Type Alias VectorCoordinates
diff --git a/docs/types/VectorFeature.html b/docs/types/VectorFeature.html
index a42628f..6d1366d 100644
--- a/docs/types/VectorFeature.html
+++ b/docs/types/VectorFeature.html
@@ -1,2 +1,2 @@
-
VectorFeature | s2json-spec - v1.4.0 Type Alias VectorFeature<P, G>
+
VectorFeature | s2json-spec - v1.4.1 Type Alias VectorFeature<P, G>
diff --git a/docs/types/VectorFeatures.html b/docs/types/VectorFeatures.html
index d967994..3d7c1e7 100644
--- a/docs/types/VectorFeatures.html
+++ b/docs/types/VectorFeatures.html
@@ -1,2 +1,2 @@
-
VectorFeatures | s2json-spec - v1.4.0 Type Alias VectorFeatures
+
VectorFeatures | s2json-spec - v1.4.1 Type Alias VectorFeatures
diff --git a/docs/types/VectorGeometry.html b/docs/types/VectorGeometry.html
index 6f60ee6..00b020a 100644
--- a/docs/types/VectorGeometry.html
+++ b/docs/types/VectorGeometry.html
@@ -1,2 +1,2 @@
-
VectorGeometry | s2json-spec - v1.4.0 Type Alias VectorGeometry
+
VectorGeometry | s2json-spec - v1.4.1 Type Alias VectorGeometry
diff --git a/docs/types/VectorGeometryType.html b/docs/types/VectorGeometryType.html
index db239df..c981497 100644
--- a/docs/types/VectorGeometryType.html
+++ b/docs/types/VectorGeometryType.html
@@ -1,2 +1,2 @@
-
VectorGeometryType | s2json-spec - v1.4.0 Type Alias VectorGeometryType Vector Geometry Type : Â Â Â Â | "Point" Â Â Â Â | "MultiPoint" Â Â Â Â | "LineString" Â Â Â Â | "MultiLineString" Â Â Â Â | "Polygon" Â Â Â Â | "MultiPolygon"
+
VectorGeometryType | s2json-spec - v1.4.1 Type Alias VectorGeometryType Vector Geometry Type : Â Â Â Â | "Point" Â Â Â Â | "MultiPoint" Â Â Â Â | "LineString" Â Â Â Â | "MultiLineString" Â Â Â Â | "Polygon" Â Â Â Â | "MultiPolygon"
diff --git a/docs/types/VectorLineOffset.html b/docs/types/VectorLineOffset.html
index 481e547..d7bafe4 100644
--- a/docs/types/VectorLineOffset.html
+++ b/docs/types/VectorLineOffset.html
@@ -1,2 +1,2 @@
-
VectorLineOffset | s2json-spec - v1.4.0 Type Alias VectorLineOffset Vector Line Offset : number
+
VectorLineOffset | s2json-spec - v1.4.1 Type Alias VectorLineOffset Vector Line Offset : number
diff --git a/docs/types/VectorLineString.html b/docs/types/VectorLineString.html
index 99141d8..fd69615 100644
--- a/docs/types/VectorLineString.html
+++ b/docs/types/VectorLineString.html
@@ -1,2 +1,2 @@
-
VectorLineString | s2json-spec - v1.4.0 Type Alias VectorLineString
+
VectorLineString | s2json-spec - v1.4.1 Type Alias VectorLineString
diff --git a/docs/types/VectorLineStringGeometry.html b/docs/types/VectorLineStringGeometry.html
index 9c1e348..9ea4d8d 100644
--- a/docs/types/VectorLineStringGeometry.html
+++ b/docs/types/VectorLineStringGeometry.html
@@ -1,2 +1,2 @@
-
VectorLineStringGeometry | s2json-spec - v1.4.0 Type Alias VectorLineStringGeometry
+
VectorLineStringGeometry | s2json-spec - v1.4.1 Type Alias VectorLineStringGeometry
diff --git a/docs/types/VectorMultiLineOffset.html b/docs/types/VectorMultiLineOffset.html
index 68c209e..dcb58b6 100644
--- a/docs/types/VectorMultiLineOffset.html
+++ b/docs/types/VectorMultiLineOffset.html
@@ -1,2 +1,2 @@
-
VectorMultiLineOffset | s2json-spec - v1.4.0 Type Alias VectorMultiLineOffset
+
VectorMultiLineOffset | s2json-spec - v1.4.1 Type Alias VectorMultiLineOffset
diff --git a/docs/types/VectorMultiLineString.html b/docs/types/VectorMultiLineString.html
index bfd0f23..b16bb23 100644
--- a/docs/types/VectorMultiLineString.html
+++ b/docs/types/VectorMultiLineString.html
@@ -1,2 +1,2 @@
-
VectorMultiLineString | s2json-spec - v1.4.0 Type Alias VectorMultiLineString
+
VectorMultiLineString | s2json-spec - v1.4.1 Type Alias VectorMultiLineString
diff --git a/docs/types/VectorMultiLineStringGeometry.html b/docs/types/VectorMultiLineStringGeometry.html
index a54e2f2..c41becf 100644
--- a/docs/types/VectorMultiLineStringGeometry.html
+++ b/docs/types/VectorMultiLineStringGeometry.html
@@ -1,2 +1,2 @@
-
VectorMultiLineStringGeometry | s2json-spec - v1.4.0 Type Alias VectorMultiLineStringGeometry
+
VectorMultiLineStringGeometry | s2json-spec - v1.4.1 Type Alias VectorMultiLineStringGeometry
diff --git a/docs/types/VectorMultiPoint.html b/docs/types/VectorMultiPoint.html
index 21f6c63..038b84f 100644
--- a/docs/types/VectorMultiPoint.html
+++ b/docs/types/VectorMultiPoint.html
@@ -1,2 +1,2 @@
-
VectorMultiPoint | s2json-spec - v1.4.0 Type Alias VectorMultiPoint
+
VectorMultiPoint | s2json-spec - v1.4.1 Type Alias VectorMultiPoint
diff --git a/docs/types/VectorMultiPointGeometry.html b/docs/types/VectorMultiPointGeometry.html
index 4c0447a..23f622b 100644
--- a/docs/types/VectorMultiPointGeometry.html
+++ b/docs/types/VectorMultiPointGeometry.html
@@ -1,2 +1,2 @@
-
VectorMultiPointGeometry | s2json-spec - v1.4.0 Type Alias VectorMultiPointGeometry
+
VectorMultiPointGeometry | s2json-spec - v1.4.1 Type Alias VectorMultiPointGeometry
diff --git a/docs/types/VectorMultiPolygon.html b/docs/types/VectorMultiPolygon.html
index b0fac16..339a4f6 100644
--- a/docs/types/VectorMultiPolygon.html
+++ b/docs/types/VectorMultiPolygon.html
@@ -1,2 +1,2 @@
-
VectorMultiPolygon | s2json-spec - v1.4.0 Type Alias VectorMultiPolygon
+
VectorMultiPolygon | s2json-spec - v1.4.1 Type Alias VectorMultiPolygon
diff --git a/docs/types/VectorMultiPolygonGeometry.html b/docs/types/VectorMultiPolygonGeometry.html
index dadb02c..e278819 100644
--- a/docs/types/VectorMultiPolygonGeometry.html
+++ b/docs/types/VectorMultiPolygonGeometry.html
@@ -1,2 +1,2 @@
-
VectorMultiPolygonGeometry | s2json-spec - v1.4.0 Type Alias VectorMultiPolygonGeometry
+
VectorMultiPolygonGeometry | s2json-spec - v1.4.1 Type Alias VectorMultiPolygonGeometry
diff --git a/docs/types/VectorMultiPolygonOffset.html b/docs/types/VectorMultiPolygonOffset.html
index 16f99d4..4b4411e 100644
--- a/docs/types/VectorMultiPolygonOffset.html
+++ b/docs/types/VectorMultiPolygonOffset.html
@@ -1,2 +1,2 @@
-
VectorMultiPolygonOffset | s2json-spec - v1.4.0 Type Alias VectorMultiPolygonOffset
+
VectorMultiPolygonOffset | s2json-spec - v1.4.1 Type Alias VectorMultiPolygonOffset
diff --git a/docs/types/VectorOffsets.html b/docs/types/VectorOffsets.html
index 1bb7f11..eb0774a 100644
--- a/docs/types/VectorOffsets.html
+++ b/docs/types/VectorOffsets.html
@@ -1,2 +1,2 @@
-
VectorOffsets | s2json-spec - v1.4.0
+
VectorOffsets | s2json-spec - v1.4.1
diff --git a/docs/types/VectorPointGeometry.html b/docs/types/VectorPointGeometry.html
index f6b0676..4f82bad 100644
--- a/docs/types/VectorPointGeometry.html
+++ b/docs/types/VectorPointGeometry.html
@@ -1,2 +1,2 @@
-
VectorPointGeometry | s2json-spec - v1.4.0 Type Alias VectorPointGeometry
+
VectorPointGeometry | s2json-spec - v1.4.1 Type Alias VectorPointGeometry
diff --git a/docs/types/VectorPolygon.html b/docs/types/VectorPolygon.html
index fcdbcd3..1d65b92 100644
--- a/docs/types/VectorPolygon.html
+++ b/docs/types/VectorPolygon.html
@@ -1,2 +1,2 @@
-
VectorPolygon | s2json-spec - v1.4.0
+
VectorPolygon | s2json-spec - v1.4.1
diff --git a/docs/types/VectorPolygonGeometry.html b/docs/types/VectorPolygonGeometry.html
index 6714c41..a380b6c 100644
--- a/docs/types/VectorPolygonGeometry.html
+++ b/docs/types/VectorPolygonGeometry.html
@@ -1,2 +1,2 @@
-
VectorPolygonGeometry | s2json-spec - v1.4.0 Type Alias VectorPolygonGeometry
+
VectorPolygonGeometry | s2json-spec - v1.4.1 Type Alias VectorPolygonGeometry
diff --git a/docs/types/VectorPolygonOffset.html b/docs/types/VectorPolygonOffset.html
index 4a27242..688838f 100644
--- a/docs/types/VectorPolygonOffset.html
+++ b/docs/types/VectorPolygonOffset.html
@@ -1,2 +1,2 @@
-
VectorPolygonOffset | s2json-spec - v1.4.0 Type Alias VectorPolygonOffset
+
VectorPolygonOffset | s2json-spec - v1.4.1 Type Alias VectorPolygonOffset
diff --git a/docs/variables/A.html b/docs/variables/A.html
index 43c7551..cfb6635 100644
--- a/docs/variables/A.html
+++ b/docs/variables/A.html
@@ -1,2 +1,2 @@
-
A | s2json-spec - v1.4.0
+
A | s2json-spec - v1.4.1
diff --git a/docs/variables/EARTH_CIRCUMFERENCE.html b/docs/variables/EARTH_CIRCUMFERENCE.html
index fdb91b5..cc4acf5 100644
--- a/docs/variables/EARTH_CIRCUMFERENCE.html
+++ b/docs/variables/EARTH_CIRCUMFERENCE.html
@@ -1,2 +1,2 @@
-
EARTH_CIRCUMFERENCE | s2json-spec - v1.4.0 Variable EARTH_CIRCUMFERENCEConst
EARTH_ CIRCUMFERENCE : number = ...
+
EARTH_CIRCUMFERENCE | s2json-spec - v1.4.1 Variable EARTH_CIRCUMFERENCEConst
EARTH_ CIRCUMFERENCE : number = ...
diff --git a/docs/variables/EARTH_RADIUS.html b/docs/variables/EARTH_RADIUS.html
index 8b87a83..9f103c4 100644
--- a/docs/variables/EARTH_RADIUS.html
+++ b/docs/variables/EARTH_RADIUS.html
@@ -1,2 +1,2 @@
-
EARTH_RADIUS | s2json-spec - v1.4.0 Variable EARTH_RADIUSConst
EARTH_ RADIUS : 6371008.8 = 6_371_008.8
+
EARTH_RADIUS | s2json-spec - v1.4.1 Variable EARTH_RADIUSConst
EARTH_ RADIUS : 6371008.8 = 6_371_008.8
diff --git a/docs/variables/EARTH_RADIUS_EQUATORIAL.html b/docs/variables/EARTH_RADIUS_EQUATORIAL.html
index 324afd4..fbcc9cb 100644
--- a/docs/variables/EARTH_RADIUS_EQUATORIAL.html
+++ b/docs/variables/EARTH_RADIUS_EQUATORIAL.html
@@ -1,2 +1,2 @@
-
EARTH_RADIUS_EQUATORIAL | s2json-spec - v1.4.0 Variable EARTH_RADIUS_EQUATORIALConst
EARTH_ RADIUS_ EQUATORIAL : 6378137 = 6_378_137
+
EARTH_RADIUS_EQUATORIAL | s2json-spec - v1.4.1 Variable EARTH_RADIUS_EQUATORIALConst
EARTH_ RADIUS_ EQUATORIAL : 6378137 = 6_378_137
diff --git a/docs/variables/EARTH_RADIUS_POLAR.html b/docs/variables/EARTH_RADIUS_POLAR.html
index d95b266..d84c1b3 100644
--- a/docs/variables/EARTH_RADIUS_POLAR.html
+++ b/docs/variables/EARTH_RADIUS_POLAR.html
@@ -1,2 +1,2 @@
-
EARTH_RADIUS_POLAR | s2json-spec - v1.4.0 Variable EARTH_RADIUS_POLARConst
EARTH_ RADIUS_ POLAR : 6356752.3 = 6_356_752.3
+
EARTH_RADIUS_POLAR | s2json-spec - v1.4.1 Variable EARTH_RADIUS_POLARConst
EARTH_ RADIUS_ POLAR : 6356752.3 = 6_356_752.3
diff --git a/docs/variables/MARS_RADIUS.html b/docs/variables/MARS_RADIUS.html
index 2359081..ebbd200 100644
--- a/docs/variables/MARS_RADIUS.html
+++ b/docs/variables/MARS_RADIUS.html
@@ -1,2 +1,2 @@
-
MARS_RADIUS | s2json-spec - v1.4.0 Variable MARS_RADIUSConst
MARS_ RADIUS : 3389500 = 3_389_500
+
MARS_RADIUS | s2json-spec - v1.4.1 Variable MARS_RADIUSConst
MARS_ RADIUS : 3389500 = 3_389_500
diff --git a/docs/variables/MARS_RADIUS_EQUATORIAL.html b/docs/variables/MARS_RADIUS_EQUATORIAL.html
index 1a79a21..b6c7c87 100644
--- a/docs/variables/MARS_RADIUS_EQUATORIAL.html
+++ b/docs/variables/MARS_RADIUS_EQUATORIAL.html
@@ -1,2 +1,2 @@
-
MARS_RADIUS_EQUATORIAL | s2json-spec - v1.4.0 Variable MARS_RADIUS_EQUATORIALConst
MARS_ RADIUS_ EQUATORIAL : 3396200 = 3_396_200
+
MARS_RADIUS_EQUATORIAL | s2json-spec - v1.4.1 Variable MARS_RADIUS_EQUATORIALConst
MARS_ RADIUS_ EQUATORIAL : 3396200 = 3_396_200
diff --git a/docs/variables/MARS_RADIUS_POLAR.html b/docs/variables/MARS_RADIUS_POLAR.html
index 47dedb5..bd94153 100644
--- a/docs/variables/MARS_RADIUS_POLAR.html
+++ b/docs/variables/MARS_RADIUS_POLAR.html
@@ -1,2 +1,2 @@
-
MARS_RADIUS_POLAR | s2json-spec - v1.4.0 Variable MARS_RADIUS_POLARConst
MARS_ RADIUS_ POLAR : 3376200 = 3_376_200
+
MARS_RADIUS_POLAR | s2json-spec - v1.4.1 Variable MARS_RADIUS_POLARConst
MARS_ RADIUS_ POLAR : 3376200 = 3_376_200
diff --git a/docs/variables/MAXEXTENT.html b/docs/variables/MAXEXTENT.html
index 97fcc3e..99b2c37 100644
--- a/docs/variables/MAXEXTENT.html
+++ b/docs/variables/MAXEXTENT.html
@@ -1,2 +1,2 @@
-
MAXEXTENT | s2json-spec - v1.4.0 MAXEXTENT : 20037508.342789244 = 20_037_508.342789244
+
MAXEXTENT | s2json-spec - v1.4.1 MAXEXTENT : 20037508.342789244 = 20_037_508.342789244
diff --git a/docs/variables/MAXLAT.html b/docs/variables/MAXLAT.html
index b25f080..22970c2 100644
--- a/docs/variables/MAXLAT.html
+++ b/docs/variables/MAXLAT.html
@@ -1,2 +1,2 @@
-
MAXLAT | s2json-spec - v1.4.0 MAXLAT : 85.0511287798 = 85.0511287798
+
MAXLAT | s2json-spec - v1.4.1 MAXLAT : 85.0511287798 = 85.0511287798
diff --git a/package.json b/package.json
index 7b23ab4..0b293a0 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "s2json-spec",
"publisher": "OpenS2",
- "version": "1.4.0",
+ "version": "1.4.1",
"description": "S2JSON is a specification for encoding a variety of geographic data structures",
"keywords": [
"vector",
diff --git a/src/s2json.schema.json b/src/s2json.schema.json
index 9a701f4..9b45ca9 100644
--- a/src/s2json.schema.json
+++ b/src/s2json.schema.json
@@ -4,6 +4,7 @@
"oneOf": [
{ "$ref": "#/definitions/FeatureCollection" },
{ "$ref": "#/definitions/Feature" },
+ { "$ref": "#/definitions/VectorFeature" },
{ "$ref": "#/definitions/S2FeatureCollection" },
{ "$ref": "#/definitions/S2Feature" }
],
@@ -14,9 +15,9 @@
"type": { "type": "string", "enum": ["FeatureCollection"] },
"features": {
"type": "array",
- "items": { "$ref": "#/definitions/Feature" }
+ "items": { "oneOf": [{ "$ref": "#/definitions/Feature" }, { "$ref": "#/definitions/VectorFeature" }] }
},
- "bbox": { "type": "array", "items": { "type": "number" }, "minItems": 4, "maxItems": 4 }
+ "bbox": { "$ref": "#/definitions/bbox2D" }
},
"required": ["type", "features"],
"additionalProperties": false
@@ -29,7 +30,7 @@
"type": "array",
"items": { "$ref": "#/definitions/S2Feature" }
},
- "bbox": { "type": "array", "items": { "type": "number" }, "minItems": 4, "maxItems": 4 },
+ "bbox": { "$ref": "#/definitions/bbox2D" },
"faces": { "type": "array", "items": { "type": "number", "enum": [0, 1, 2, 3, 4, 5] }, "uniqueItems": true, "maxItems": 6 }
},
"required": ["type", "features", "faces"],
@@ -41,7 +42,19 @@
"id": { "type": "number", "minimum": 0 },
"type": { "type": "string", "enum": ["Feature"] },
"geometry": { "$ref": "#/definitions/geometry" },
- "properties": { "type": "object" },
+ "properties": { "$ref": "#/definitions/properties" },
+ "metadata": { "type": "object" }
+ },
+ "required": ["type", "geometry", "properties"],
+ "additionalProperties": false
+ },
+ "VectorFeature": {
+ "type": "object",
+ "properties": {
+ "id": { "type": "number", "minimum": 0 },
+ "type": { "type": "string", "enum": ["VectorFeature"] },
+ "geometry": { "$ref": "#/definitions/vectorGeometry" },
+ "properties": { "$ref": "#/definitions/properties" },
"metadata": { "type": "object" }
},
"required": ["type", "geometry", "properties"],
@@ -52,7 +65,7 @@
"properties": {
"id": { "type": "number", "minimum": 0 },
"type": { "type": "string", "enum": ["S2Feature"] },
- "geometry": { "$ref": "#/definitions/geometry" },
+ "geometry": { "$ref": "#/definitions/vectorGeometry" },
"properties": { "$ref": "#/definitions/properties" },
"face": { "type": "number", "enum": [0, 1, 2, 3, 4, 5] },
"metadata": { "type": "object" }
@@ -113,6 +126,18 @@
{ "$ref": "#/definitions/MultiPolygon3DGeometry" }
]
},
+ "vectorGeometry": {
+ "oneOf": [
+ { "$ref": "#/definitions/VectorPointGeometry" },
+ { "$ref": "#/definitions/VectorMultiPointGeometry" },
+ { "$ref": "#/definitions/VectorLineStringGeometry" },
+ { "$ref": "#/definitions/VectorMultiLineStringGeometry" },
+ { "$ref": "#/definitions/VectorPolygonGeometry" },
+ { "$ref": "#/definitions/VectorMultiPolygonGeometry" }
+ ]
+ },
+ "bbox2D": { "type": "array", "items": { "type": "number" }, "minItems": 4, "maxItems": 4 },
+ "bbox3D": { "type": "array", "items": { "type": "number" }, "minItems": 6, "maxItems": 6 },
"point": { "type": "array", "items": { "type": "number" }, "minItems": 2, "maxItems": 2 },
"point3D": { "type": "array", "items": { "type": "number" }, "minItems": 3, "maxItems": 3 },
"multiPoint": { "type": "array", "items": { "$ref": "#/definitions/point" } },
@@ -135,7 +160,7 @@
"properties": {
"type": { "type": "string", "enum": ["Point"] },
"coordinates": { "$ref": "#/definitions/point" },
- "bbox": { "type": "array", "items": { "type": "number" }, "minItems": 4, "maxItems": 4 },
+ "bbox": { "$ref": "#/definitions/bbox2D" },
"mValues": { "$ref": "#/definitions/mValue" }
},
"required": ["type", "coordinates"],
@@ -146,7 +171,7 @@
"properties": {
"type": { "type": "string", "enum": ["MultiPoint"] },
"coordinates": { "$ref": "#/definitions/multiPoint" },
- "bbox": { "type": "array", "items": { "type": "number" }, "minItems": 4, "maxItems": 4 },
+ "bbox": { "$ref": "#/definitions/bbox2D" },
"mValues": { "$ref": "#/definitions/mValueMultiPoint" }
},
"required": ["type", "coordinates"],
@@ -157,7 +182,7 @@
"properties": {
"type": { "type": "string", "enum": ["LineString"] },
"coordinates": { "$ref": "#/definitions/line" },
- "bbox": { "type": "array", "items": { "type": "number" }, "minItems": 4, "maxItems": 4 },
+ "bbox": { "$ref": "#/definitions/bbox2D" },
"mValues": { "$ref": "#/definitions/mValueLine" }
},
"required": ["type", "coordinates"],
@@ -168,7 +193,7 @@
"properties": {
"type": { "type": "string", "enum": ["MultiLineString"] },
"coordinates": { "$ref": "#/definitions/multiLine" },
- "bbox": { "type": "array", "items": { "type": "number" }, "minItems": 4, "maxItems": 4 },
+ "bbox": { "$ref": "#/definitions/bbox2D" },
"mValues": { "$ref": "#/definitions/mValueMultiLine" }
},
"required": ["type", "coordinates"],
@@ -179,7 +204,7 @@
"properties": {
"type": { "type": "string", "enum": ["Polygon"] },
"coordinates": { "$ref": "#/definitions/polygon" },
- "bbox": { "type": "array", "items": { "type": "number" }, "minItems": 4, "maxItems": 4 },
+ "bbox": { "$ref": "#/definitions/bbox2D" },
"mValues": { "$ref": "#/definitions/mValuePolygon" }
},
"required": ["type", "coordinates"],
@@ -190,7 +215,7 @@
"properties": {
"type": { "type": "string", "enum": ["MultiPolygon"] },
"coordinates": { "$ref": "#/definitions/multiPolygon" },
- "bbox": { "type": "array", "items": { "type": "number" }, "minItems": 4, "maxItems": 4 },
+ "bbox": { "$ref": "#/definitions/bbox2D" },
"mValues": { "$ref": "#/definitions/mValueMultiPolygon" }
},
"required": ["type", "coordinates"],
@@ -201,7 +226,7 @@
"properties": {
"type": { "type": "string", "enum": ["Point3D"] },
"coordinates": { "$ref": "#/definitions/point3D" },
- "bbox": { "type": "array", "items": { "type": "number" }, "minItems": 6, "maxItems": 6 },
+ "bbox": { "$ref": "#/definitions/bbox3D" },
"mValues": { "$ref": "#/definitions/mValue" }
},
"required": ["type", "coordinates"],
@@ -212,7 +237,7 @@
"properties": {
"type": { "type": "string", "enum": ["MultiPoint3D"] },
"coordinates": { "$ref": "#/definitions/multiPoint3D" },
- "bbox": { "type": "array", "items": { "type": "number" }, "minItems": 6, "maxItems": 6 },
+ "bbox": { "$ref": "#/definitions/bbox3D" },
"mValues": { "$ref": "#/definitions/mValueMultiPoint" }
},
"required": ["type", "coordinates"],
@@ -223,7 +248,7 @@
"properties": {
"type": { "type": "string", "enum": ["LineString3D"] },
"coordinates": { "$ref": "#/definitions/line3D" },
- "bbox": { "type": "array", "items": { "type": "number" }, "minItems": 6, "maxItems": 6 },
+ "bbox": { "$ref": "#/definitions/bbox3D" },
"mValues": { "$ref": "#/definitions/mValueLine" }
},
"required": ["type", "coordinates"],
@@ -234,7 +259,7 @@
"properties": {
"type": { "type": "string", "enum": ["MultiLineString3D"] },
"coordinates": { "$ref": "#/definitions/multiLine3D" },
- "bbox": { "type": "array", "items": { "type": "number" }, "minItems": 6, "maxItems": 6 },
+ "bbox": { "$ref": "#/definitions/bbox3D" },
"mValues": { "$ref": "#/definitions/mValueMultiLine" }
},
"required": ["type", "coordinates"],
@@ -245,7 +270,7 @@
"properties": {
"type": { "type": "string", "enum": ["Polygon3D"] },
"coordinates": { "$ref": "#/definitions/polygon3D" },
- "bbox": { "type": "array", "items": { "type": "number" }, "minItems": 6, "maxItems": 6 },
+ "bbox": { "$ref": "#/definitions/bbox3D" },
"mValues": { "$ref": "#/definitions/mValuePolygon" }
},
"required": ["type", "coordinates"],
@@ -256,11 +281,102 @@
"properties": {
"type": { "type": "string", "enum": ["MultiPolygon3D"] },
"coordinates": { "$ref": "#/definitions/multiPolygon3D" },
- "bbox": { "type": "array", "items": { "type": "number" }, "minItems": 6, "maxItems": 6 },
+ "bbox": { "$ref": "#/definitions/bbox3D" },
"mValues": { "$ref": "#/definitions/mValueMultiPoint" }
},
"required": ["type", "coordinates"],
"additionalProperties": false
+ },
+ "vectorLineOffset": { "type": "number" },
+ "vectorMultiLineOffset": { "type": "array", "items": { "$ref": "#/definitions/vectorLineOffset" } },
+ "vectorPolygonOffset": { "type": "array", "items": { "$ref": "#/definitions/vectorLineOffset" } },
+ "vectorMultiPolygonOffset": { "type": "array", "items": { "$ref": "#/definitions/vectorPolygonOffset" } },
+ "vectorPoint": {
+ "type": "object",
+ "properties": {
+ "x": { "type": "number" },
+ "y": { "type": "number" },
+ "z": { "type": "number" },
+ "m": { "$ref": "#/definitions/mValue" },
+ "t": { "type": "number" }
+ },
+ "required": ["x", "y"],
+ "additionalProperties": false
+ },
+ "vectorMultiPoint": { "type": "array", "items": { "$ref": "#/definitions/vectorPoint" } },
+ "vectorLine": { "type": "array", "items": { "$ref": "#/definitions/vectorPoint" } },
+ "vectorMultiLine": { "type": "array", "items": { "$ref": "#/definitions/vectorLine" } },
+ "vectorPolygon": { "type": "array", "items": { "$ref": "#/definitions/vectorLine" } },
+ "vectorMultiPolygon": { "type": "array", "items": { "$ref": "#/definitions/vectorPolygon" } },
+ "VectorPointGeometry": {
+ "type": "object",
+ "properties": {
+ "type": { "type": "string", "enum": ["Point"] },
+ "coordinates": { "$ref": "#/definitions/vectorPoint" },
+ "bbox": { "oneOf": [{ "$ref": "#/definitions/bbox2D" }, { "$ref": "#/definitions/bbox3D" }] },
+ "vecBBox": { "oneOf": [{ "$ref": "#/definitions/bbox2D" }, { "$ref": "#/definitions/bbox3D" }] }
+ },
+ "required": ["type", "coordinates"],
+ "additionalProperties": false
+ },
+ "VectorMultiPointGeometry": {
+ "type": "object",
+ "properties": {
+ "type": { "type": "string", "enum": ["MultiPoint"] },
+ "coordinates": { "$ref": "#/definitions/vectorMultiPoint" },
+ "bbox": { "oneOf": [{ "$ref": "#/definitions/bbox2D" }, { "$ref": "#/definitions/bbox3D" }] },
+ "vecBBox": { "oneOf": [{ "$ref": "#/definitions/bbox2D" }, { "$ref": "#/definitions/bbox3D" }] }
+ },
+ "required": ["type", "coordinates"],
+ "additionalProperties": false
+ },
+ "VectorLineStringGeometry": {
+ "type": "object",
+ "properties": {
+ "type": { "type": "string", "enum": ["LineString"] },
+ "coordinates": { "$ref": "#/definitions/vectorLine" },
+ "bbox": { "oneOf": [{ "$ref": "#/definitions/bbox2D" }, { "$ref": "#/definitions/bbox3D" }] },
+ "vecBBox": { "oneOf": [{ "$ref": "#/definitions/bbox2D" }, { "$ref": "#/definitions/bbox3D" }] },
+ "offset": { "$ref": "#/definitions/vectorLineOffset" }
+ },
+ "required": ["type", "coordinates"],
+ "additionalProperties": false
+ },
+ "VectorMultiLineStringGeometry": {
+ "type": "object",
+ "properties": {
+ "type": { "type": "string", "enum": ["MultiLineString"] },
+ "coordinates": { "$ref": "#/definitions/vectorMultiLine" },
+ "bbox": { "oneOf": [{ "$ref": "#/definitions/bbox2D" }, { "$ref": "#/definitions/bbox3D" }] },
+ "vecBBox": { "oneOf": [{ "$ref": "#/definitions/bbox2D" }, { "$ref": "#/definitions/bbox3D" }] },
+ "offset": { "$ref": "#/definitions/vectorMultiLineOffset" }
+ },
+ "required": ["type", "coordinates"],
+ "additionalProperties": false
+ },
+ "VectorPolygonGeometry": {
+ "type": "object",
+ "properties": {
+ "type": { "type": "string", "enum": ["Polygon"] },
+ "coordinates": { "$ref": "#/definitions/vectorPolygon" },
+ "bbox": { "oneOf": [{ "$ref": "#/definitions/bbox2D" }, { "$ref": "#/definitions/bbox3D" }] },
+ "vecBBox": { "oneOf": [{ "$ref": "#/definitions/bbox2D" }, { "$ref": "#/definitions/bbox3D" }] },
+ "offset": { "$ref": "#/definitions/vectorPolygonOffset" }
+ },
+ "required": ["type", "coordinates"],
+ "additionalProperties": false
+ },
+ "VectorMultiPolygonGeometry": {
+ "type": "object",
+ "properties": {
+ "type": { "type": "string", "enum": ["MultiPolygon"] },
+ "coordinates": { "$ref": "#/definitions/vectorMultiPolygon" },
+ "bbox": { "oneOf": [{ "$ref": "#/definitions/bbox2D" }, { "$ref": "#/definitions/bbox3D" }] },
+ "vecBBox": { "oneOf": [{ "$ref": "#/definitions/bbox2D" }, { "$ref": "#/definitions/bbox3D" }] },
+ "offset": { "$ref": "#/definitions/vectorMultiPolygonOffset" }
+ },
+ "required": ["type", "coordinates"],
+ "additionalProperties": false
}
}
}
\ No newline at end of file
diff --git a/test/index.test.ts b/test/index.test.ts
deleted file mode 100644
index d961dc2..0000000
--- a/test/index.test.ts
+++ /dev/null
@@ -1,133 +0,0 @@
-import Ajv from 'ajv';
-import { describe, expect, it } from 'bun:test';
-
-import schema from '../src/s2json.schema.json';
-
-import type { Feature } from '../src';
-
-const ajv = new Ajv();
-const validate = ajv.compile(schema);
-
-describe('feature', () => {
- it('feature point', () => {
- const validFeature: Feature = {
- type: 'Feature',
- geometry: {
- type: 'Point',
- coordinates: [-75.165222, 39.952583],
- },
- properties: {},
- };
- expect(validate(validFeature)).toBeTrue();
-
- const validFeatureWithOptionals: Feature = {
- id: 0,
- type: 'Feature',
- geometry: {
- type: 'Point',
- coordinates: [-75.165222, 39.952583],
- bbox: [-75.165222, 39.952583, -75.165222, 39.952583],
- mValues: { a: 1 },
- },
- properties: {
- name: 'Home',
- },
- };
- expect(validate(validFeatureWithOptionals)).toBeTrue();
-
- const badID: Feature = {
- id: -2,
- type: 'Feature',
- geometry: {
- type: 'Point',
- coordinates: [-75.165222, 39.952583],
- },
- properties: {},
- };
- expect(validate(badID)).toBeFalse();
-
- // @ts-expect-error - no properties
- const noProperties: Feature = {
- type: 'Feature',
- geometry: {
- type: 'Point',
- coordinates: [-75.165222, 39.952583],
- },
- };
- expect(validate(noProperties)).toBeFalse();
-
- // @ts-expect-error - no geometry
- const noGeometry: Feature = {
- type: 'Feature',
- properties: {},
- };
- expect(validate(noGeometry)).toBeFalse();
-
- // @ts-expect-error - no type
- const noType: Feature = {
- geometry: {
- type: 'Point',
- coordinates: [-75.165222, 39.952583],
- },
- properties: {},
- };
- expect(validate(noType)).toBeFalse();
-
- const badType: Feature = {
- // @ts-expect-error - bad type
- type: 'Point',
- geometry: {
- type: 'Point',
- coordinates: [-75.165222, 39.952583],
- },
- properties: {},
- };
- expect(validate(badType)).toBeFalse();
-
- const badGeometryType: Feature = {
- type: 'Feature',
- geometry: {
- // @ts-expect-error - bad geometry
- type: 'Feature',
- coordinates: [-75.165222, 39.952583],
- },
- properties: {},
- };
- expect(validate(badGeometryType)).toBeFalse();
-
- const badGeometryCoordinates: Feature = {
- type: 'Feature',
- geometry: {
- type: 'Point',
- // @ts-expect-error - bad geometry
- coordinates: [[-75.165222, 39.952583]],
- },
- properties: {},
- };
- expect(validate(badGeometryCoordinates)).toBeFalse();
-
- const badGeometryBBox: Feature = {
- type: 'Feature',
- geometry: {
- type: 'Point',
- coordinates: [-75.165222, 39.952583],
- // @ts-expect-error - bad geometry
- bbox: [-75.165222, 39.952583, -75.165222, 39.952583, -75.165222],
- },
- properties: {},
- };
- expect(validate(badGeometryBBox)).toBeFalse();
-
- const badGeometryMValues: Feature = {
- type: 'Feature',
- // @ts-expect-error - bad geometry
- geometry: {
- type: 'Point',
- coordinates: [-75.165222, 39.952583],
- mValues: [{ a: 1 }],
- },
- properties: {},
- };
- expect(validate(badGeometryMValues)).toBeFalse();
- });
-});
diff --git a/test/schema.test.ts b/test/schema.test.ts
new file mode 100644
index 0000000..14d7044
--- /dev/null
+++ b/test/schema.test.ts
@@ -0,0 +1,395 @@
+import Ajv from 'ajv';
+import { describe, expect, it } from 'bun:test';
+
+import schema from '../src/s2json.schema.json';
+
+import type { Feature, S2Feature, VectorFeature } from '../src';
+
+const ajv = new Ajv();
+const validate = ajv.compile(schema);
+
+describe('feature', () => {
+ it('feature point', () => {
+ const validFeature: Feature = {
+ type: 'Feature',
+ geometry: {
+ type: 'Point',
+ coordinates: [-75.165222, 39.952583],
+ },
+ properties: {},
+ };
+ expect(validate(validFeature)).toBeTrue();
+
+ const validFeatureWithOptionals: Feature = {
+ id: 0,
+ type: 'Feature',
+ geometry: {
+ type: 'Point',
+ coordinates: [-75.165222, 39.952583],
+ bbox: [-75.165222, 39.952583, -75.165222, 39.952583],
+ mValues: { a: 1 },
+ },
+ properties: {
+ name: 'Home',
+ },
+ };
+ expect(validate(validFeatureWithOptionals)).toBeTrue();
+
+ const badID: Feature = {
+ id: -2,
+ type: 'Feature',
+ geometry: {
+ type: 'Point',
+ coordinates: [-75.165222, 39.952583],
+ },
+ properties: {},
+ };
+ expect(validate(badID)).toBeFalse();
+
+ // @ts-expect-error - no properties
+ const noProperties: Feature = {
+ type: 'Feature',
+ geometry: {
+ type: 'Point',
+ coordinates: [-75.165222, 39.952583],
+ },
+ };
+ expect(validate(noProperties)).toBeFalse();
+
+ // @ts-expect-error - no geometry
+ const noGeometry: Feature = {
+ type: 'Feature',
+ properties: {},
+ };
+ expect(validate(noGeometry)).toBeFalse();
+
+ // @ts-expect-error - no type
+ const noType: Feature = {
+ geometry: {
+ type: 'Point',
+ coordinates: [-75.165222, 39.952583],
+ },
+ properties: {},
+ };
+ expect(validate(noType)).toBeFalse();
+
+ const badType: Feature = {
+ // @ts-expect-error - bad type
+ type: 'Point',
+ geometry: {
+ type: 'Point',
+ coordinates: [-75.165222, 39.952583],
+ },
+ properties: {},
+ };
+ expect(validate(badType)).toBeFalse();
+
+ const badGeometryType: Feature = {
+ type: 'Feature',
+ geometry: {
+ // @ts-expect-error - bad geometry
+ type: 'Feature',
+ coordinates: [-75.165222, 39.952583],
+ },
+ properties: {},
+ };
+ expect(validate(badGeometryType)).toBeFalse();
+
+ const badGeometryCoordinates: Feature = {
+ type: 'Feature',
+ geometry: {
+ type: 'Point',
+ // @ts-expect-error - bad geometry
+ coordinates: [[-75.165222, 39.952583]],
+ },
+ properties: {},
+ };
+ expect(validate(badGeometryCoordinates)).toBeFalse();
+
+ const badGeometryBBox: Feature = {
+ type: 'Feature',
+ geometry: {
+ type: 'Point',
+ coordinates: [-75.165222, 39.952583],
+ // @ts-expect-error - bad geometry
+ bbox: [-75.165222, 39.952583, -75.165222, 39.952583, -75.165222],
+ },
+ properties: {},
+ };
+ expect(validate(badGeometryBBox)).toBeFalse();
+
+ const badGeometryMValues: Feature = {
+ type: 'Feature',
+ // @ts-expect-error - bad geometry
+ geometry: {
+ type: 'Point',
+ coordinates: [-75.165222, 39.952583],
+ mValues: [{ a: 1 }],
+ },
+ properties: {},
+ };
+ expect(validate(badGeometryMValues)).toBeFalse();
+ });
+});
+
+describe('vector feature', () => {
+ it('feature point', () => {
+ const validFeature: VectorFeature = {
+ type: 'VectorFeature',
+ geometry: {
+ type: 'Point',
+ coordinates: { x: -75.165222, y: 39.952583 },
+ },
+ properties: {},
+ };
+ expect(validate(validFeature)).toBeTrue();
+
+ const validFeatureWithOptionals: VectorFeature = {
+ id: 0,
+ type: 'VectorFeature',
+ geometry: {
+ type: 'Point',
+ coordinates: { x: -75.165222, y: 39.952583, m: { a: 1 } },
+ bbox: [-75.165222, 39.952583, -75.165222, 39.952583],
+ },
+ properties: {
+ name: 'Home',
+ },
+ };
+ expect(validate(validFeatureWithOptionals)).toBeTrue();
+
+ const badID: VectorFeature = {
+ id: -2,
+ type: 'VectorFeature',
+ geometry: {
+ type: 'Point',
+ coordinates: { x: -75.165222, y: 39.952583 },
+ },
+ properties: {},
+ };
+ expect(validate(badID)).toBeFalse();
+
+ // @ts-expect-error - no properties
+ const noProperties: VectorFeature = {
+ type: 'VectorFeature',
+ geometry: {
+ type: 'Point',
+ coordinates: { x: -75.165222, y: 39.952583 },
+ },
+ };
+ expect(validate(noProperties)).toBeFalse();
+
+ // @ts-expect-error - no geometry
+ const noGeometry: VectorFeature = {
+ type: 'VectorFeature',
+ properties: {},
+ };
+ expect(validate(noGeometry)).toBeFalse();
+
+ // @ts-expect-error - no type
+ const noType: VectorFeature = {
+ geometry: {
+ type: 'Point',
+ coordinates: { x: -75.165222, y: 39.952583 },
+ },
+ properties: {},
+ };
+ expect(validate(noType)).toBeFalse();
+
+ const badType: VectorFeature = {
+ // @ts-expect-error - bad type
+ type: 'Point',
+ geometry: {
+ type: 'Point',
+ coordinates: { x: -75.165222, y: 39.952583 },
+ },
+ properties: {},
+ };
+ expect(validate(badType)).toBeFalse();
+
+ const badGeometryType: VectorFeature = {
+ type: 'VectorFeature',
+ geometry: {
+ // @ts-expect-error - bad geometry
+ type: 'Feature',
+ coordinates: { x: -75.165222, y: 39.952583 },
+ },
+ properties: {},
+ };
+ expect(validate(badGeometryType)).toBeFalse();
+
+ const badGeometryCoordinates: VectorFeature = {
+ type: 'VectorFeature',
+ // @ts-expect-error - bad geometry
+ geometry: {
+ type: 'Point',
+ coordinates: [{ x: -75.165222, y: 39.952583 }],
+ },
+ properties: {},
+ };
+ expect(validate(badGeometryCoordinates)).toBeFalse();
+
+ const badGeometryBBox: VectorFeature = {
+ type: 'VectorFeature',
+ geometry: {
+ type: 'Point',
+ coordinates: { x: -75.165222, y: 39.952583 },
+ // @ts-expect-error - bad bounding box
+ bbox: [-75.165222, 39.952583, -75.165222, 39.952583, -75.165222],
+ },
+ properties: {},
+ };
+ expect(validate(badGeometryBBox)).toBeFalse();
+
+ const badGeometryMValues: VectorFeature = {
+ type: 'VectorFeature',
+ geometry: {
+ type: 'Point',
+ // @ts-expect-error - bad m-value
+ coordinates: { x: -75.165222, y: 39.952583, m: [{ a: 1 }] },
+ },
+ properties: {},
+ };
+ expect(validate(badGeometryMValues)).toBeFalse();
+ });
+});
+
+describe('s2 feature', () => {
+ it('feature point', () => {
+ const validFeature: S2Feature = {
+ type: 'S2Feature',
+ face: 0,
+ geometry: {
+ type: 'Point',
+ coordinates: { x: -75.165222, y: 39.952583 },
+ },
+ properties: {},
+ };
+ expect(validate(validFeature)).toBeTrue();
+
+ const validFeatureWithOptionals: S2Feature = {
+ id: 0,
+ face: 0,
+ type: 'S2Feature',
+ geometry: {
+ type: 'Point',
+ coordinates: { x: -75.165222, y: 39.952583, m: { a: 1 } },
+ bbox: [-75.165222, 39.952583, -75.165222, 39.952583],
+ },
+ properties: {
+ name: 'Home',
+ },
+ };
+ expect(validate(validFeatureWithOptionals)).toBeTrue();
+
+ const badID: S2Feature = {
+ // bad id
+ id: -2,
+ face: 0,
+ type: 'S2Feature',
+ geometry: {
+ type: 'Point',
+ coordinates: { x: -75.165222, y: 39.952583 },
+ },
+ properties: {},
+ };
+ expect(validate(badID)).toBeFalse();
+
+ // @ts-expect-error - no properties
+ const noProperties: S2Feature = {
+ type: 'S2Feature',
+ geometry: {
+ type: 'Point',
+ coordinates: { x: -75.165222, y: 39.952583 },
+ },
+ };
+ expect(validate(noProperties)).toBeFalse();
+
+ // @ts-expect-error - no geometry
+ const noGeometry: S2Feature = {
+ type: 'S2Feature',
+ properties: {},
+ };
+ expect(validate(noGeometry)).toBeFalse();
+
+ // @ts-expect-error - no type
+ const noType: S2Feature = {
+ geometry: {
+ type: 'Point',
+ coordinates: { x: -75.165222, y: 39.952583 },
+ },
+ properties: {},
+ };
+ expect(validate(noType)).toBeFalse();
+
+ const badType: S2Feature = {
+ // @ts-expect-error - bad type
+ type: 'Point',
+ geometry: {
+ type: 'Point',
+ coordinates: { x: -75.165222, y: 39.952583 },
+ },
+ properties: {},
+ };
+ expect(validate(badType)).toBeFalse();
+
+ const badGeometryType: S2Feature = {
+ type: 'S2Feature',
+ geometry: {
+ // @ts-expect-error - bad geometry
+ type: 'Feature',
+ coordinates: { x: -75.165222, y: 39.952583 },
+ },
+ properties: {},
+ };
+ expect(validate(badGeometryType)).toBeFalse();
+
+ const badGeometryCoordinates: S2Feature = {
+ type: 'S2Feature',
+ // @ts-expect-error - bad geometry
+ geometry: {
+ type: 'Point',
+ coordinates: [{ x: -75.165222, y: 39.952583 }],
+ },
+ properties: {},
+ };
+ expect(validate(badGeometryCoordinates)).toBeFalse();
+
+ const badGeometryBBox: S2Feature = {
+ type: 'S2Feature',
+ geometry: {
+ type: 'Point',
+ coordinates: { x: -75.165222, y: 39.952583 },
+ // @ts-expect-error - bad bounding box
+ bbox: [-75.165222, 39.952583, -75.165222, 39.952583, -75.165222],
+ },
+ properties: {},
+ };
+ expect(validate(badGeometryBBox)).toBeFalse();
+
+ const badGeometryMValues: S2Feature = {
+ type: 'S2Feature',
+ face: 0,
+ geometry: {
+ type: 'Point',
+ // @ts-expect-error - bad m-value
+ coordinates: { x: -75.165222, y: 39.952583, m: [{ a: 1 }] },
+ },
+ properties: {},
+ };
+ expect(validate(badGeometryMValues)).toBeFalse();
+
+ const badFace: S2Feature = {
+ id: 0,
+ // @ts-expect-error - bad face
+ face: 10,
+ type: 'S2Feature',
+ geometry: {
+ type: 'Point',
+ coordinates: { x: -75.165222, y: 39.952583 },
+ },
+ properties: {},
+ };
+ expect(validate(badFace)).toBeFalse();
+ });
+});
Layer Class to contain the layer information for splitting or simplifying
+- Preparing search index...
- The search index is not available
s2json-spec - v1.4.1Class Layer
Layer Class to contain the layer information for splitting or simplifying
Index
Constructors
Properties
the layer's features
Returns Layer
Properties
features
the layer's features
name
the layer name
-Settings
On This Page
Constructors
Properties