1

Since MODIS Imagery Orthorectification (Open Source) had no answer, I will try to get one here with a similar problem:

I got some raster datasets with GCPs in lat/lon, but without height information. When I use gdal to project/re-project the data, I get an offset of approx. 2km, which I think comes from terrain distortion. Using ESA's SNAP Toolbox, I get the results I want, but they are using the actual SRTM DEM in the background.

Is there a way to provide gdal with the raster, the GCPs and a DEM to get everything done "at once" (or in several steps)?

So far, my approach (which gives the offset) looks like this:

gdal_translate -gcp pix1 line1 x1 y1 -gcp pix2 line2 x2 y2 (...) input.tif output.tif

The data are SAR raster from ERS-1, which might have something to do with the offset due to the viewing angle of the sensor

  • For orthorectification I would have a try with OSSIM but it probably requires sensor models too. Offset of 2km feels rather big if the view angle is not very low and/or terrain doesn't have great variation in heights. – user30184 Oct 25 '17 at 14:59
  • Since the datasets are SAR images, view angles are indeed relaitvely low and elevation differs as well, because my region of interest is at the northern edge of the Alps. I have had no experience with OSSIM whatsoever, do you have any hints for me? – s6hebern Oct 26 '17 at 7:10
  • Start from trac.osgeo.org/ossim, see from trac.osgeo.org/ossim/wiki/sensors that ERS-SAR is a supported sensor. I fear that OSSIM developers are not active in gis.stackexchange but the mailing list is responsive. – user30184 Oct 26 '17 at 7:16
  • Cool, thank you. I'll post here if I get any feasible results. – s6hebern Oct 26 '17 at 8:33
0

Here is the command I use to do it all at once, plus some other helpful settings to help it run a bit quicker. If needed, you can also specify coordinates to chip the image using the -te flag. This command will chip the image, change the output format, and orthorectify using a DEM in a single step. You can download SRTM here: http://srtm.csi.cgiar.org/srtmdata/

gdalwarp -multi -wo NUM_THREADS=ALL_CPUS -co NUM_THREADS=ALL_CPUS --config GDAL_CACHEMAX 1536 -wm 1536 -rpc -to RPC_DEM=${DEM_FILE} -of GTiff -te ${aoi_coords} ${inFile} ${outFile}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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