-
Notifications
You must be signed in to change notification settings - Fork 35
Addition of a GeoJSON profile URI (ala RFC6906) #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
RFC4267 doesn't specify any media type parameters, but a profile parameter is a big help to GeoJSON. Without it, we'd probably need a custom media type. GeoJSON's use of a profile parameter does not alter the (JSON) processing model, it only indicates that the root object contains geographic features to be interpreted according to the GeoJSON spec.
|
That is a cool move. I like it! What jumped to my eyes is, that this is incomplete (technically) as we For the latter see attached and for the former I suggest in template.xml inserting: after the one for RFC5246 around line 12/13 and inserting: directly after: at around lines 109/110. That should close the loop that the "[RFC6906] reference" in the All the best,
|
|
So where would the profile URI when using GeoJSON? JSON has no standardized place for it in JSON payload. As sean pointed out, JSON does not have a profile media type parameter. So one place to put it would be in a Link HTTP header. Is that what you're thinking? |
|
I was just going to ask more or less the same thing. It feels like a good idea, but also feels like it also pulls in HTTP and possibly other considerations that are really not part of GeoJSON. However, they also would probably help interoperability. Also, why only at the FeatureCollection level? Does this also commit us to maintaining a retrievable resource at the URI endpoint? That seems to be in the spirit of RFC6906. RFC6906 seems to be content with pointing to anything informative, why not point back to the spec? But that means that we'd need to know the RFC number… but then if GeoSON.org goes away, it will still work. On Jun 14, 2013, at 1:49 PM, Erik Wilde notifications@github.com wrote:
|
|
On 2013-06-14 10:59 , Allan Doyle wrote:
actually, RFC 6906 is content with not pointing to anything. the profile |
|
@adoyle, I think there are potentially other profiles to be explored, not just the feature collection one. In OData, it looks like GeoJSON geometries will be employed, but not features or feature collections precisely as described in our spec. A profile that states that geometries are in use (but not nocessarily features or collections) could help there. And the Google Maps Engine API employs another profile (an object with a features item but no FeatureCollection type): https://developers.google.com/maps-engine/documentation/reference/v1/tables/features/batchPatch. @dret, when I started this issue, I felt like link headers were too obscure, but now I've discovered that GitHub uses them for pagination (http://developer.github.com/v3/#pagination) and that they're supported by my favorite Python HTTP lib (http://www.python-requests.org/en/latest/user/advanced/#link-headers). So maybe link headers are going to be good enough. It's worth mentioning that such a profile seems to be of no use in applications like GitHub's because GitHub only deals in files and file extensions, not general media and MIME media types. But I think that GitHub's choice to only make maps for files ending in .geojson shows that it is important to have an identifier for our profile. |
|
On 2013-06-17 12:23 , Sean Gillies wrote:
it seems like the idea of processing HTTP header information is getting |
|
This could work, though I still wonder if we might be better off just pushing for a new mime type. As discussed on Twitter, I'm considering a use case where I might need to be able to serve both geojson and "simple" json at the same URI, and differentiate between them based only on a client Edit: never mind, then |
|
On 2013-06-21 10:15 , S. Andrew Sheppard wrote:
sounds reasonable to me. profiles really are not so much about signaling when you process XML, you see a tree with labels and order and a very however, Podcasts are really just a special case of Atom, so there it |
|
Can I try to summarize the arguments for a GeoJSON media type?
Does that sound right? Am I missing anything? My argument against a specific GeoJSON media type is that GeoJSON, unlike some other JSON based formats, is "just" JSON. We don't include any protocols or hypermedia concerns as in Mike Amundson's Collection+JSON format (http://amundsen.com/media-types/collection/format/) and don't have a semantic web layer like JSON-LD (http://json-ld.org/spec/latest/json-ld/#interpreting-json-as-json-ld). We don't have thin JSON wrappers around mostly binary blob or plain/HTML content like the GitHub API does. GeoJSON is just strings and arrays of numbers in a particular structure. On the other hand, perhaps the coordinate and spatial reference system concerns here are strong enough to warrant a media type; all applications are required to have at least a simple model of the Earth's surface, and applications will be broken in some cases if they aren't aware of projections. |
|
2 and 3 sum up the argument for me. I think 1 could actually be used as an argument for sticking with Now that I understand it better, I am warming up to the idea of specifying a That said, the utility of having a specific profile for This would of course leave it to the implementer to check the 'type' parameter on the root object to figure out how to actually process it. In practice, that's probably what most existing client software is doing already. In summary:
|
|
On 2013-06-23 8:35 , Sean Gillies wrote:
i see your point, and it certainly is common for applications to use strictly speaking, JSON's generic media type (and the ones of other |
|
Okay, I rescind my comment above that GitHub's Other arguments may still be valid? |
|
If you all don't mind, I'm going to close this pull request. We can revisit this after we submit. |
RFC4267 doesn't specify any media type parameters, but a profile
parameter is a big help to GeoJSON. Without it, we'd probably need
a custom media type. GeoJSON's use of a profile parameter does not
alter the (JSON) processing model, it only indicates that the root
object contains geographic features to be interpreted according to
the GeoJSON spec.