Re: [R-sig-Geo] [FORGED] Calculate each polygon percentage inside a circles

2016-05-26 Thread ASANTOS via R-sig-Geo
Dear Rolf Turner, Amazing! I will never put R in doubt. My problem was solved with success, thanks very much again!!! Best wishes, Alexandre -- == Alexandre dos Santos Proteção Florestal IFMT - Instituto

[R-sig-Geo] Calculate each polygon percentage inside a circles

2016-05-24 Thread ASANTOS via R-sig-Geo
Dear members, I will try to calculate each polygon percentage inside a circles given an arbitrary radius in a shapefile object with the code below and my output needs to be (Two first columns with center os circle coordinates and values of each polygon percentage): "pts$x" "pts$y"

Re: [R-sig-Geo] [FORGED] Calculate each polygon percentage inside a circles

2016-05-25 Thread ASANTOS via R-sig-Geo
Dear Rolf Turner, It's much better a clean code with a minimum packages, thank you very much for your answer. But "pct" object give me a total polygon percentage around each point and I need too an identification (in columns) of individual contribution of each polygon. In my

[R-sig-Geo] Extract mean pixels values using circular samples

2017-02-05 Thread ASANTOS via R-sig-Geo
Dear R-sig Member I'd like to extract mean pixels values using x,y coordinates by defining a buffer or area surrounding individual point coordinate. My circular sample represents the radius of a circular region around each point. I try unsuccessfully this using extract function with

[R-sig-Geo] Create a georeferenced PDF with shapefile, points of interest and values in R

2017-03-07 Thread ASANTOS via R-sig-Geo
Dear Members, I created a georeferenced PDF using a shapefile and OK no problem, but I'd like to know if is possible to insert a title inside a output pdf (in top position "My geo PDF"), points of interest (pts.sampling) and values too. In my example: #Packages

Re: [R-sig-Geo] Extract xy coordinates from raster of interesting neighborhood cells

2018-05-30 Thread ASANTOS via R-sig-Geo
t; > ## Find pixels center of each point > N_cells <- cellFromXY(r, pts_s) > > e <- adjacent(r, N_cells , directions='bishop', id=TRUE, sorted = > TRUE) > xy <- xyFromCell(r, e[,'to'], spatial = TRUE) > > > #Visualization > > plot(

[R-sig-Geo] Extract xy coordinates from raster of interesting neighborhood cells

2018-05-30 Thread ASANTOS via R-sig-Geo
Dear R-Sig-Geo Members,     I've like to extract xy coordinates from raster of 24 neigborhood cells that surround the 4 given points (pts_s) pixels and for this I used: #Packages require(raster) require(sp) ## Create a raster r <- raster(nc=30, nr=30) r <- setValues(r,

[R-sig-Geo] Estimate of the intensity of a point process, as a function of a marked point process as covariate.

2018-03-31 Thread ASANTOS via R-sig-Geo
Dear R Sig Geo Members,     I've like to know if there are any function in any package for estimation density in a marked point process (e.g. geographic position and size of ants nests in square meters). My goal will be represents the density of ants nest estimated, but use nests sizes as

Re: [R-sig-Geo] [FORGED] Estimate of the intensity of a point process, as a function of a marked point process as covariate.

2018-04-01 Thread ASANTOS via R-sig-Geo
via R-sig-Geo wrote: Dear R Sig Geo Members, I've like to know if there are any function in any package for estimation density in a marked point process (e.g. geographic position and size of ants nests in square meters). My goal will be represents the density of ants nest estimated

Re: [R-sig-Geo] Create Kernel image results in *tif format

2018-09-27 Thread ASANTOS via R-sig-Geo
, instead of converting the image to a SpatialPixelDataFrame converting to a raster object might be an alternative. r_pines<-raster(d_pines) writeRaster(r_pines, "Pines.tif") Regards, Florian Am 26.09.2018 um 22:25 schrieb ASANTOS via R-sig-Geo: Dear R-sig-geo Members,       I've l

[R-sig-Geo] Create Kernel image results in *tif format

2018-09-26 Thread ASANTOS via R-sig-Geo
Dear R-sig-geo Members,     I've like to create Kernel image results as *tif using an object of density() function output in spatstat package. But in my example, doesn't work when I try: #Packages library(spatstat) library(raster) library(rgdal) #Swedishpines's data set in spatstat package

[R-sig-Geo] Identify hotspots (centroid/geometric center when CSR distance is not satisfied) using K-Ripley approach

