What is the correct representation of the value of schema.org/polygon when used in JSON-LD?

The data representation that I will try to use for the RESTful API, JSON-LD , and the dictionary that I intend to use are the words schema.org .

The vocabulary of schema.org/GeoShape says that polygons should be in text format, but they don’t say exactly which text format. It was also not indicated that it should use the WKT Polygon format.

WKT polygon format (well-known text)

POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))

However, since I will be presenting data using JSON-LD, it might also be wise to use something similar with GeoJson polygons or a native JSON array.

GeoJson Polygon Format

{ "type": "Polygon", "coordinates": [ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ] ] } 

Built-in 2D JSON Array

 [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ] 

With that in mind, what is the representation of the correct schema.org/polygon value when used in JSON-LD?

+3
json rest json-ld linked-data
Aug 11 '14 at 3:31 on
source share
1 answer

I would highly recommend using the proposed text format as what most consumers expect. If you prefer a more structured view, you can use GeoJSON-LD instead: http://geojson.org/vocab

+2
Aug 12 '14 at 15:30
source share



All Articles