0

I am trying to reproject GeoTIFF datasets (of various SRS) to the S2 PCS using GDAL. For demonstration I am using a downscaled GEBCO dataset.

I would like to reproject my source dataset to the overlapping S2 faces. So for global datasets I would like to have 6 output datasets of similar size. For local datasets I would like to have only a couple of datasets, that cover the specific area.

My GDAL commands look something like this:

gdalwarp gebco_large.tif s2.tif -t_srs "+proj=s2 +lat_0=90 +lon_0=0 +UVtoST=quadratic"

This results in an output image, where the georeferenced corner coordinates are outside of the valid st range.

For example:

Upper Left  (  -3.4121903,   4.4121903) ( 45d 0' 0.00"W,  1d35'29.04"N)
Lower Left  (  -3.4121903,  -3.4127405) ( 45d 0'26.05"E,  1d35'28.31"N)
Upper Right (   4.4127405,   4.4121903) (135d 0'26.05"W,  1d35'28.31"N)
Lower Right (   4.4127405,  -3.4127405) (135d 0' 0.00"E,  1d35'27.59"N)
Center      (   0.5002751,   0.4997249) (135d 0' 0.00"E, 89d58'13.70"N)

Is there a way I can clamp these to [0, 1], so that the output is a correct s2 dataset? Also projecting to sides lat0_0=0 lat0_0=0 does not work at all.

Source dataset: source dataset

S2 dataset incorrect: S2 dataset incorrect

S2 dataset correct: S2 dataset correct

0

Your Answer

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

Browse other questions tagged or ask your own question.