Platial's Chris Goad is offering JDIL as a way forward for Geo-JSON. JDIL (I presume this is an acronym for JSON Data Integration Language) is used at Platial to map RSS 1.0 XML feeds to JSON [example feed]. It's thorough and seems a decent solution to the problems particular to RSS 1.0, but those problems don't exist in my applications.
The reason for the interest in Geo-JSON, for those who aren't familiar with JSON, is twofold: JSON can be evaluated by your browser's javascript engine, and, wrapped in javascript, can exploit a hole in your browser's same-domain policy (nicely explained by Douglas Crockford here) and allow you to integrate geo-data from diverse sites. The same-domain policy prevents us from using XML, and efforts to port XML features to JSON seem to be an inevitable result. I'm not as pessimistic about these efforts as some.
The Geo-JSON I am using for Pleiades [wiki, example] is inspired by Atom 1.0. There's no pastiche of namespaces, and, as far as I'm concerned, any specialized content could be carried as an escaped XML string property. I also prefer arrays of numeric coordinates to JDIL's georss:type string property, as it removes the need to parse a string on the client end. What to do about polygons with holes or multi- types is an open question. I think the way to go is to follow WKT, but with arrays of numbers instead of text.
{
"version": "1.1",
"srid": "EPSG:2193",
"items": [
{
"id": 1234,
"point": [1729539, 5914273],
"title": "TEST_1234",
"link": "http://example.com/url/for/poi/1234"
}
]
}
(it's also valid to use 'linestring' or 'polygon', in which case it's an array [x0,y0,x1,y1, ...])
Which is similar to the content transferred via GeoRSS...
<feed xmlns="..." xmlns:georss="..." xmlns:gml="..." >
<id>http://url/of/georss/atom/feed</id>
<title>GeoRSS Atom Example</title>
<updated>2005-06-06T00:00:00Z</updated>
<entry>
<id>2230</id>
<updated>2005-06-06T00:00:00Z</updated>
<title>Test Point 2230</title>
<summary>Summary of Test Point 2230</summary>
<georss:point>174.568911290684 -36.9276921875886</georss:point>
<link href="http://url/to/detail/on/point/2230" />
</entry>
</feed>Comments are closed after 13 days.
Some rights reserved 2008 by Sean Gillies.
1Re: More Geo-JSON
Tom Kralidis, 2007-02-07T17:52:47Z