Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resistance file does not exist error #132

Closed
brdally opened this issue Jul 22, 2023 · 2 comments
Closed

Resistance file does not exist error #132

brdally opened this issue Jul 22, 2023 · 2 comments

Comments

@brdally
Copy link

brdally commented Jul 22, 2023

I receive the following error when I run my .ini file with the run_omniscape() function

ERROR: the file ""C:/Users/.../.../.../.../Resistance.tif"" does not exist

I'm guessing that Julia doesn't like the path format of my resistance raster in the .ini file? I've tried the paths in the .ini file with forward slashes, backward slashes, quotes, no quotes, removing the path and only keeping the .tif file name, tried an .asc file instead of a .tif, etc.

My work flow otherwise is:

  1. open julia
  2. julia> using Pkg; Pkg.add("Omniscape")
  3. julia> cd("C:/Users/.../.../...")
  4. julia> using Omniscape
  5. run_omniscape("OmniscapeSettingsFile.ini")

In the .ini file, I have the following information:

[Required]
resistance_file = "C:/Users/.../.../.../.../Resistance.tif"
radius = 100
block_size = 5
project_name = "C:/Users/.../.../.../..." (note that this is the same folder where the resistance raster lives)
parallelize = true
[Output options]
write_raw_currmap = true

I am very new to Julia, so I apologize if this is a silly question. The Julia version I am using is 1.9.0.

@vlandau
Copy link
Member

vlandau commented Sep 4, 2023

So, for the paths to your input rasters and files, you can use either absolute (i.e. the full path starting with C://), or a relative path (basically remove this component: "C:/Users/.../.../..." from the file paths in your ini file. Are the resistance rasters in the same folder as your INI file? If you place them there, then you should just be able to put the file name (instead of the full path) as the entry for resistance_file.

@vlandau
Copy link
Member

vlandau commented Jan 28, 2024

Closing due to no activity. Feel free to open an issue if you run into this issue again!

@vlandau vlandau closed this as completed Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants