Categories
Thoughts

Arrays in GeoJSON

So my last post was very positive. I figured out how to relate the teams that share a stadium with the stadium itself. This was important because I wanted to eliminate the redundant points that were on top of each other. For those who don’t recall, I have an example in this gist:

Now I mentioned that there were issues displaying this in GIS applications and was promptly told I was doing this incorrectly:

If you click on that tweet you’ll see basically that you can’t do it the way I want and I have to go back to the way I was doing it before:

I had a conversation with Bill Dollins about it and he sums it up susinctly:

I get it, but “Do it this way because that’s what the software can handle” is an unsatisfying answer.

So I’m stuck, I honestly don’t care if QGIS can read the data, because it can. It just isn’t optimal. What I do care about is an organized dataset in GeoJSON. So my question that I can’t get a definitive answer, “is the array I have above valid GeoJSON code?”. From what I’ve seen, yes. But nobody wants to go on record as saying absolutely. I could say, hell with it I’m moving forward but I don’t want to go down a dead end road.

9 replies on “Arrays in GeoJSON”

Have you considered you might be trying to fit a square peg into a round hole? Regardless if what you are producing is or isn’t valid GeoJSON, GeoJSON is very clearly not the optimal storage format for your data model. All the bitching & moaning in the world isn’t going to change that.

You should do a twitter poll, and see how many of your followers think GeoJSON makes any sense for your data model.

I look forward to your forthcoming blog entry “Just Because You Can Doesn’t Mean You Should”

Leave a Reply