Update:
I tried using a KML defined with multiples of 10 for coordinates, based on a UTM EPSG.
I made a CSV file using WKT with the following poly:
POLYGON((367910 807180, 367970 807180, 367970 807110, 367910 807110, 367910 807180))
SCR EPSG:20137 - Adindan / UTM zone 37N
Then, I made a KML using QGIS and used the KML file as input for EO Browser. I chose the option Popular Web Mercator (EPSG:3857) (Projected resolution: 10 m/px).
Here are some outputs of the EO Browser band file:
Pixel size 10.11425629987691899, -10.17298819407421639
Extend in EPSG:20137, to compare to the polygon coordinates listed above
north 807180.1593
east 367970.1857
south 807109.8410
west 367909.8144
So as you can see, the area of the WKT and of the output TIFF is not exactly the same -I know it’s quite similar (i.e. at a 10^-1 level) and I guess it’s coming from the reprojection from WKT to KML (which is automatically ESPG:4326), however I was wondering: what is the level of precision of EO Browser regarding KML input / area delimitations?
Thus, because the area is not exactly the same, the pixel size is not exactly at 10m either, which is one of the main issues in my case.
Does anyone have any idea how to make a better job than this ?
I exported a GEOJSON of the WKT using QGIS (in the same CRS, i.e. EPSG:20137 - Adindan / UTM 37N) but when I uploaded it in EO Browser, the area displayed was totally wrong. See at the end of the post if you’re interested in the file itself.
But what’s more critical is that the output TIFF is not aligned with the Sentinel-2 grid.
I tried with another projection, so I did once again a WKT with the following arguments:
POLYGON((4208350 815070, 4208350 815140, 4208400 815140, 4208400 815070, 4208350 815070))
CRS EPSG:3857 - WGS 84 / Pseudo-Mercator (I took the same as the outputs from EO Browser, even thought it’s not UTM and thus spherical -I suspected it would not work but tried anyways).
And yes, once again, the output file is not aligned with Sentinel2 grid either.
I finally tried with the EPSG:32637 WGS 84 / UTM Zone 37N using multiples of 10 to define the extend, but the output is still not aligned with the Sentinel2 grid.
I don’t really know if I did anything wrong compared to what you suggested (except for the part where the EPSG was not UTM), but in conclusion of what I tried:
- The EO Browser output file is not aligned with Sentinel2 grid in all cases
- The pixel resolution is not 10 meter (10^-1 precision)
- The resolution issue may be linked to the conversion to KML
- As I can’t use GEOJSON as input in EO Browser, the last bullet point cannot be verified
I would say that the method is not working, so far -unless I did not understand what you meant. Do you have any suggestion to make better attempts?
Also, to respond to your last reply @devis.peressutti: I would gladly take in some more details about this matter, if possible !
Here is my GEOJSON file:
{
“type”: “FeatureCollection”,
“name”: “TUMMA_32637”,
“crs”: { “type”: “name”, “properties”: { “name”: “urn:ogc:def:crs:EPSG::32637” } },
“features”: [
{ “type”: “Feature”, “properties”: { “id”: 1 }, “geometry”: { “type”: “Polygon”, “coordinates”: [ [ [ 368000.0, 807380.0 ], [ 368060.0, 807380.0 ], [ 368060.0, 807310.0 ], [ 368000.0, 807310.0 ], [ 368000.0, 807380.0 ] ] ] } }
]
}