Manuel Spínola | 23 Oct 16:10 2014
Picon

How to segment or split a spatial line in R

Dear list members,

How to segment or split a spatial line in shorter equal segments, and also,
how to get the mid point of ecah segment.

Best,

Manuel

-- 
*Manuel Spínola, Ph.D.*
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
mspinola <at> una.ac.cr
mspinola10 <at> gmail.com
Teléfono: (506) 2277-3598
Fax: (506) 2237-7036
Personal website: Lobito de río <https://sites.google.com/site/lobitoderio/>
Institutional website: ICOMVIS <http://www.icomvis.una.ac.cr/>

	[[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo <at> r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
(Continue reading)

Anthony Damico | 23 Oct 15:01 2014
Picon

fattening certain portions of a city map in R with using projections

hi, i'm trying to map new york city and wondering if it's possible to pick
a projection that will have an effect that brings the map a bit closer to
the shapes seen in the nyc mta subway map  (
http://i.stack.imgur.com/YT50F.jpg).

the bonne and azimuthal projections on this page (
https://en.wikipedia.org/wiki/List_of_map_projections) really appear to
inflate africa the same way that i would like to inflate either manhattan
or perhaps manhattan + brooklyn.

i've posted reproducible code and some example images here--

http://stackoverflow.com/questions/26493524/what-projections-in-r-will-fatten-a-city-map

i understand what i'm trying to do could be accomplished as a cartogram,
but i'm curious if - since i don't really care about population- or
count-based weighting - a smart projection selection might save me a lot of
time.

thank you!!

	[[alternative HTML version deleted]]
Alessandra Carioli | 23 Oct 12:48 2014
Picon

distance between centroids

Dear all,

I am trying to compute the average distance between centroids and between neighbors, starting from a
spatial polygon shape file.
What I am doing is compute the average distance between all centroids and compute the average distance
between neighbors for different regions in order to better compare them. (Some are densely populated and
have more centroids, others are the opposite).
Does anyone have any ideas? I am sure it should be pretty simple.

So far I have used dist but does not give me what I want.

Bests,

Ale
	[[alternative HTML version deleted]]
Navinder Singh | 22 Oct 23:57 2014
Picon
Picon

Overlaying time designated spatial points from a data frame to match the time of a raster image in a rasterStack

Hi,

I have a level plot with a number of rasters (monthly rasters for a year- generated with kind help from
Oscar). Basically a raster stack.

I would like to overlay spatial points on this raster stack, but would like to overlay only those points that
belong to the month matching the raster stack. For e.g. The points form January should fall on the raster
from January, those from february should fall on February raster as so on. I am drowning in the lattice'
literature but have not succeeded till now.

I am running the following code but not sure how to assign an index which can delegate the points from
respective months to their rasters in the layer + sp. points argument from rasterVis package.

My data frame has the following columns:
df= X, Y, date (POSIXct), month (month.abb), id (animalID), SITE (a factor with origin area)

The rasters also have names in the format of month.abb.

And the code i am using is:

rrMean is a raster stack of monthly means. dfSp is a SpatialPointDataFrame with above fields.

p<-levelplot(rrMean, main="Mean Monthly NDVI (2010-2014)", par.settings=myTheme)
p+layer(sp.points(dfSp,col=dfSp$SITE))

# I understand that col argument just changes the colours but still plots all points on all rasters, but i
guess i need something specified
in sp.points(dfSp,col=dfSp$SITE).

Thanks for any suggestions.
(Continue reading)

Jefferson Ferreira-Ferreira | 22 Oct 22:29 2014
Picon

Loading Rasters in Revolution R

Hi all,

I'm wondering how to load rasters as xdf files using rxImport. I have a big
raster with 9 layers/bands and I need to do perform a logistic regression
for each pixel throughout bands. So It's a huge processing, and why I'm
testing Revolution R Enterprise.
However I don't know how to import as xdf files to perform parallel
processing inside it. Almost blogs and tutorials deals with ordinary csv
files.

Could anybody give me any guidance?

Regards

--

-- 

*Jefferson Ferreira-Ferreira*

Geógrafo – GEOPROCESSAMENTO IDSM | Coordenadoria de TI

Jefferson.ferreira <at> mamiraua.org.br

*Instituto de Desenvolvimento Sustentável Mamirauá*

Ministério da Ciência, Tecnologia e Inovação

Telefone: +55 97 3343-9710

*Google Maps* - Mapas deste e-mail:

(Continue reading)

Silvia Cordero-Sancho | 22 Oct 20:01 2014
Picon

Kest (spatstat) and "r" values

Hello,

I am employing the Ripley's K function to evaluate my data and have some
concerns regarding the maximum distance reported.

My data was collected in 7 different sites. At each site we recorded the
location x-y of the events. The 7 sites were had *"similar conditions"
*but their
extent vary, and in addition, not all sites presented the same number of
events (number of events per site vary from 92 to up to 400 ).

Each site was evaluated independently, meaning that Site-1 had their on set
of events and own window of observation (W). I used the *ripras* function
to define *W, *(for all sites, W is an irregular shaped window).

I have run two first order exploratory  tools
(quadrat.test, clarkevans.test). The overall results is that my
observations are not random and show aggregation tendencies for all sites.

I applied the function* Kest* to all my seven sites to explore the second
order properties, I did not provide a *r* value (as recommended in the help
section) and here is the "curious" outcome. Indifferently of the area of W
or the number  of events per site, the maximum r-values reported for all
sites is very similar (between 5000 m to  6140 m). I am trying to
understand the reason behind these results. Is this an overall
characteristic of my pattern OR is a result of the algorithm that spatstat
employs to define r (e.g. it has a maximum threshold)

Here my code:

(Continue reading)

Mathieu Rajerison | 22 Oct 17:12 2014
Picon

Kernel Density Estimation with Border Bias Correction

Hello,

Some people here might be interested by this :
https://github.com/ripleyCorr/Kernel_density_ripley

"This page proposes some R codes to compute the kernel density estimates of
two-dimensional data points, using an extension of Ripley's circumference
method to correct for border bias"

Best regards,

Mathieu

	[[alternative HTML version deleted]]
Jue Lin-Ye | 22 Oct 14:33 2014
Picon

Re: pieSP: pie charts on map

Dear list members,

I am working on the following code.
https://dl.dropboxusercontent.com/u/61881075/R-geo-help/question_draw_pie.v1.R
https://dl.dropboxusercontent.com/u/61881075/R-geo-help/Question_Tr_1_.H0_2.3m.v8.txt
https://dl.dropboxusercontent.com/u/61881075/R-geo-help/Question_Tr_2_.H0_2.3m.v8.txt
https://dl.dropboxusercontent.com/u/61881075/R-geo-help/Question_wana_coord.3.txt

(this might be erased after solution of problem)

 I am characterizing marine storms. There are four variables: slogE,
sloguE, slogT and slogD.

I would like to do the following

-draw a map for every return period (Tr) and every variable
 - have a pie chart for every WANA node (Here I have two nodes. The node
names are shown on the first column of Data.1.txt)
-Use the same colors for every variable. I mean, for Tr=1 through 50 years,
all the variables increase with return period, but I would like to have the
same colors for the same value ranges, in order to compare the maps. That
is, if return period 1year has slogE within the ranges (0,1] and (1,2] and
return period =2 years has slogE within the ranges (1,2] and (2,3], I would
like to take all (0,1]=blue, (1,2]=green and (2,3]=red and have two slices
of blue-green in Tr=1 year and two slices of green-red in Tr=2 years.

like this

http://alaska.usgs.gov/science/biology/seabirds_foragefish/foragefish/images/beach_seine_comp_pie_charts_sm.gif

(Continue reading)

Frede Aakmann Tøgersen | 21 Oct 13:30 2014

Re: Order raster images in a levelplot

Please remember to post to the list as well since this was there this thread startet.

Dows it have something to do with you not setting the name argument of setZ()?

You are doing:

NDVImodis<-setZ(NDVImodis,d)
names(NDVImodis)<-d

Perhaps you should do:

NDVImodis<-setZ(NDVImodis,d, name = "Months")

And then e.g.

zApply(NDVImodis, by=months, fun=mean, name="Months")

?????

Yours sincerely / Med venlig hilsen

Frede Aakmann Tgersen
Specialist, M.Sc., Ph.D.
Plant Performance & Modeling

Technology & Service Solutions
T +45 9730 5135
M +45 2547 6050
frtog <at> vestas.com<mailto:frtog <at> vestas.com>
http://www.vestas.com<http://www.vestas.com/>
(Continue reading)

Navinder Singh | 21 Oct 12:45 2014
Picon
Picon

Order raster images in a levelplot


Dear Both,
Thank you for your responses.
Oscar- I am still trying to get the indexing going. Hope it will be sorted out soon.
Just to provide some more background on my code- here is an example.

library(raster)
library(rasterVis)
library(raster)
library(rgdal)
library(zoo)

setwd("/Users/nasi/Google Drive/5KMNDVI_Monthly")

modis = stack(list.files(pattern='NDVI.tif'))
modis
names(modis)
d<-seq(as.Date("2010-01-01"),as.Date("2014-08-01"),by="month")
names(modis)<-d
NDVImod<-setZ(modis,d)
e<-extent(-17.96, 43.135, -30.055, 67.08)
NDVImodis<-crop(NDVImod,e)
NDVImodis[NDVImodis<0]<-0
NDVImodis<-setZ(NDVImodis,d)
names(NDVImodis)<-d

# The first problem occurs below. I am trying to get monthly means and other quantities. Although the
function does give me an output, but the results are completely wrong. As it seems to be averaging the wrong
months together. Can’t really paste the image here i suppose.

(Continue reading)

Jue Lin-Ye | 21 Oct 12:17 2014
Picon

pieSP: non-finite coordinates

Greetings!

I am working with the following code. I am having an error called
"non-finite coordinates". May you tell me what does it exactly mean and how
to fix it?

On the other hand, I see that my original percentages in "pie.chart" is
changed when converting to "pies" (I have written them both in boldface).
Why does this happen and how can I fix it?

Thank you in advance!

>* pie.chart*
        wana long   lat prob1 prob2 prob3 prob4

*[1,] 2125149 3.42 42.42   106  5292  5198     0[2,] 2125147 3.42 42.25
15  4241  5205     0*
> pie.chart<-data.frame(pie.chart)
> coordinates(pie.chart)<-~long+lat
> proj4string(pie.chart) <-llCRS
> pie.chart
class       : SpatialPointsDataFrame
features    : 2
extent      : 3.42, 3.42, 42.25, 42.42  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +ellps=WGS84
variables   : 5
names       :    wana, prob1, prob2, prob3, prob4
min values  : 2125147,    15,  4241,  5198,     0
max values  : 2125149,   106,  5292,  5205,     0
>
(Continue reading)


Gmane