[PATCH 02/10] Add valid GeoJSON examples from RFC7946
John Zaitseff
J.Zaitseff at zap.org.au
Tue Aug 27 11:55:04 BST 2019
---
examples/json/rfc7946-a1.geojson | 4 ++
examples/json/rfc7946-a2.geojson | 7 +++
examples/json/rfc7946-a3.geojson | 12 ++++
examples/json/rfc7946-a3b.geojson | 19 +++++++
examples/json/rfc7946-a4.geojson | 7 +++
examples/json/rfc7946-a5.geojson | 13 +++++
examples/json/rfc7946-a6.geojson | 30 ++++++++++
examples/json/rfc7946-a7.geojson | 16 ++++++
examples/json/rfc7946-example.geojson | 82 +++++++++++++++++++++++++++
9 files changed, 190 insertions(+)
create mode 100644 examples/json/rfc7946-a1.geojson
create mode 100644 examples/json/rfc7946-a2.geojson
create mode 100644 examples/json/rfc7946-a3.geojson
create mode 100644 examples/json/rfc7946-a3b.geojson
create mode 100644 examples/json/rfc7946-a4.geojson
create mode 100644 examples/json/rfc7946-a5.geojson
create mode 100644 examples/json/rfc7946-a6.geojson
create mode 100644 examples/json/rfc7946-a7.geojson
create mode 100644 examples/json/rfc7946-example.geojson
diff --git a/examples/json/rfc7946-a1.geojson b/examples/json/rfc7946-a1.geojson
new file mode 100644
index 000000000..393316a12
--- /dev/null
+++ b/examples/json/rfc7946-a1.geojson
@@ -0,0 +1,4 @@
+{
+ "type": "Point",
+ "coordinates": [100.0, 0.0]
+}
diff --git a/examples/json/rfc7946-a2.geojson b/examples/json/rfc7946-a2.geojson
new file mode 100644
index 000000000..7b4847471
--- /dev/null
+++ b/examples/json/rfc7946-a2.geojson
@@ -0,0 +1,7 @@
+{
+ "type": "LineString",
+ "coordinates": [
+ [100.0, 0.0],
+ [101.0, 1.0]
+ ]
+}
diff --git a/examples/json/rfc7946-a3.geojson b/examples/json/rfc7946-a3.geojson
new file mode 100644
index 000000000..63e2703cd
--- /dev/null
+++ b/examples/json/rfc7946-a3.geojson
@@ -0,0 +1,12 @@
+{
+ "type": "Polygon",
+ "coordinates": [
+ [
+ [100.0, 0.0],
+ [101.0, 0.0],
+ [101.0, 1.0],
+ [100.0, 1.0],
+ [100.0, 0.0]
+ ]
+ ]
+}
diff --git a/examples/json/rfc7946-a3b.geojson b/examples/json/rfc7946-a3b.geojson
new file mode 100644
index 000000000..3683726a4
--- /dev/null
+++ b/examples/json/rfc7946-a3b.geojson
@@ -0,0 +1,19 @@
+{
+ "type": "Polygon",
+ "coordinates": [
+ [
+ [100.0, 0.0],
+ [101.0, 0.0],
+ [101.0, 1.0],
+ [100.0, 1.0],
+ [100.0, 0.0]
+ ],
+ [
+ [100.8, 0.8],
+ [100.8, 0.2],
+ [100.2, 0.2],
+ [100.2, 0.8],
+ [100.8, 0.8]
+ ]
+ ]
+}
diff --git a/examples/json/rfc7946-a4.geojson b/examples/json/rfc7946-a4.geojson
new file mode 100644
index 000000000..3e39fbd0d
--- /dev/null
+++ b/examples/json/rfc7946-a4.geojson
@@ -0,0 +1,7 @@
+{
+ "type": "MultiPoint",
+ "coordinates": [
+ [100.0, 0.0],
+ [101.0, 1.0]
+ ]
+}
diff --git a/examples/json/rfc7946-a5.geojson b/examples/json/rfc7946-a5.geojson
new file mode 100644
index 000000000..fe5e8dee3
--- /dev/null
+++ b/examples/json/rfc7946-a5.geojson
@@ -0,0 +1,13 @@
+{
+ "type": "MultiLineString",
+ "coordinates": [
+ [
+ [100.0, 0.0],
+ [101.0, 1.0]
+ ],
+ [
+ [102.0, 2.0],
+ [103.0, 3.0]
+ ]
+ ]
+}
diff --git a/examples/json/rfc7946-a6.geojson b/examples/json/rfc7946-a6.geojson
new file mode 100644
index 000000000..8cf735391
--- /dev/null
+++ b/examples/json/rfc7946-a6.geojson
@@ -0,0 +1,30 @@
+{
+ "type": "MultiPolygon",
+ "coordinates": [
+ [
+ [
+ [102.0, 2.0],
+ [103.0, 2.0],
+ [103.0, 3.0],
+ [102.0, 3.0],
+ [102.0, 2.0]
+ ]
+ ],
+ [
+ [
+ [100.0, 0.0],
+ [101.0, 0.0],
+ [101.0, 1.0],
+ [100.0, 1.0],
+ [100.0, 0.0]
+ ],
+ [
+ [100.2, 0.2],
+ [100.2, 0.8],
+ [100.8, 0.8],
+ [100.8, 0.2],
+ [100.2, 0.2]
+ ]
+ ]
+ ]
+}
diff --git a/examples/json/rfc7946-a7.geojson b/examples/json/rfc7946-a7.geojson
new file mode 100644
index 000000000..ae5bab37d
--- /dev/null
+++ b/examples/json/rfc7946-a7.geojson
@@ -0,0 +1,16 @@
+{
+ "type": "GeometryCollection",
+ "geometries": [
+ {
+ "type": "Point",
+ "coordinates": [100.0, 0.0]
+ },
+ {
+ "type": "LineString",
+ "coordinates": [
+ [101.0, 0.0],
+ [102.0, 1.0]
+ ]
+ }
+ ]
+}
diff --git a/examples/json/rfc7946-example.geojson b/examples/json/rfc7946-example.geojson
new file mode 100644
index 000000000..0bb05b6de
--- /dev/null
+++ b/examples/json/rfc7946-example.geojson
@@ -0,0 +1,82 @@
+{
+ "features" : [
+ {
+ "geometry" : {
+ "coordinates" : [
+ 102,
+ 0.5
+ ],
+ "type" : "Point"
+ },
+ "properties" : {
+ "prop0" : "value0"
+ },
+ "type" : "Feature"
+ },
+ {
+ "geometry" : {
+ "coordinates" : [
+ [
+ 102,
+ 0
+ ],
+ [
+ 103,
+ 1
+ ],
+ [
+ 104,
+ 0
+ ],
+ [
+ 105,
+ 1
+ ]
+ ],
+ "type" : "LineString"
+ },
+ "properties" : {
+ "prop0" : "value0",
+ "prop1" : 0
+ },
+ "type" : "Feature"
+ },
+ {
+ "geometry" : {
+ "coordinates" : [
+ [
+ [
+ 100,
+ 0
+ ],
+ [
+ 101,
+ 0
+ ],
+ [
+ 101,
+ 1
+ ],
+ [
+ 100,
+ 1
+ ],
+ [
+ 100,
+ 0
+ ]
+ ]
+ ],
+ "type" : "Polygon"
+ },
+ "properties" : {
+ "prop0" : "value0",
+ "prop1" : {
+ "this" : "that"
+ }
+ },
+ "type" : "Feature"
+ }
+ ],
+ "type" : "FeatureCollection"
+}
--
2.20.1
More information about the Marble-devel
mailing list