Skip to content

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

@rpatin

Description

@rpatin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions