0

Google Earth Engine Exporting via Python API a Sentinel 2 harmonized mosaic to the Swiss projection EPSG:2056 results in non correctly reprojected data.

Complete code https://code.earthengine.google.com/4639f0a4a102c553319a02bc8e17dc3f

Following the DOC data was reprojected:

var S2_mosaic_reprojected = S2_mosaic.reproject({
       crs:'EPSG:2056',
      scale: 10 })

and then exported

Export.image.toDrive({
  image: S2_mosaic_reprojected,
  description: 'ProjectionAccordingToTheDOC',
  scale: 10,
  crs:'EPSG:2056',
  region: geometry
});

I get an image where each tile of the Geotiff is distorted.

See the highway as reference in the images below

Distorted image EPSG 2056

COGVIEWER: Link

Download: https://drive.google.com/uc?id=1diNuOc071C-9_mzbt03qO4mfmjCC4-xa&export=download

Non distorted image when exporting with Webmercator EPSG:3857 ( no reprojection applied)

COGVIEWER: Link

Download: https://drive.google.com/uc?id=1lnc3Q1U0hYgb3DZdbG4Z8EZHIWYiGzZY&export=download

I also defined the Projection manually according to Noels hint in https://groups.google.com/g/google-earth-engine-developers/c/08lIYUCROyA/m/kYmzzxe4AAAJ - no luck so far . I posted the question as well in the google group but no feedback so far

Overall all goal: export the area of Switzerland approx 42k km2, reprojected.

What did I configure wrong in the code? Any hints?

2 Answers 2

0

Not Solved even if RTFM: "The scale parameter can be subtly misleading. If you're trying to match an existing projection exactly, you shouldn't use scale - see the following section for details." as stated in the Doc

Therefore, determine first source projection

var projection = S2_mosaic.projection().getInfo();

and then exported

Export.image.toDrive({
  image: S2_mosaic,
  description: 'ProjectionAccordingToTheDOC',
  region: geometry,
  crs:'EPSG:2056',
  crsTransform: projection.transform      
});

BUT The scale of the pixel is now 1m instead of 10m...but at least projection is " Better"

There is a confirmed Issue with export resulting in grid like artefacts

See https://issuetracker.google.com/issues/290641644

0

There is a confirmed Issue with export resulting in grid like artefacts

See https://issuetracker.google.com/issues/290641644

and as well a visual overview of the issue in https://docs.google.com/presentation/d/1H2y-ezhedk5N3Fm_96Vv4-PxLMOzeBV7Kq0MuhKOdok/edit?usp=sharing

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.