More Geo-JSON

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.


Re: More Geo-JSON

Author: Tom Kralidis

Have you tried processing remote-site XML with proxies? Note that, in Apache, you can do a bit with mod_proxy, or you can have a proxy script (Mapbuilder has this for remote XML services).

Re: More Geo-JSON

Author: Sean

Sure, but that's beyond the ability or means of most users.

Re: More Geo-JSON

Author: chris goad

Putting coordinates inside strings, rather then in arrays or structures, comes from GeoRSS . JDIL itself doesn't care - it provides encoding for whatever vocab is of interest (the examples happen to use GeoRSS) I agree that it's better to expose the structure of the data directly in JSON, rather than requiring string parsing. The w3c geo vocab does this, but only for points. Maybe a future standard will fill this gap ....

Re: More Geo-JSON

Author: Rob

We've done something very similar...
  "version": "1.1",
  "srid": "EPSG:2193",
  "items": [
      "id": 1234,
      "point": [1729539, 5914273],
      "title": "TEST_1234",
      "link": ""
(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="..." >
  <title>GeoRSS Atom Example</title>
    <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" />