[R-sig-Geo] density /diversity of points
Matevž Pavlič
matevz.pavlic at gi-zrmk.si
Wed May 18 09:43:35 CEST 2011
Hi all,
I can not for the life of me find out how to covert this :
plot(eval.im(mol.simpson.s >0.3 & (mol.den/max(mol.den))>0.3))
into any kind of grid or shape with projection that can be used in some GIS software. Any help is greatly appreciated.
m
-----Original Message-----
From: r-sig-geo-bounces at r-project.org [mailto:r-sig-geo-bounces at r-project.org] On Behalf Of Mathieu Rajerison
Sent: Wednesday, May 18, 2011 8:34 AM
To: r-sig-geo at r-project.org
Subject: Re: [R-sig-Geo] density /diversity of points
Yes, you're totally right about the name of the objects :)
So, setting exclude=FALSE is necessary if one wishes to include the point itself in the marktable function and there is no zero values, at least one "1"
clc.tab<-marktable(clc.ppp, R=20, exclude=FALSE)
To get the minimal radius for which a neighbor is found, I simply used nndist function
min(nndist(clc.ppp))
Finally, I decided to set a 2000 units radius and to include the radius starting point clc.tab<-marktable(clc.ppp, R=2000, exclude=FALSE)
I get good results
Thanks everybody for everything!
2011/5/17 Rolf Turner <r.turner at auckland.ac.nz>
> On 18/05/11 05:05, Mathieu Rajerison wrote:
>
>> I've tried your method to determine the richness of landscapes on my
>> area of interest using european corine land cover.
>>
>> I converted my polygon layer into a SpatialGridDataFrame then into a
>> SpatialPointsDataFrame, and finally into a ppp object using one column:
>> the
>> type of soil occupation (CLC3_LIB).
>>
>> But my problem is that marktable gives me zero values, although I
>> should get at least a "1" value for one of my columns...
>>
>> Here is a sample code:
>>
>>> ppp[1:5]$marks
>>>
>> [1] Mer et océan
>> [2] Végétation clairsemée
>> [3] Pelouses et pâturages naturels
>> [4] Végétation sclérophylle (y.c. maquis et garrigue) [5] Végétation
>> sclérophylle (y.c. maquis et garrigue)
>>
>> marktable(ppp[1:10], R=50)
>>>
>> mark
>> point Aéroports Chantiers Cours et voie d'eau
>> 1 0 0 0
>> 2 0 0 0
>> 3 0 0 0
>> 4 0 0 0
>> 5 0 0 0
>> 6 0 0 0
>> 7 0 0 0
>> 8 0 0 0
>> 9 0 0 0
>> 10 0 0 0
>> mark
>> point Equipements sportifs et de loisirs
>> 1 0
>> 2 0
>> 3 0
>> 4 0
>> 5 0
>> 6 0
>> 7 0
>> 8 0
>> 9 0
>> 10 0
>>
>> I don't see where the problem is..
>>
>> Any help would be greatly appreciated.
>>
>
> Why do you assert that you should get at least one "1"? If there are
> no points of your pattern within 50 units of any given point, then the
> table will indeed consist of nothing but zeros.
>
> If you don't believe that this is the problem then please provide a
> minimal
> ***reproducible*** example that we can work with, as the posting guide
> requests.
>
> And ***PLEASE*** do not call your point pattern "ppp"; this is the
> name of a function and class in the spatstat package. Using it as the
> name of an object is very confusing and potentially a source of
> errors. See fortune("dog").
>
> cheers,
>
> Rolf Turner
>
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list