Skip to main content

Hello everyone!


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:


db.tiles.find(
{
$and: [
{ "tileDataGeometry": { $exists: true } },
{ "tileDataGeometry.coordinates": { $exists: true } },
{ "tileDataGeometry.coordinates.0": { $size: 0 } }
]
},
{ path: 1, _id: 0, tileDataGeometry: 1 }
)

After messing around a bit, there are many tiles that repeatedly have this problem and some that have it only once.


Here is a ZeroBin link with all the problematic files listed.


Ps. I’ve used ZeroBin because PasteBin has a limit of 512kb 😕

Thanks for reporting, will have a look and get back to you.


Matej


Hi @meyer1994


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).


Best,

Matej


Hello @batic

Thanks for you quick reply.


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.


Thanks again,

João


Also…


L1C does not show the key tileDataGeometry for one of the tiles I listed on the first post. But L2A does.


Reply