From 97c7d085dff06c08eb26a8b494f11234a1d7614f Mon Sep 17 00:00:00 2001 From: Clemens Portele Date: Wed, 7 Mar 2018 14:52:36 -0700 Subject: [PATCH] added GeoJSON response examples resolves #63 --- core/standard/clause_8_encodings.adoc | 89 ++++++++++++++++++++++++ docs/17-069.html | 97 ++++++++++++++++++++++++++- 2 files changed, 185 insertions(+), 1 deletion(-) diff --git a/core/standard/clause_8_encodings.adoc b/core/standard/clause_8_encodings.adoc index ce6b6170..74894cb3 100644 --- a/core/standard/clause_8_encodings.adoc +++ b/core/standard/clause_8_encodings.adoc @@ -101,6 +101,95 @@ link:https://raw.githubusercontent.com/opengeospatial/WFS_FES/master/core/openap These are generic schemas that do not include any application schema information about specific feature types or their properties. +.A GeoJSON FeatureCollection Object response +================= +In the example below, only the first and tenth feature is shown. Coordinates are not shown. + +[source,JSON] +---- +{ + "type" : "FeatureCollection", + "links" : [ { + "href" : "http://data.example.com/collections/buildings/items/?f=json", + "rel" : "self", + "type" : "application/geo+json", + "title" : "this document" + }, { + "href" : "http://data.example.com/collections/buildings/items/?f=html", + "rel" : "alternate", + "type" : "text/html", + "title" : "this document as HTML" + }, { + "href" : "http://data.example.com/collections/buildings/items/?f=json&startIndex=10&count=10", + "rel" : "next", + "type" : "application/geo+json", + "title" : "next page" + } ], + "features" : [ { + "type" : "Feature", + "id" : "123", + "geometry" : { + "type" : "Polygon", + "coordinates" : [ ... ] + }, + "properties" : { + "function" : "residential", + "floors" : "2" + } + }, { ... + }, { + "type" : "Feature", + "id" : "132", + "geometry" : { + "type" : "Polygon", + "coordinates" : [ ... ] + }, + "properties" : { + "function" : "public use", + "floors" : "10" + } + } ] +} +---- +================= + +.A GeoJSON Feature Object response +================= +In the example below, coordinates are not shown. + +[source,JSON] +---- +{ + "type" : "Feature", + "links" : [ { + "href" : "http://data.example.com/collections/buildings/items/123/?f=json", + "rel" : "self", + "type" : "application/geo+json", + "title" : "this document" + }, { + "href" : "http://data.example.com/collections/buildings/items/123/?f=html", + "rel" : "alternate", + "type" : "text/html", + "title" : "this document as HTML" + }, { + "href" : "http://data.example.com/collections/buildings/items", + "rel" : "collection", + "type" : "application/geo+json", + "title" : "the collection document" + } ], + "id" : "123", + "geometry" : { + "type" : "Polygon", + "coordinates" : [ ... ] + }, + "properties" : { + "function" : "residential", + "floors" : "2" + } +} +---- +================= + === Requirement Class "Geography Markup Language (GML), Simple Features Profile, Level 0" NOTE: TODO + diff --git a/docs/17-069.html b/docs/17-069.html index 98582db6..e78c599e 100644 --- a/docs/17-069.html +++ b/docs/17-069.html @@ -3475,6 +3475,101 @@

+
Example 9. A GeoJSON FeatureCollection Object response
+
+
+

In the example below, only the first and tenth feature is shown. Coordinates are not shown.

+
+
+
+
{
+  "type" : "FeatureCollection",
+  "links" : [ {
+    "href" : "http://data.example.com/collections/buildings/items/?f=json",
+    "rel" : "self",
+    "type" : "application/geo+json",
+    "title" : "this document"
+  }, {
+    "href" : "http://data.example.com/collections/buildings/items/?f=html",
+    "rel" : "alternate",
+    "type" : "text/html",
+    "title" : "this document as HTML"
+  }, {
+    "href" : "http://data.example.com/collections/buildings/items/?f=json&startIndex=10&count=10",
+    "rel" : "next",
+    "type" : "application/geo+json",
+    "title" : "next page"
+  } ],
+  "features" : [ {
+    "type" : "Feature",
+    "id" : "123",
+    "geometry" : {
+      "type" : "Polygon",
+      "coordinates" : [ ... ]
+    },
+    "properties" : {
+      "function" : "residential",
+      "floors" : "2"
+    }
+  }, { ...
+  }, {
+    "type" : "Feature",
+    "id" : "132",
+    "geometry" : {
+      "type" : "Polygon",
+      "coordinates" : [ ... ]
+    },
+    "properties" : {
+      "function" : "public use",
+      "floors" : "10"
+    }
+  } ]
+}
+
+
+
+ +
+
Example 10. A GeoJSON Feature Object response
+
+
+

In the example below, coordinates are not shown.

+
+
+
+
{
+  "type" : "Feature",
+  "links" : [ {
+    "href" : "http://data.example.com/collections/buildings/items/123/?f=json",
+    "rel" : "self",
+    "type" : "application/geo+json",
+    "title" : "this document"
+  }, {
+    "href" : "http://data.example.com/collections/buildings/items/123/?f=html",
+    "rel" : "alternate",
+    "type" : "text/html",
+    "title" : "this document as HTML"
+  }, {
+    "href" : "http://data.example.com/collections/buildings/items",
+    "rel" : "collection",
+    "type" : "application/geo+json",
+    "title" : "the collection document"
+  } ],
+  "id" : "123",
+  "geometry" : {
+    "type" : "Polygon",
+    "coordinates" : [ ... ]
+  },
+  "properties" : {
+    "function" : "residential",
+    "floors" : "2"
+  }
+}
+
+
+
+

8.4. Requirement Class "Geography Markup Language (GML), Simple Features Profile, Level 0"

@@ -3967,7 +4062,7 @@

9.3. Exceptions

-
Example 9. An exception response object definition
+
Example 11. An exception response object definition