Aspect (direction that a slope is facing)

2,497 views
Skip to first unread message

Willem

unread,
Feb 5, 2009, 8:00:34 AM2/5/09
to Maxent
Can anyone clarify how Aspect should be used in ENM? Are the values
that you would get from deriving aspect from a DEM (0 to 360 degrees)
useful, or is it necessary to convert these values to numbers that are
more meaningful, and if so, how do you do that?



Thank you

Willem Coetzer



South African Institute for Aquatic Biodiversity

www.saiab.ac.za

Navinder Singh

unread,
Feb 5, 2009, 10:12:13 AM2/5/09
to Max...@googlegroups.com
Hei Willem, This is a common problem while using it as a variable- what u can do is- transform it into northness- cosine(aspect) and then you get values continuous values from -1 to +1 and can be used as a continuous variable.
Cheers,
Navinder
--
Navinder J Singh

Department of Biology / Institutt for biologi

Faculty of Science / Det matematisk-naturvitenskapelige fakultetet

University of TromsЬ / Universitetet i TromsЬ

N-9037 Tromso / 9037 Tromso

Norway

+47-77646603


ColinD

unread,
Feb 5, 2009, 2:26:53 PM2/5/09
to Maxent
Navinder, what difference would that make to a model? You still have a
set of continuous variables representing the same thing. I ask becasue
I always use the raw 0 - 360 for my modelling and have never thought
that it would need any other transformation.
> +47-77646603- Hide quoted text -
>
> - Show quoted text -

Mikael von Numers

unread,
Feb 6, 2009, 2:09:20 AM2/6/09
to Max...@googlegroups.com
Hi Willem
This is the first time i contribute to this group(!). As far as I
understand the problem with using the raw 0 - 360 is that both extremes
of the gradient, 0 and 360, represent the same thing = north. The only
thing that helps, as far as I understand, is to transform it to
northerness (or west-easterness) as Navinder pointed out.

Cheers
Mikael


Mikael von Numers
Abo Akademi University
Department of Biology
Environmental and Marine Biology
FIN-20500 Turku/Abo, FINLAND

phone: +358 (0)2 215 3422
fax: +358 (0)2 215 3428

Navinder Singh

unread,
Feb 6, 2009, 4:49:59 AM2/6/09
to Max...@googlegroups.com
Hi
We generally transform aspect into continuous variable because it is Circular - large values may be very close to small values. In most cases, circular data must be transformed. The two cases in which circular data are likely to occur are in aspect and day of the year. For example during the parameter estimates or in large values angle 1,2,5,10 degree will be closer to 300, 340, 360, which makes the results difficult to interpret. So in this case we need transformation to continuous values whihc range from -1 to +1, where values closer to -1 will be southwards and those closer to +1 will be northwards. This is done through Cosine (Aspect). For eastness, we do similar transformation i.e sine(aspect).
If i am still not clear, please do write. 
Cheers,.


2009/2/5 ColinD <cd_e...@bigpond.com>

andrew

unread,
Feb 9, 2009, 11:23:20 AM2/9/09
to Maxent
The sine and cosine transformations of aspect can be used to create
two predictor variables for the aspect feature, however, if you have
cells that are flat in slope it can be problematic. Another way is
to create a categorical variable with subcategories of flat, north,
east, south and west...or more depending upon the range of aspect
values one is interested in exploring.

AYost

Maria Lucia Lorini

unread,
Feb 16, 2009, 10:01:14 AM2/16/09
to Max...@googlegroups.com
Hi,
 
Why flat cells can be problematic in sine and cosine transformations?
 
How could I create a categorical variable with subcategories of  flat, north,
east, south and west as you suggested?

Thank you
 
Maria Lucia Lorini
 
-------------
 
 
2009/2/9 andrew <yost_...@yahoo.com>



--
__________________________________________________

Maria Lucia Lorini
Laboratório de Gestão da Biodiversidade
Programa de Pós-Graduação em Ecologia
Instituto de Biologia , Universidade Federal do Rio de Janeiro

Navinder Singh

unread,
Feb 16, 2009, 11:20:16 AM2/16/09
to Max...@googlegroups.com
Hola Maria.
The flat cells can be problemetic because if you calculate cosine 0, which is equal to 1 then u get north aspect for a flat area.
You can create a dummy variable for each apsect - for eg. 0-45=a, 45-90=b..... 
Let me know if you have further questions.
Navi
--
Navinder J Singh
Postdoctoral Research Associate
Imperial College London
Division of Biology
Silwood Park Campus
Buckhurst Road
Ascot, Berkshire,
SL5 7PY, UK

Tel: +44 (0)20 7594 2527
Fax: +44 (0)1344 874 957
n.s...@imperial.ac.uk
http://www.iccs.org.uk/navindersingh.htm



melanie gp

unread,
Feb 26, 2009, 7:56:06 PM2/26/09
to Maxent
Hi,

I have also been recently working on the problem of transforming
aspect to a linear variable. It is important to note that to transform
aspect using cosine, aspect must be measured in radians, not degrees.
Taking the cosine of aspect in degrees does not work. To transform
degrees to radians, you can use the formula radians=degrees*pi/180

Melanie

Melanie Gogol-Prokurat
PhD Candidate
Ecology Graduate Group
Department of Environmental Science and Policy
University of California, Davis

On Feb 16, 8:20 am, Navinder Singh <navinderjsi...@gmail.com> wrote:
> Hola Maria.The flat cells can be problemetic because if you calculate cosine
> 0, which is equal to 1 then u get north aspect for a flat area.
> You can create a dummy variable for each apsect - for eg. 0-45=a,
> 45-90=b.....
> Let me know if you have further questions.
> Navi
>
> On Mon, Feb 16, 2009 at 3:01 PM, Maria Lucia Lorini <
>
>
>
>
>
> marialucia.lor...@gmail.com> wrote:
> > Hi,
>
> > Why flat cells can be problematic in sine and cosine transformations?
>
> > How could I create a categorical variable with subcategories of  flat,
> > north,
> > east, south and west as you suggested?
>
> > Thank you
>
> > Maria Lucia Lorini
>
> > -------------
>
> > 2009/2/9 andrew <yost_and...@yahoo.com>
> n.si...@imperial.ac.ukhttp://www.iccs.org.uk/navindersingh.htm- Hide quoted text -

ColinD

unread,
Feb 27, 2009, 5:23:27 AM2/27/09
to Maxent
Aha! Thanks for that Melanie, I just couldn't make sense of cos(aspect
deg), it was just an oscillating series. I've run my model (on a plant
species) using cos(aspect rad) and also using a categorical partition
of 22.5deg either side of the cardinal points N, NE, E...etc 1 - 8
plus 9 as flat (areas of <1deg slope) and the two inputs give quite
different results. Neither are particularly significant but the
categorical result seems more informative.

Colin
> > n.si...@imperial.ac.ukhttp://www.iccs.org.uk/navindersingh.htm-Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -

Newton Pimentel de Ulhôa Barbosa

unread,
Oct 10, 2013, 10:29:38 AM10/10/13
to max...@googlegroups.com, Maxent
Hi guys, 

Can anyone send to me the R script for the cosine/sine transformation of an asc aspect file?

Sincerely,

N

John Baumgartner

unread,
Oct 10, 2013, 10:41:16 AM10/10/13
to maxent

Hey Newton,

Something like this should work fine:

library(raster)
asp <- raster('path/to/aspect.asc')
cos.asp <- cos(asp)
sin.asp <- sin(asp)
writeRaster(sin.asp, 'path/to/output/sinasp.asc)
writeRaster(cos.asp, 'path/to/output/cosasp.asc)

John



--
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 http://groups.google.com/group/maxent.
For more options, visit https://groups.google.com/groups/opt_out.

John Baumgartner

unread,
Oct 10, 2013, 10:42:12 AM10/10/13
to maxent
(Sorry, missed the trailing quotes on the output file paths. Also, install.packages('raster') if you don't already have it.)

Newton P. U. Barbosa

unread,
Oct 10, 2013, 10:52:35 AM10/10/13
to max...@googlegroups.com
Hi John, 

Thank you very much! 

Cheers,

N

--

Newton Pimentel de Ulhôa Barbosa


2013/10/10 John Baumgartner <jbb...@gmail.com>
Reply all
Reply to author
Forward
0 new messages