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

No support for projecting ASCII raster with rectangular cell dimension #13

Open
rpatin opened this issue Apr 19, 2023 · 0 comments
Open

Comments

@rpatin
Copy link

rpatin commented Apr 19, 2023

Dear Maxent developers,
When using raster with rectangular cell dimension we have issues projecting maxent models within the package biomod2 (see issues biomodhub/biomod2#245 or biomodhub/biomod2#221 (comment)).
Here is the command we use internally in biomod2:

java -mx512m -cp "./maxent.jar" density.Project "./GuloGulo_allData_RUN1.lambdas" "./" "./projMaxent.asc"  doclamp=false visible=false autorun nowarnings notooltips

Data can be found here. All needed raster were written as ASCII files (as required, unless there are other possibilities for which we are unaware) and available in the current folder.
Then we get the following error:

Error in file bio11.asc: java.lang.NumberFormatException: For input string: "NODATA_value"

I suspect this is because the header for a raster with rectangular cells looks like that:

ncols        120
nrows        47
xllcorner    -180.000000000000
yllcorner    -57.499992177000
dx           1.996557659208
dy           1.994202898551
NODATA_value  -9999

while maxent.jar expect a header as follows:

ncols        120
nrows        47
xllcorner    -180.000000000000
yllcorner    -57.499992177000
cellsize     3.000000000000
NODATA_value  -9999

and is trying to read the line dy as NODATA_value.

We are not expert with maxent, so feel free to point out if there are more efficient way of using maxent projection.
Best regards,
The biomod2 team

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

1 participant