Displaying 20 results from an estimated 2000 matches similar to: "spatstat questions"
2005 Dec 29
3
importing shapefiles into spatstat
Dear R users,
I am using spatstat to analyze point patterns (tree locations). I would
like to import the shapefile with the study area polygons (six total) into R
and use it to create the window for the spatstat analysis. I do not simply
want to use a rectangle because the study areas spread out over 40000 ha.
Any suggestions would be greatly appreciated.
Thanks,
Charlotte Reemts
Charlotte
2007 Apr 04
6
transition matrices
I am working with transition matrices of sequences of animal
behaviours. What I would like to do is parse the original matrices,
adjusting row/column order so that the matrix has its main values in blocks
surrounding the diagonal. This would cause behaviours involved in
functional groupings (e.g. grooming, resting, foraging etc) to appear as
blocks.
This can be done manually by applying
2017 Jun 01
3
[spatstat] Convert shapefile to pixel image
Dear all,
I am currently working with the spatstat package, using windows and pixel images.
First:
My aim is to transform a shapefile (see attached) into a pixel image.
My idea is to start transforming the shapefile into a Spatial Polygon file:
x <- readShapeSpatial("200001441.shp")
y <- as(x, "SpatialPolygons")
z <- as.owin(y)
Given z, I want to identify each
2013 Sep 19
3
How do I ensure that the polygon in spatstat::owin(poly=<polygon>) does not have “negative area”
I am a new user of the R spatstat package and am having problems creating a
polygonal observation window with owin(). Code follows:
library("maps")
library ("sp")`
library("spatstat")
mass.map <- map("state", "massachusetts:main", fill=T) # This returns
a data frame includding x and y components that form a polygon of
massachusetts mainland`
2017 Jun 01
0
[spatstat] Convert shapefile to pixel image
On 02/06/17 01:17, Lluis.Hurtado at uv.es wrote:
> Dear all,
>
> I am currently working with the spatstat package, using windows and pixel images.
>
> First:
>
> My aim is to transform a shapefile (see attached) into a pixel image.
>
> My idea is to start transforming the shapefile into a Spatial Polygon file:
>
> x <-
2004 May 29
1
Rhelp: Need help interpreting plots in spatstat
Hello everybody--
I have been playing with my data in spatstat, and what I'd like to
present is a basic exploratory spatial analysis. I have used the
following code, using a ppp.object called tsdspoints. The code
develops the simulations and the envelopes I want, but I don't
understand my first plot here, the [tsds.ghat.short$r,
tsds.ghat.short$raw]...I cobbled together this code
2007 Oct 03
2
Speeding up simulation of mean nearest neighbor distances
I've written the function below to simulate the mean 1st through nth
nearest neighbor distances for a random spatial pattern using the
functions nndist() and runifpoint() from spatsat. It works, but runs
relatively slowly - would appreciate suggestions on how to speed up
this function. Thanks. --Dale
library(spatstat)
sim.nth.mdist <- function(nth,nsim) {
D <- matrix(ncol=nth,
2013 Jan 29
1
points rejected as lying outside the specified window
Hello,
I am using the following code to create ppp files from csv data and map shape files, but I am getting some errors which I have been unable to fix by searching them online:
library(spatstat)
library(maps)
library(maptools)
NYC2<-readShapePoly("nybb.shp") # this is a map of the NYC boroughs without waterways and no census tract divisions (but it does include lines separating
2010 Apr 01
3
Using GIS data in R
I have a simple problem: I need to load a ERSI shapefile of US states
and check whether or not a set of points are within the boundary of
these states. I have the shapefile, I have the coordinates but I'm
having a great deal of difficulty bringing the two together. The
problem is the various GIS packages for R do not play well with each
other. sp, shapefiles, maptools, etc all use different
2006 Oct 07
3
merge and polylist
Greetings:
I would like to kindly ask for a little help. The rough code is:
#________________________________________________________
dat=data.frame(read.delim(file="all.txt", header = TRUE, sep = "\t",
quote="\"", dec=".",na.strings = "NA"))
nc=read.shape("astae.shp", dbf.data=TRUE, verbose=TRUE)
mappolys=Map2poly(nc)
submap
2005 Oct 10
3
Vectorizing loop
Hi
I have the following loop and would like to vectorize it. Any ideas if
it is possible?
Thanks,
Rainer
Tha Loop:
for (i in 2:Result$NoSims)
{
ppp <- runifpoint(Result$NoPlants)
K <- Kest(ppp)
Result$LSim[i,] <- sqrt(K$iso / pi) - K$r
CM <- (Result$LSim[i,] * Result$LSim[i,]) / abs(K$r[2] - K$r[1])
Result$SigCM[i] <- sum(CM, na.rm=TRUE)
print(i)
flush.console()
}
2011 Sep 23
1
spatstat => owin + image
Dear Community
I am at my wits end and seek advice.
My wish is to plot coordinates (x,y in WGS84_UMTS for the ones interested)
of sampling points.
This I can do by the standard spatstat prodcedure via owin. I then try to
add an image, which is
a map/satellite photo in the background.
Firstly
Problem: With the current code, I can not get the edges of the image to
match the boarders of the plot
2013 Mar 21
3
spatstat error
Good day
Im working with some coordinates, and want to create a PPP object, I found
that error:
> Datos=read.table("puntos_texto.txt",dec=".",sep="\t",header=T)
> summary(Datos)
id y x
Min. : 1.0 Min. :1013581 Min. :1177842
1st Qu.: 821.2 1st Qu.:1014442 1st Qu.:1179658
Median
2009 Apr 06
1
package: maps and spatstat question
I would like to use the output from the map function
in the package maps for use in, say, the spatstat
package. I don't quite understand the coordinates
for the border of the state:
Example:
library(maps)
iowa<-map("region","iowa)
x<-iowa$x
y<-iowa$y
There are NA's and duplicated coordinates.
What would I need to do to use this in the
spatstat owin command?
2012 Apr 16
2
Creating a point pattern with spatstat
I have presence/absence data in the following format:
1 2 3 4 5 6 7 8 9 10 11 12
1 1 1 1 1 1 1 1 1 1 1 1 0
2 1 1 1 1 0 1 1 1 1 1 1 0
3 1 1 1 1 1 1 1 1 1 1 0 1
4 1 1 1 1 1 0 1 1 1 1 0 1
5 1 1 1 1 1 1 1 0 0 1 1 1
6 1 1 1 0 0 1 0 0 1 1 1 1
7 1 1 1 1 0 1 1 0 0 0 1 1
8 1 1 1 1 1 1 1 0 0 0 1 0
9 1 1 1 1 0 0 1 0 0 0 1 1
10 1 1 1 1 1 1 1 0 0 0 0 1
11 1 1 1 1 1 1 1 1 1 0 0 1
12 1 1 1 1 1 0 0 0 1 1 1 1
2009 Oct 19
1
Spatstat: xy binary data into mask type to use in owin(mask=)
Dear users,
I am trying to export polygons from Arcmap into Spatstat to run some
simulations using functions available in Spatstat package.
One particular area to be exported is formed by a number of polygons
defining the external boundaries of the area (as a groups of islands) and a
number of polygons inside the previous ones, as ?holes? not to be
considered as part of the area.
I have
2005 Sep 26
1
merge maps from shapefile to lattice
Hi everybody:
Could anybody help how I solve the next problem?.
I'm doing interpolation maps of tropospheric ozone of my region, and after
create it using IDW, and kriging methods, I want from shapefiles (*.shx,
*.shp, *.dbf, *.sbx & *.sbn ) create contour over the interpolation maps.
Could anybody tell me how do it?.
Thanks in advance.
######################################
Antonio
2012 Jul 02
1
SPATSTAT: Minimum points for a Ripley K to be sensible?
Hello,
What are the minimum number of points in a point pattern before a
clustering analysis using a Ripley K function loses any meaning?
I haven't been able to find much comment in the literature about this
--- instead case examples typically use 100-200 points as a minimum.
Regards,
Sebastian Pucilowski
2012 Dec 07
1
Fwd: Simulation of spatial Log-Gaussian Cox process in Spatstat
Hello,
I have fitted a Log-Gaussian Cox Process on my data but when I try to
use "simulate.kppm" of the spatstat package I get this error:
Error in rLGCP(model = model, mu = mu, param = param, ..., win = win) :
The spatial domain of the pixel image ?mu? does not cover the
simulation window ?win?
I've used covariates as im, changed the npixel value of the spatstat
options to
2003 Dec 01
1
Re: using shapefile as owin
My sincerest apologies, as this is a very elementary problem, but I have
searched through archives and FAQs and on the web, and I am at the end of my
own resources.
I need to do analysis of a spatial point process occuring with four
counties, using spatstat. I've had no trouble importing the shapefiles, but
I can't seem to figure out what I need to do in order to use the boundary as
an