Estoy intentando subir varios mosaicos a Google Earth Engine utilizando la opción de manifiesto: earthengine upload image --manifest manifest.json
Tengo problemas para entender e implementar las opciones de CRS y transformación afín. A continuación un resumen de lo que he intentado.
No consigo la combinación adecuada de opciones para unir los azulejos en un solo activo.
1. Cargar un solo azulejo
Manualmente (interfaz gráfica del navegador) o mediante el manifiesto: sin problemas. Véase por ejemplo esta imagen
2. Cargar varios mosaicos
Proyección 4326
"crs" : "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433],AUTHORITY[\"EPSG\",\"4326\"]]"
Manifiesto sin transformación afín
"sources": [
{
"uris": [
"gs://sg20-upload-gee/phh2o_0-5cm_mean_tileSG-004-046_1-3.tif"
]
},
{
"uris": [
"gs://sg20-upload-gee/phh2o_0-5cm_mean_tileSG-004-046_3-2.tif"
]
}
]
- Error:
FAILED Affine mismatch: found AffineTransform[[0.004193911810302, 0.0, -7.424748120676926], [0.0, -0.004193911810302, 58.51536655102318]] in phh2o_0-5cm_mean_tileSG-004-046_3-2.tif, previously saw AffineTransform[[0.004696413740213, 0.0, -7.912014673168407], [0.0, -0.004696413740213, 62.38737075514959]]. Difference in X scale exceeds 8.673617379884035E-13.
Manifiesto con transformación afín
Los parámetros se obtuvieron a partir de python gdal GetGeoTransform()
"sources": [
{
"uris": [
"gs://sg20-upload-gee/phh2o_0-5cm_mean_tileSG-004-046_1-3.tif"
]
"affine_transform": {
"scale_x": 0.0046964137402130185,
"shear_x": 0.0,
"translate_x": -7.912014673168407,
"shear_y": 0.0,
"scale_y": -0.0046964137402130185,
"translate_y": 62.38737075514959
}
},
{
"uris": [
"gs://sg20-upload-gee/phh2o_0-5cm_mean_tileSG-004-046_3-2.tif"
],
"affine_transform": {
"scale_x": 0.004193911810301575,
"shear_x": 0.0,
"translate_x": -7.424748120676926,
"shear_y": 0.0,
"scale_y": -0.004193911810301575,
"translate_y": 58.51536655102318
}
}
]
- Error:
FAILED Affine mismatch: found AffineTransform[[0.004193911810302, 0.0, -7.424748120676926], [0.0, -0.004193911810302, 58.51536655102318]] in phh2o_0-5cm_mean_tileSG-004-046_3-2.tif, previously saw AffineTransform[[0.004696413740213, 0.0, -7.912014673168407], [0.0, -0.004696413740213, 62.38737075514959]]. Difference in X scale exceeds 8.673617379884035E-13.
Lo mismo ocurre con scale_x
y scale_y
fijado en 1,0
Manifiesto sin CRS ni transformación afín
- Error:
FAILED Affine mismatch: found AffineTransform[[0.004193911810302, 0.0, -7.424748120676926], [0.0, -0.004193911810302, 58.51536655102318]] in phh2o_0-5cm_mean_tileSG-004-046_3-2.tif, previously saw AffineTransform[[0.004696413740213, 0.0, -7.912014673168407], [0.0, -0.004696413740213, 62.38737075514959]]. Difference in X scale exceeds 8.673617379884035E-13.
Información GDAL de los dos azulejos
Baldosa 1
Driver: GTiff/GeoTIFF
Files: ./upld/phh2o_0-5cm_mean_tileSG-004-046_1-3.tif
Size is 504, 212
Coordinate System is:
GEOGCRS["WGS 84",
DATUM["World Geodetic System 1984",
ELLIPSOID["WGS 84",6378137,298.257223563,
LENGTHUNIT["metre",1]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
CS[ellipsoidal,2],
AXIS["geodetic latitude (Lat)",north,
ORDER[1],
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4326]]
Data axis to CRS axis mapping: 2,1
Origin = (-7.912014673168407,62.387370755149590)
Pixel Size = (0.004696413740213,-0.004696413740213)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( -7.9120147, 62.3873708) ( 7d54'43.25"W, 62d23'14.53"N)
Lower Left ( -7.9120147, 61.3917310) ( 7d54'43.25"W, 61d23'30.23"N)
Upper Right ( -5.5450221, 62.3873708) ( 5d32'42.08"W, 62d23'14.53"N)
Lower Right ( -5.5450221, 61.3917310) ( 5d32'42.08"W, 61d23'30.23"N)
Center ( -6.7285184, 61.8895509) ( 6d43'42.67"W, 61d53'22.38"N)
Band 1 Block=504x8 Type=Int16, ColorInterp=Gray
NoData Value=-32768
Azulejo 2
Driver: GTiff/GeoTIFF
Files: ./upld/phh2o_0-5cm_mean_tileSG-004-046_3-2.tif
Size is 496, 113
Coordinate System is:
GEOGCRS["WGS 84",
DATUM["World Geodetic System 1984",
ELLIPSOID["WGS 84",6378137,298.257223563,
LENGTHUNIT["metre",1]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
CS[ellipsoidal,2],
AXIS["geodetic latitude (Lat)",north,
ORDER[1],
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4326]]
Data axis to CRS axis mapping: 2,1
Origin = (-7.424748120676926,58.515366551023178)
Pixel Size = (0.004193911810302,-0.004193911810302)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( -7.4247481, 58.5153666) ( 7d25'29.09"W, 58d30'55.32"N)
Lower Left ( -7.4247481, 58.0414545) ( 7d25'29.09"W, 58d 2'29.24"N)
Upper Right ( -5.3445679, 58.5153666) ( 5d20'40.44"W, 58d30'55.32"N)
Lower Right ( -5.3445679, 58.0414545) ( 5d20'40.44"W, 58d 2'29.24"N)
Center ( -6.3846580, 58.2784105) ( 6d23' 4.77"W, 58d16'42.28"N)
Band 1 Block=496x8 Type=Int16, ColorInterp=Gray
NoData Value=-32768