0

I have 20 odd DEMs downloaded from https://search.asf.alaska.edu/ (ALOS PALSAR)

Location is the Falkland Islands.

Here is an example just adding 2 of the tiles into QGIS which differ in terms of their CRS

EPSG:32720 - WGS 84 / UTM zone 20S

EPSG:32721 - WGS 84 / UTM zone 21S

enter image description here

As soon as I try putting them into a Virtual Raster using following settings:

enter image description here

I get only a single DEM (20S CRS) within the Virtual Raster which would probably make sense:

enter image description here

Switching Build Virtual raster settings to 21S for 'override projection'

enter image description here

And the same 20S raster just shifts to the right, no sign of 21S tile:

enter image description here

If I turn on 'allow projection difference:

enter image description here

I get the 21S tile flipping the other side of the 20S tile

enter image description here

Is it just not possible to have DEM tiles that cross 2 CRS's within a Virtual Raster, and if not is there another way?

1
  • Have you tried covertung them both to a global coordinate system first. Like 4326?
    – B-C B.
    Commented Nov 24, 2019 at 17:38

1 Answer 1

1

Thanks B-C B I figured out a method to resolve:

Adding test selection of DEM's from the following ALOS PALSAR dataset into QGIS: enter image description here

As you can see I have only 1 DEM tile on 20S CRS, so I'll see if I can simply re-project that one to match the others with 21S enter image description here

First switch QGIS project CRS to 21S (bottom right globe icon)

Create shapefile for square extent in this case 250000 x 250000 enter image description here

Extent: (229085.941613, 4146747.332439) - (479085.941613, 4396747.332439)

Run the Warp process on the single 20S DEM tile

enter image description here

Layers over perfectly:

enter image description here

Now run Build virtual Raster selecting only the assets that are EPSG:32721

enter image description here

enter image description here

For some reason QGIS can't render this new vrt very well:

enter image description here

But we will push forward and use the gdalwarp command to cut the new virtual raster above to the square extent created earlier:

Not forgetting to switch the CRS to 32721 which is what the virtual raster is set to:

gdalwarp -t_srs EPSG:32721 -wo SOURCE_EXTRA=1000 -tr 12.5 12.5 -srcnodata "-9999" -r cubic -ot Float32 -of GTiff -te 229085.941613 4146747.332439 479085.941613 4396747.332439 "F:/GIS/Falklands/virtual_final.vrt" F:/GIS/Falklands/dem_final.tif

enter image description here

All working nicely on UTM 21S CRS:

enter image description here

I'm not too happy having to process a DEM up to three times to get to a clean unified extract of the full dataset, so I'll keep looking for an alternative, potentially doing it all via GDAL commands. But degradation of the data seems to be kept to a minimum, likley helped by using cubic convolution resampling.

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.