Skip to content

Commit fcd9402

Browse files
committed
Add GeoJSON-LD example
1 parent ed4b103 commit fcd9402

File tree

1 file changed

+67
-2
lines changed

1 file changed

+67
-2
lines changed

geojson-ld.md

Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ layout: home
33
title: GeoJSON-LD
44
---
55

6-
# GeoJSON-LD
6+
# GeoJSON-LD 1.0
77

88
A vocabulary and JSON-LD context for GeoJSON
99

10-
The GeoJSON-LD project defines a base context for processing GeoJSON according
10+
GeoJSON-LD 1.0 defines a base context for processing GeoJSON according
1111
to the [JSON-LD](https://www.w3.org/TR/json-ld/) processing model. When
1212
a JSON-LD processor encounters a GeoJSON document with the
1313
`application/geo+json` media type that does not contain a `@context` member, it
@@ -17,6 +17,71 @@ context defined here but MUST NOT override or change the meaning of its terms.
1717
The vocabulary is published at [http://geojson.org/vocab#](http://geojson.org/vocab#) and the context is
1818
published at [http://geojson.org/geojson-context.jsonld](http://geojson.org/geojson-context.jsonld).
1919

20+
## Example
21+
22+
Pasting the following GeoJSON-LD document
23+
24+
```json
25+
{
26+
"@context": {
27+
"geojson": "http://geojson.org/vocab#",
28+
"Feature": "geojson:Feature",
29+
"FeatureCollection": "geojson:FeatureCollection",
30+
"GeometryCollection": "geojson:GeometryCollection",
31+
"LineString": "geojson:LineString",
32+
"MultiLineString": "geojson:MultiLineString",
33+
"MultiPoint": "geojson:MultiPoint",
34+
"MultiPolygon": "geojson:MultiPolygon",
35+
"Point": "geojson:Point",
36+
"Polygon": "geojson:Polygon",
37+
"bbox": {
38+
"@container": "@list",
39+
"@id": "geojson:bbox"
40+
},
41+
"coordinates": "geojson:coordinates",
42+
"description": "http://purl.org/dc/terms/description",
43+
"features": {
44+
"@container": "@set",
45+
"@id": "geojson:features"
46+
},
47+
"geometry": "geojson:geometry",
48+
"id": "@id",
49+
"properties": "geojson:properties",
50+
"type": "@type",
51+
"description": "http://purl.org/dc/terms/description",
52+
"title": "http://purl.org/dc/terms/title"
53+
},
54+
"type": "Feature",
55+
"id": "http://example.com/features/1",
56+
"geometry": {"type": "Point", "coordinates": [0.0, 0.0]},
57+
"properties": {
58+
"title": "Null Island",
59+
"description": "A fictional island in the Gulf of Guinea"
60+
}
61+
}
62+
```
63+
64+
into the [JSON-LD Playground](http://json-ld.org/playground/) form yields
65+
the following compacted JSON-LD.
66+
67+
```json
68+
{
69+
"@id": "http://example.com/features/1",
70+
"@type": "http://geojson.org/vocab#Feature",
71+
"http://geojson.org/vocab#geometry": {
72+
"@type": "http://geojson.org/vocab#Point",
73+
"http://geojson.org/vocab#coordinates": [
74+
0,
75+
0
76+
]
77+
},
78+
"http://geojson.org/vocab#properties": {
79+
"http://purl.org/dc/terms/description": "A fictional island in the Gulf of Guinea",
80+
"http://purl.org/dc/terms/title": "Null Island"
81+
}
82+
}
83+
```
84+
2085
## See Also
2186

2287
Activity Streams 2.0: https://www.w3.org/TR/activitystreams-core/, from which

0 commit comments

Comments
 (0)