Closed ekansa closed 10 years ago
Note that you can "extend" GeoJSON simply by adding additional members. For example, this would be completely valid GeoJSON:
{
"type": "Point",
"categories": ["http://example.com/#whatever"],
"coordinates": [100.0, 0.0]
}
No, @ekansa, that can't be done because it will break existing GeoJSON readers.
But if we do not alias GeoJSON "type" to "@type", then you can do this:
{ "@context": { "Feature": "http://example.com/vocab#Feature", "Thingy": "http://example.com/vocab#Thingy" },
{ "type": "Feature",
"@type": ["Feature", "Thingy"] }
See what I mean? Keep the GeoJSON sense of type, but extend the object with JSON-LD @type.
Makes sense.
I'll update my experiments to avoid using the aliased @type for non-GeoJSON typing.
And I'll change the example in the README to highlight this way of extending GeoJSON.
Yeah! This is really exciting!
One thing that would be useful would by to allow an array of multiple "types". It's often needed to assert that a resource has types beyond what's defined by GeoJSON. I'd like to say that something has type => "FeatureCollection" and type => [uri to my type].