.json should also be considered an acceptable filename for geojson
Closed this issue · 5 comments
Agreed, geosjon
files are very frequently served with the regular json
extension.
@jgravois just rewrote geohub and released 1.0.0, should be easier to fix this issue now.
The gist portion of geohub doesn't look for .geojson
files, it just tries to parse the contents of each file and look for the "type": "FeatureCollection"
property.
https://github.com/koopjs/geohub/blob/master/lib/gist.js
The github repo portion however does limit extraction to files with the .geojson
extension.
https://github.com/koopjs/geohub/blob/master/lib/repo.js#L48
It might be as easy as changing /geojson/
to /json/
in that block, but something tells me it's going to be more complicated than that. PRs welcome! I'll try to get to it soon if you don't get to it first.
i'm headed out of town for about a week, but i'd love to take a 🔪 at fixing this when i get back if its okay with you.