This is my first post and I hope I can help anyone facing the same problem as me.
I have a dump of all tileInfo.json files from the L2A bucket (from around mid january 2022). I was trying to create a geographic index on this dump, which I have in a MongoDB instance, and I ended up getting an error of an invalid GeoJSON. Apparently, at the time of this post, that are ~5700 files with invalid tileDataGeometry entries. To be more precise, they have the entry, but it is like this:
{ type: "Polygon", coordinates: [ [] ] }
After checking the GeoJSON RFC, I assumed that it only meant empty arrays on the first depth level. So this might be invalid? I am not 100% sure.
Anyone else with this error?
I used the following MongoDB query to get the these results. There might be different errors over there:
These files are on the border of the orbit, where the intersection of (all) of the detector geometries result in very small area (up to a few 100 S-2 10m pixels), so they get “simplified” to empty geometry.
As they area is very small, and are on the border of the orbit, they provide very limited information in the first place.
If you really need their geometries to be non-empty, you will have to parse the ESA’s provided GML files (in the qi “folder” on the bucket).
In my case, I’d need the geometries to be non-existent or valid GeoJSONS. This is just a hobby project of mine. I am just worried that the service which generates the GeoJSON geometries is generating, what it seems, invalid GeoJSONs.
Is this expected behavior?
The linters/validators I tried all point that the GeoJSON is invalid:
{ type: "Polygon", coordinates: [ [] ] }
And, for me, it seems that it goes against the RFC. I am not calling your attention to this because I want it fixed. I am just trying to point that it might be a bug. But if you say it is expected behavior it is fine by me.