problem with layers with different geographic dimension

2,223 views
Skip to first unread message

ٍElham

unread,
Jun 23, 2017, 11:27:05 PM6/23/17
to Maxent
Hi
 I use bioclime and landcover layers in Maxent and the error shows that they have different geographic dimension. so I open the asc in word and edit the header to make the layers the same.

ncols         3459

nrows         3320

xllcorner     34.494304000329

yllcorner     12.108194352195

cellsize      0.0083333333333333

NODATA_value  -9999


 now when I run the maxent the new error appear: unexpected end of file.

How can I use layers with different geographic dimension without any error?!

Alaaeldin Soultan

unread,
Jul 4, 2017, 5:50:15 AM7/4/17
to max...@googlegroups.com
You can't use different geographic dimensions, your layers should be aligned with one dimension.
So, you have to clip all your layer using the extent in R or any GIS application

--
You received this message because you are subscribed to the Google Groups "Maxent" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maxent+unsubscribe@googlegroups.com.
To post to this group, send email to max...@googlegroups.com.
Visit this group at https://groups.google.com/group/maxent.
For more options, visit https://groups.google.com/d/optout.



--
Alaaeldin Soultan
PhD researcher
MaxPlanck Institute for Ornithology
Am Obstberg 1
78315 Radolfzell, Germany
Tel: +49 (0)7732 1501 911
Mob.+4915757474779




Jamie M. Kass

unread,
Jul 6, 2017, 2:00:19 PM7/6/17
to Maxent
To build on what Alaaeldin said, you'll need to resample one raster to match the cell size of the other (which should align them), then crop one to the other to make sure they have the same extent. You can do this with the resample() and crop() functions in the R package "raster", or with ArcGIS or QGIS. Simply changing the header does not change the data.

Jamie

ٍElham

unread,
Jul 29, 2017, 8:04:59 AM7/29/17
to Maxent
Thanks Alaaeldin and Jamie. I tested the mentioned ways of re-sampling. but none of them work for me.


On Thursday, July 6, 2017 at 10:30:19 PM UTC+4:30, Jamie M. Kass wrote:
To build on what Alaaeldin said, you'll need to resample one raster to match the cell size of the other (which should align them), then crop one to the other to make sure they have the same extent. You can do this with the resample() and crop() functions in the R package "raster", or with ArcGIS or QGIS. Simply changing the header does not change the data.

Jamie

On Tuesday, 4 July 2017 05:50:15 UTC-4, alaaeldeen80 wrote:
You can't use different geographic dimensions, your layers should be aligned with one dimension.
So, you have to clip all your layer using the extent in R or any GIS application
On Sun, Jun 18, 2017 at 3:25 PM, ٍElham <na.eskan...@gmail.com> wrote:
Hi
 I use bioclime and landcover layers in Maxent and the error shows that they have different geographic dimension. so I open the asc in word and edit the header to make the layers the same.

ncols         3459

nrows         3320

xllcorner     34.494304000329

yllcorner     12.108194352195

cellsize      0.0083333333333333

NODATA_value  -9999


 now when I run the maxent the new error appear: unexpected end of file.

How can I use layers with different geographic dimension without any error?!

--
You received this message because you are subscribed to the Google Groups "Maxent" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maxent+un...@googlegroups.com.

To post to this group, send email to max...@googlegroups.com.
Visit this group at https://groups.google.com/group/maxent.
For more options, visit https://groups.google.com/d/optout.

Liu Idarraga Orozco

unread,
Jul 29, 2017, 10:37:45 PM7/29/17
to max...@googlegroups.com

I followed the mencioned steps and can solved the problems with my layers. I did the aligned option 2x2 in QGIS and after that I had to edit the header. Note that the NoData sometimes has a differente code in the layers.

My layers after header edit:

ncols        7800
nrows        10200
xllcorner    -95.000000000000
yllcorner    -60.000000000000
cellsize     0.008333333333
NODATA_value  0

