grid_to_spdf: Transforms Grid Object into SpatialPolygonsDataFrame

Description Usage Arguments Details Author(s) Examples

View source: R/Class_grid.R

Description

Transforms Grid Object (the output of the gwfa function) into SpatialPolygonsDataFrame.

Usage

1
2
  grid_to_spdf(df,epsg,cell_size=NULL, bandwith = NULL, radius = NULL, 
    q = NULL, sample_size = NULL)

Arguments

df

the data.frame obtained from the gwfa function

epsg

EPSG code

cell_size

leave empty

bandwith

leave empty

radius

leave empty

q

leave empty

sample_size

leave empty

Details

Returns a spatialPolygonsdataframe.

Author(s)

Cecile Tannier, Stephane G. Roux and Francois Semecurbe

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
library(gwfa)

data("mariegalante")

test=gwfa(points=mariegalante,q=0,radius=(20*2^((0:6)/2)),
bandwith=1600,sample_size=500,cell_size=2000)
test=test[test$count>100,]#select the cells with at least 100 points. 


#estimate the fractal dimension on the 7 radius
X=cbind(rep(1,length(test@radius)),log2(test@radius))
fit_frac_dim=(do.call(cbind,test[,4:10]))%*%t(solve(t(X)%*%X)%*%t(X))
test$dimfrac=fit_frac_dim[,2]

#create spatial polygon dataframe
shp=grid_to_spdf(test,"2970")

gwfa documentation built on May 1, 2019, 11:51 p.m.

Related to grid_to_spdf in gwfa...