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”
Absolutely. Just read the geojson specs https://tools.ietf.org/html/rfc7946#section-3.2:
A Feature object has a member with the name "properties". The value of the properties member is an object (any JSON object or JSON null value).
https://jsonlint.com/
Says it’s valid. That’s my definitive source.
Everyone is saying its valid except for QGIS people for some reason.
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.
How so, how is it not optimal? GeoJSON is perfectly fine.
You should do a twitter poll, and see how many of your followers think GeoJSON makes any sense for your data model.
Seriously? I don’t need a poll to tell me most folks think this is just fine. You still didn’t tell me how it isn’t optimal?
I look forward to your forthcoming blog entry “Just Because You Can Doesn’t Mean You Should”
Manifold would read that better than any other inferior GIS.