0

"C:\Program Files\QGIS Las\OSGeo4W.bat" gdal_translate -of EHDR -projwin 39 10865.0 330905.0 3894865.0 335885.0 E:\F\CLP_BLD.img C:\Users\kailash\Desktop\gg g\C_Output_LOWER_CENTRAL_VALLEY_2m_Z11N_1_DTM.bil Input file size is 18480, 15670

ERROR 1: Error: Computed -srcwin 1.80597e+006 1.79765e+006 -8000 -2490 has negat ive width and/or height.

Can any body help to run Gdal_tranlate -projwin command

  • 1
    Why are there 5 numbers here -projwin 39 10865.0 330905.0 3894865.0 335885.0? Are these supposed to be decimal degrees? – Marc Pfister Dec 21 '18 at 15:56
  • Can you add the extent of the file? – AndreJ Dec 21 '18 at 18:27
  • I suppose there is an extra space in the first coordinate, and the order should be upper-left-x upper-left-y lower-right-x lower-right-y, so the command should be -projwin 3894865.0 335885.0 3910865.0 330905.0 – Zoltan Dec 21 '18 at 20:52
  • Still it is not giving correct results, when giving this command output is not opening ...."C:\Program Files\QGIS Las\OSGeo4W.bat" gdal_translate -of EHDR -projwin 3894865.000000 335885.000000 3910865.000000 330905.000000 CLP_BLD.img out.Bil do we need to define input projection and output also? – Kaichand03 Dec 24 '18 at 8:12
1

The parameters for the gdal_translate -projwin command are ulx, uly, lrx and lry and they are equivalent to xMin, yMax, xMax and yMin. Accordingly I switched the coordinates and got the correct results.

| improve this answer | |

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.