and

ncols        7800
nrows        10200
xllcorner    -95.000000000000
yllcorner    -60.000000000000
cellsize     0.008333333333
NODATA_value  -1.6999999999999999388e+308

-- 
Liu Idárraga O.
Estudiante Doctoral
Facultad de Ciencias Naturales y Museo
Universidad Nacional de La Plata
División de Mastozoología
Museo Argentino de Ciencias Naturales "Bernardino Rivadavia"
Av. Angel Gallardo 470
C1405DJR Ciudad Autónoma de Buenos Aires - Argentina
Phone: +5411- 4982 8370/6670 Ext. 209

Jamie M. Kass

unread,
Jul 29, 2017, 10:38:46 PM7/29/17
to Maxent
This is not helpful for us if you do not tell us exactly what you did, which includes the R code. If you don't supply this, no one can help.

ٍElham

unread,
Jul 30, 2017, 8:03:34 AM7/30/17
to Maxent
I did it in QGIS.

I tested the r.resample way and the result was an empty file!
and the second way I tested from raster.....align raster....and a message appear: unable to create output file.

my raster files are in asc format.

ٍElham

unread,
Jul 30, 2017, 11:45:13 AM7/30/17
to Maxent
I do it!!
Thank you all.
I didn't determined the output folder for reference layer! I did it and it worked!

Although I don't know why the reference layer should be aligned?!

ndimhypervol

unread,
Jul 30, 2017, 3:13:27 PM7/30/17
to max...@googlegroups.com
alignRaster doesn't always work as expected, because it is intended for special cases when resample() doesn't work, I think. Resampling is the best option. Glad something eventually worked for you.

Jamie Kass
PhD Candidate, CCNY
cell: 917-602-5787
> --
> You received this message because you are subscribed to a topic in the Google Groups "Maxent" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/maxent/QDZNdQT-pLI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to maxent+un...@googlegroups.com.

Ra Zoo

unread,
Jan 30, 2019, 8:16:41 AM1/30/19
to Maxent
If changes in header (first 4-5 lines), the data changes and it appears just line-line or moves from the boundary. For these problems, do have any further ideas to make the same header? 


On Friday, July 7, 2017 at 2:00:19 AM UTC+8, Jamie M. Kass wrote:
To build on what Alaaeldin said, you'll need to resample one raster to match the cell size of the other (which should align them), then crop one to the other to make sure they have the same extent. You can do this with the resample() and crop() functions in the R package "raster", or with ArcGIS or QGIS. Simply changing the header does not change the data.

Jamie

On Tuesday, 4 July 2017 05:50:15 UTC-4, alaaeldeen80 wrote:
You can't use different geographic dimensions, your layers should be aligned with one dimension.
So, you have to clip all your layer using the extent in R or any GIS application
On Sun, Jun 18, 2017 at 3:25 PM, ٍElham <na.eskan...@gmail.com> wrote:
Hi
 I use bioclime and landcover layers in Maxent and the error shows that they have different geographic dimension. so I open the asc in word and edit the header to make the layers the same.

ncols         3459

nrows         3320

xllcorner     34.494304000329

yllcorner     12.108194352195

cellsize      0.0083333333333333

NODATA_value  -9999


 now when I run the maxent the new error appear: unexpected end of file.

How can I use layers with different geographic dimension without any error?!

--
You received this message because you are subscribed to the Google Groups "Maxent" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maxent+un...@googlegroups.com.

To post to this group, send email to max...@googlegroups.com.
Visit this group at https://groups.google.com/group/maxent.
For more options, visit https://groups.google.com/d/optout.

Laura Patterson

unread,
Jun 5, 2019, 12:46:55 PM6/5/19
to Maxent
Hi
Can you briefly explain the steps you use in QGIS?
I am on version 3.6
Thanks!
Reply all
Reply to author
Forward
0 new messages