Area calculation of forest cover classes.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Area calculation of forest cover classes.

Enoch Gyamfi Ampadu
Dear List,

Please I have carried out an RF and SVM forest cover classification in R. I
want to determine the area in hectors for each of the forest cover classes.
I have not been able to find my way out on it. I wanted to ask if it is
possible to do this in R and will be glad to have assistance on how to
carry that out. And possibly some lead codes to use (I am still learning R
and and how to code.)

Thank you.

Best regards,

Enoch

--
*Enoch Gyamfi - Ampadu*

*Geography & Environmental Sciences*

*College of Agriculture, Engineering & Science*

*University of KwaZulu-Natal, Westville Campus*

*Private Bag X54001*
*Durban, South Africa **– 4000**.*
*Phone: +27 835 828255*

*email: [hidden email] <[hidden email]>*


*skype: enoch.ampadu*
*The highest evidence of nobility is self-control*.

*A simple act of kindness creates an endless ripple*.

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: Area calculation of forest cover classes.

Sarah Goslee
Hi,

Without knowing any details of what you did, the general procedure is:

Use your fitted Random Forest or SVM model to predict the class for
each pixel in your region of interest - the predict() function.
Use standard spatial data methods to aggregate the resulting spatial
data, or even standard non-spatial methods, since you know the pixel
size - perhaps aggregate() or even table().

Sarah

On Thu, Sep 12, 2019 at 3:30 AM Enoch Gyamfi Ampadu <[hidden email]> wrote:

>
> Dear List,
>
> Please I have carried out an RF and SVM forest cover classification in R. I
> want to determine the area in hectors for each of the forest cover classes.
> I have not been able to find my way out on it. I wanted to ask if it is
> possible to do this in R and will be glad to have assistance on how to
> carry that out. And possibly some lead codes to use (I am still learning R
> and and how to code.)
>
> Thank you.
>
> Best regards,
>
> Enoch
>


--
Sarah Goslee (she/her)
http://www.numberwright.com

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: Area calculation of forest cover classes.

Sarah Goslee
Hi Enoch,

It's inappropriate to email just me, rather than the whole list - I
don't have the capacity to provide private tutorials.

You could import your prediction maps into a GIS you're more familiar with.
You could read a tutorial on the raster package, which provides tools
to do what you want.
If you're still struggling with basic R commands, you could read the
Introduction to R that comes with it, or one of the many other
tutorials that are available online and in your library.

In general, this email list is excellent for "I tried this and
couldn't get it to work. How do I fix my error?" and not great for "I
don't know anything about R but I have this project please explain
everything."

So: You have a map. What format is your map? What have you tried? What
didn't work? Where have you searched? What documentation have you
read?

Sarah

On Thu, Sep 12, 2019 at 6:59 PM Enoch Gyamfi Ampadu <[hidden email]> wrote:

>
> Hi Sarah,
> Thank you for the mail and information. Please I have done the predictions already and have the output maps for both the RF and SVM. Find attached the output map. There are 4 classes and I need to determine the area for each. As I indicated I am now learning area and so not very familiar with a lot of functions. I will be glad of you could provide me with some functions and codes, then I will edit it to suite what I have. I realized you recommended aggregate () and table(), but I don't know how to use them. I will be glad to have some help from you.
>
> Thank you.
>
> Best regards,
>
> Enoch.
>
> On Thu, 12 Sep 2019 at 18:06, Sarah Goslee <[hidden email]> wrote:
>>
>> Hi,
>>
>> Without knowing any details of what you did, the general procedure is:
>>
>> Use your fitted Random Forest or SVM model to predict the class for
>> each pixel in your region of interest - the predict() function.
>> Use standard spatial data methods to aggregate the resulting spatial
>> data, or even standard non-spatial methods, since you know the pixel
>> size - perhaps aggregate() or even table().
>>
>> Sarah
>>
>> On Thu, Sep 12, 2019 at 3:30 AM Enoch Gyamfi Ampadu <[hidden email]> wrote:
>> >
>> > Dear List,
>> >
>> > Please I have carried out an RF and SVM forest cover classification in R. I
>> > want to determine the area in hectors for each of the forest cover classes.
>> > I have not been able to find my way out on it. I wanted to ask if it is
>> > possible to do this in R and will be glad to have assistance on how to
>> > carry that out. And possibly some lead codes to use (I am still learning R
>> > and and how to code.)
>> >
>> > Thank you.
>> >
>> > Best regards,
>> >
>> > Enoch
>> >
>>
>>
--
Sarah Goslee (she/her)
http://www.numberwright.com

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo