[R-sig-Geo] Problem using asc2spixdf in adehabitat package

Mathieu Basille basille at biomserv.univ-lyon1.fr
Thu Dec 3 20:19:51 CET 2009


Hi Ned,

I'm not quite sure about your cell size problem. It appears to be quite
weird to me, and without the code and data, it's difficult to tell
(well, if I could tell anything at all with the code and data).

For the class 'asc', you can simply look at the help page (?asc), or
even better, to the pdf that comes with a typical installation of
adehabitat (somewhere in [packages folder]/adehabitat/doc/classes.pdf).
You will find all that you need on classes 'asc' and 'kasc', and many
other things about adehabitat.

Hope this helps a bit...
Mathieu.


Ned Horning a écrit :
> Hi - I have a script to calculate mahalanobis distance using the
> adehabitat package but I the output image is not the same size as the
> input image and I would like it to be the same. The georeferencing is
> fine so the input and output images line up when displayed in a GIS but
> the image dimensions of the output image are not the same. I use
> "sp_hsm_pard <- asc2spixdf(hsm_pard)" to convert an asc image object to
> a SpatialPixelsDataFrame object. When I type "str(hsm_pard) the result
> is: asc [1:900, 1:1650] but after running asc2spixdf the "sp_hsm_pard"
> object has cells.dim set to 769 1555 and I would expect it to be 900
> 1650 since that is the dimension of the asc object.
> 
> I expect this is due to NAs in the input image but I haven't been able
> to figure out how create an output image with the same dimensions as the
> input image.
> 
> On a related topic, I tried to get information about the asc class using
> getClass("asc") but I get an error that "asc" is not a defined class. Is
> there another way to get information about a class?
> 
> Any insight would be appreciated.
> 
> All the best,
> 
> Ned
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

-- 

~$ whoami
Mathieu Basille, Post-Doc

~$ locate
Laboratoire d'Écologie Comportementale et de Conservation de la Faune
+ Centre d'Étude de la Forêt
Département de Biologie
Université Laval, Québec

~$ info
http://ase-research.org/basille

~$ fortune
``If you can't win by reason, go for volume.''
Calvin, by Bill Watterson.



More information about the R-sig-Geo mailing list