2018-09-25 Thread ASANTOS via R-sig-Geo
Dear R-sig-geo Members,         I've like to identify hotspots points (centroid/geometric center of distances(r) when CSR is not satisfied), in my study case, centroids with points around 0.75 radius. This thinking in the map representation, for this objective I make: #Package

[R-sig-Geo] Pixel calculation using extract() in geoTiff raster: faster and free of computer lock in R

2018-11-18 Thread ASANTOS via R-sig-Geo
Dear R-sig-geo Members,     I've like to use R and raster package (extract() function) for pixel calculations (SD, Skewness and Kurtosis in 1  unit radius of a buffer) in a geoTiff raster, but my original geoTiff image has 6244(nrow), 8721(ncol) and 54453924 (ncell) dimensions. This image

[R-sig-Geo] adehabitat: Working with enfa() function using *asc files

2019-07-04 Thread ASANTOS via R-sig-Geo
Dear R-Sig-Geo Members, ?? Many years ago I used enfa() function of adehabitat package with my *asc files with environmental variables and my script works very well, but now adehabitat is deprecated and there are many versions of adehabitat. I install the adehabitatHS but for doesn't work

Re: [R-sig-Geo] Simple Ripley's CRS test for market point patters --- addendum.

2019-07-29 Thread ASANTOS via R-sig-Geo
Dr. Rolf Turner, Thanks again and your explanations as a personal spatial course for me :) You are very clear, but there are some questions yet. First, these data set is not artificial, I have real coordinates and area of nests of leaf-cutting ants in my example (in my complete data set

Re: [R-sig-Geo] Simple Ripley's CRS test for market point patters

2019-07-24 Thread ASANTOS via R-sig-Geo
Thanks for your help Marcelino e for the careful explanation Rolf Turner and so sorry about my post script configuration, I expected that I solved that in my new post. First my variable area is a marked point (attribute or auxiliary information about my point process - page 7 and not a spatial

[R-sig-Geo] Comparing distance among point pattern events

2019-11-22 Thread ASANTOS via R-sig-Geo
Dear R-Sig-Geo Members, I have the hypothetical point process situation: library(spatstat) set.seed(2019) A <- rpoispp(100) ## First event B <- rpoispp(50) ## Second event C <- rpoispp(50) ## Third event plot(A, pch=16) plot(B, col="red", add=T) plot(C, col="blue", add=T) I've like to know an

[R-sig-Geo] Circular/square sample function for extract coordinates and marks in *ppp object

2020-02-20 Thread ASANTOS via R-sig-Geo
Dear r-sig-geo members, I've to know if there is a function for sample for extract coordinates and marks of a marked planar point pattern object? In my example: library(spatstat) ## Using a longleaf data set longleaf #Marked planar point pattern: 584 points #marks are numeric, of storage

Re: [R-sig-Geo] Comparing distance among point pattern events

2020-01-09 Thread ASANTOS via R-sig-Geo
; boxplot(permout$ABd - permout$ACd) > points(1, mean(ABd) - mean(ACd), col="red") > > table(abs(mean(ABd) - mean(ACd)) >= abs(permout$ABd - permout$ACd)) > # FALSE TRUE > # 573 426 > > sum(abs(mean(ABd) - mean(ACd)) >= abs(permout$ABd - permout$ACd)) / npe

[R-sig-Geo] Fitting an Inhomogeneous Poisson model

2020-03-19 Thread ASANTOS via R-sig-Geo
Dear R-Sig-Geo members, I've like to fitting an Inhomogeneous Poisson model and I have one question about better approaches and/or steps order for this. ### Simulating Inhomogeneous Poisson process library(spatstat) cI <- rpoispp(function(x, y) {200 * x^2}, lmax = 1000) cII <-

[R-sig-Geo] Modifications of the methods in resample() function using raster package

2020-03-23 Thread ASANTOS via R-sig-Geo
Dear r-sig-geo members, ??? I?ve like to know the possibility of make some modifications in resample() function in raster package. First, in "bilinear" method by default is assigns a weighted average of the four nearest cells, and I?ll like to change for five and six nearest cells, too, is

Re: [R-sig-Geo] Modifications of the methods in resample() function using raster package

2020-03-23 Thread ASANTOS via R-sig-Geo
/) > Federal University of Goiás | Brazil > RG: https://www.researchgate.net/profile/Frederico_Faleiro > > > Em seg., 23 de mar. de 2020 às 10:41, ASANTOS via R-sig-Geo > mailto:r-sig-geo@r-project.org>> escreveu: > > Dear r-sig-geo members, > >  ??? I?ve like to know

[R-sig-Geo] Filtering a set of points in a "ppp" object by distance using marks

2020-09-15 Thread ASANTOS via R-sig-Geo
Dear R-Sig-Geo Members, I'd like to find any way to filtering a set of points in a "ppp" object by minimum distance just only between different marks. In my example: #Package library(spatstat) #Point process example - ants data(ants)

[R-sig-Geo] Count occurrences less memory expensive than superimpose function in several spatial objects

2020-08-19 Thread ASANTOS via R-sig-Geo
Dear r-sig-geo Members, ??? I'll like to read several shapefiles, count occurrences in the same coordinate and create a final shapefile with a threshold number of occurrences. I try to convert the shapefiles in ppp object (because I have some part of my data set in shapefile and another in

Re: [R-sig-Geo] Count occurrences less memory expensive than superimpose function in several spatial objects [SOLVED]

2020-08-20 Thread ASANTOS via R-sig-Geo
res1[target_sub1, on=c("x","y")] > > all.equal(res.xy, res.xy1, check.attributes=FALSE) # should return TRUE > > If you're using SQL then you just join the raw table with the grouped table > and you should get the table coordinates and occurrences. And, considering

[R-sig-Geo] Distance rule that filtering a set of points in "ppp" class by minimum or maximum distance

2020-08-27 Thread ASANTOS via R-sig-Geo
Dear R-Sig_Geo Members, I'd like to find a more simple way to filtering a set of points in a "ppp" object by minimum or maximum distance. In my example using a ants ("ppp" object) in spatstat package: #Packages library(spatstat) library(sp) #Point process example data(ants) str(ants) #-

[R-sig-Geo] raster: extract() based in a pixel value

2020-09-22 Thread ASANTOS via R-sig-Geo
Dear R-sig-geo Members, I'd like to use de extract() function using the raster package for calculate a proportion of pixel with "1"s values inside a buffer given some coordinates in a raster. I try to create a function for this without success, in my hypothetical example: #Package

Re: [R-sig-Geo] Filtering a set of points in a "ppp" object by distance using marks

2020-09-16 Thread ASANTOS via R-sig-Geo
publons.com/researcher/3085587/alexandre-dos-santos/ -- Em 16/09/2020 03:18, Marcelino de la Cruz Rot escreveu: Hi Alexandre, may be this? ddd <- nndist(insects.ppp, by=factor(insects.ppp$marks)) subset(insects.ppp,  marks=="termiNests" & ddd[,"termiNests"] >20)

Re: [R-sig-Geo] Filtering a set of points in a "ppp" object by distance using marks

2020-09-16 Thread ASANTOS via R-sig-Geo
/researcher/3085587/alexandre-dos-santos/ -- Em 16/09/2020 03:18, Marcelino de la Cruz Rot escreveu: Hi Alexandre, may be this? ddd <- nndist(insects.ppp, by=factor(insects.ppp$marks)) subset(insects.ppp,  marks=="termiNests" & ddd[,"termiNests"] >20) Cheers,

Re: [R-sig-Geo] Create pixels neighborhood in a raster

2020-11-09 Thread ASANTOS via R-sig-Geo
t's not clear to me. Finally, when you call raster::adjacent() you haven't defined the value for the cells argument when computing e1 and e2. What do you want them to be? I wish I could be more helpful. Cheers, Ben On Mon, Nov 9, 2020 at 12:46 PM ASANTOS via R-sig-Geo < r-sig-geo@r-project.org&g

Re: [R-sig-Geo] Create pixels neighborhood in a raster [solved]

2020-11-10 Thread ASANTOS via R-sig-Geo
. Maybe? It's not clear to me. Finally, when you call raster::adjacent() you haven't defined the value for the cells argument when computing e1 and e2. What do you want them to be? I wish I could be more helpful. Cheers, Ben On Mon, Nov 9, 2020 at 12:46 PM ASANTOS via R-sig-Geo < r-sig-

[R-sig-Geo] Create pixels neighborhood in a raster

2020-11-09 Thread ASANTOS via R-sig-Geo
Dear r-sig-geo Members, I'd like to find any way to create 1 (total 9 pixels) and 2 pixels (total 25 pixels) surrounding the neighborhood of each pixel (ant) in my plot image (antscount). In my example: #Packages library(spatstat) library(raster) #Selection of ants data set data(ants)

[R-sig-Geo] Clustering spatial points in a SpatialDataFrame object

2020-12-16 Thread ASANTOS via R-sig-Geo
Dear r-sig-geo Members, I'd like to calculate the centroid of each cluster (considering points with < 10m distance to the same cluster) of spatial points using mean operation (spdplyr package) for coordinates and another operation (sum) for the attribute(area) without success. In my