4

I know this kind of problem as been posted previously, but I can't solve my problem with the answers.

I'm running a simple gdal_merge command, but I get shut down every time by permission problems. I'm administrator of the directories, running CMD as Administrator. My account has writing permissions over all the folders I use for this. I'm running on Windows 7, 64bits.

Here is the command:

gdal_merge -o "C:\Users\Catherine Plante\Desktop\SuiviHydroGranby" --optfile "\\Server\DONNEES\MNE\liste.txt"

All I can think of is that GDAL (through OSGeo4W) runs the commands as another user, and that this one is blocked.

Does this make sense?

EDIT: In the end, I had forget to clearly identify the output format. While doing so, I realized that I also had problems with the native format (.img). So this was mostly my fault! Just sad that GDAL identified the problem as a permission problem, rather then an incomplete query.

5
  • maybe because of the space in your path name. I would check that first. does gdalbuildvrt work ?
    – radouxju
    Dec 21, 2016 at 19:10
  • I tried with a different, supershort path (C:\\somefolderwithpermissions), and still get the same error. I understand that the " sign should allow to get around the spaces problem (and it seems to work).
    – Horizen
    Dec 21, 2016 at 19:13
  • 1
    have you tried with an extension (.tif)
    – radouxju
    Dec 21, 2016 at 19:15
  • I think you just solved this... I'll run some tests, but it seems that is had more to do with the raster extension than with the permissions in the end. For some reason, the data distributor gave us raster with a (.img) extension. By changing that to (.tif), I get some results. I will be back after those tests, and will close the post if it works. Thanks!
    – Horizen
    Dec 21, 2016 at 19:31
  • 1
    If you "know this kind of problem as been posted previously" it would be helpful to include links to those questions within your question so that we can try to aggregate them into a canonical Q&A.
    – PolyGeo
    Dec 21, 2016 at 22:17

1 Answer 1

4

Make sure that you add an extension to your file name (.tif by default) so that there is no confusion with a folder.

2
  • ... and try to put the options file into the same folder too. It might be that GDAL tries to write some temporary file into the folder.
    – AndreJ
    Dec 22, 2016 at 6:34
  • I updated my question with the solution up there. It indeed had to do with my output name/format. Thanks, and my bad!
    – Horizen
    Dec 22, 2016 at 14:29

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.