[Geojson] Features without geometry
Christopher Schmidt
crschmidt at metacarta.com
Thu Sep 20 08:48:37 PDT 2007
On Thu, Sep 20, 2007 at 11:11:43AM -0400, Andrew Turner wrote:
> I agree (I think) with Stephen.
>
> GeoJSON seems to have defined it's own, stand-alone format that
> happens to be in JSON notation. This is different from GeoRSS which
> merely added geographic extensions to the RSS & Atom formats (and uses
> XML notation).
GeoJSON defines several distinct pieces of JSON:
* Geometry. Must have type and coordinates.
* Feature: Must have type and geometry, may have properties.
* GeometryCollection: Must have type and members. members must be
an array of Geometries.
* FeatureCollection: Must have type and members. members must be
an array of Features.
.
> What I think Stephen is looking for, and I would be to, is merely a
> path for using GeoJSON to "add geometry" to more complete JSON
> objects. This is "flipped" from what the last example on the draft is
The Geometry object can be used inside anything. however, the property
names are *just strings* -- since JSON has nothing like built in
namespace handling, anything else is asking too much of the multitude of
JSON clients out there. (In fact, some have said that the *existing*
spec is too hard for clients to handle... but C# programmers aren't my
highest priority anyway ;))
> {
> "type" : "atom:item",
> "atom:summary": "post 2",
> "atom:description" : "i love geoblogging"
> "location" : {
> "type", "geo:Point",
> "geo:coordinates": [-120, 40]
> }
> }
This could be:
{
"type" : "atom:item",
"atom:summary": "post 2",
"atom:description" : "i love geoblogging"
"location" : {
"type", "Point",
"coordinates": [-120, 40]
}
}
and the 'location' field would be a valid GeoJSON Geometry.
So, I think what you want already exists. Except namespaces in JSON.
Those don't exist. :)
Regards,
--
Christopher Schmidt
MetaCarta
More information about the GeoJSON
mailing list