t; If this is a base graphics plot using the coordinate system units then you
>> can probably get them via some combination of the par() values, or you
>> might have set the margins to zero and that gives you the corners from
>> par()$usr (I think).
>>
>> If its grid gra
coordinate system units then
> you can probably get them via some combination of the par() values, or you
> might have set the margins to zero and that gives you the corners from
> par()$usr (I think).
>
> If its grid graphics (like spplot) then uhhh. someone else probably
Hi,
Long version:
I made a plot (a map) including SpatialPolygons representing the coast of
my region of interest, and a SpatialPointsDataframe representing locations
of cities, and I want to save this map in GeoTiff format to allow other
people to use this map as a georeferenced background withou
r line segment, but I'm not sure in what terms you can make
> this without ambiguity...
>
> On Tue, Dec 29, 2015 at 8:05 PM, Arnaud Mosnier
> wrote:
> > Dear spatial object users,
> >
> > Is there a way to make a single side buffer (left or right) based on
Dear spatial object users,
Is there a way to make a single side buffer (left or right) based on
SpatialLines?
Generally I use the trick consisting in cutting the buffer with the
expected width with a really small one, but in this case, it does not works
(see below).
I think that a single side buf
common GIS softwares).
Have a good day !
Arnaud
2015-04-09 7:50 GMT-04:00 Rainer M Krug :
> Barry Rowlingson writes:
>
> > On Wed, Apr 8, 2015 at 7:53 PM, Arnaud Mosnier
> wrote:
> >> Dear useRs,
> >>
> >> I am searching for a way to break the 10 cha
gt; > On Wed, Apr 8, 2015 at 7:53 PM, Arnaud Mosnier
> wrote:
> >> Dear useRs,
> >>
> >> I am searching for a way to break the 10 character limit of the field
> names
> >> in shapefiles created using for example the writeOGR function from the
> >
Dear useRs,
I am searching for a way to break the 10 character limit of the field names
in shapefiles created using for example the writeOGR function from the
rgdal package.
On way could be to define aliases for field names, but I am not aware of a
function allowing me to do that.
Any suggestion
45
>
> Regards,
> Pascal
>
> On Wed, Sep 24, 2014 at 10:59 PM, Arnaud Mosnier
> wrote:
> > Hi,
> >
> > I need to extract the mean value of raster values into several
> > spatialPolygons.
> > I use the extract function from the raster package with the
Hi,
I need to extract the mean value of raster values into several
spatialPolygons.
I use the extract function from the raster package with the weight option
in order to take into account the area of each raster cell with data
included into each polygon.
However, I want to make the calculation eve
You can probably use CRS("+proj=longlat +datum=WGS84")
---
>Hello,
>I?m trying to use the map function from package maps to draw the
contiguous United States with the projection, "+proj=aea >+lat_1=29.5
+lat_2=45.5 +lat_0=39.8
> > bit obscure until you understand that the character method (for a
> > file) does not allow you to pass in crs at that point, it's only
> > defined for the signatures "missing", "Extent", "matrix" and
> > "big.matrix".
> &g
; r <- raster()
> projection(r)
> projection(r) <- "+proj=lcc +lat_1=48 +lat_2=33 +lon_0=-100 +ellps=WGS84"
> projection()
>
>
> Might help,
>
> Best,
> Jan
>
>
> On 15/11/13 17:52, "Arnaud Mosnier" wrote:
>
> >Hi all,
> >
Hi all,
I re-run a script written some times ago containing a line like the
following
test <- raster("myraster.tif", crs = "+proj=longlat +ellps=WGS84")
The file is loaded correctly, but the crs was not attributed.
>proj4string(test)
gives me
[1] "NA"
When looking at the help file, nothing
/7 Sofea Wright
> Thanks a lot Arnaud Mosnier!
>
> The code is running however, the final output is strange. The minimum
> values and maximum values is NA. I would expect it to give me the
> slope (coeefficients[2] is the slope). I just could not figure out
> where I went wrong.
&
Just change the s for a x in
fun1 <- function(x) {
if (is.na(x[1])) {
NA
} else {
xcost<-cos(2*pi*time/12)
xsine<-sin(2*pi*time/12)
m = lm(s~xcost+xsine)
m$coefficients[2]
}
}
this should work !
fun1 <- function(x) {
if (is.na(x[1])) {
NA
} else {
xcost<-cos(2*pi*time/12)
xsine<-sin(2*pi*time/12
Sorry ... my mistake ... the rectangle is slightly rotated ... here is the
difference.
Arnaud
2013/6/26 Arnaud Mosnier
> Hi,
>
> Maybe I made an error somewhere, but I can't find where !
> There is differences when I calculated the area of a rectangular polygon
> and the
Hi,
Maybe I made an error somewhere, but I can't find where !
There is differences when I calculated the area of a rectangular polygon
and the value calculated by the function Polygon.
Sorry for the large precision numbers, but I tested if it was due to a
rounding error.
Hope you can enlighten m
This should do what you want.
Be careful, in the order of the points in your SpatialPointsDataFrame is
important !
d<-spDists(xy) <= 0.2
d[upper.tri(d, diag=T)] <-NA
select<-xy[-which(apply(d, 1,function(x) any(x == TRUE))),]
plot(select)
Arnaud
> # I have a SpatialPointsDataFrame that contains
mat=layout.matrix)
layout.show(4)
image(b[[1]])
image(b[[1]])
image(b[[1]])
image(b[[1]])
image(b[[1]])
Arnaud
2013/1/29 Arnaud Mosnier
> Hi all,
>
> Here is a problem that seems to be rather old (see the ref at the end of
> the message).
>
> When I use the layout function to
Hi all,
Here is a problem that seems to be rather old (see the ref at the end of
the message).
When I use the layout function to split the device into unequal parts then
plot a raster object, the layout is completely modified.
Here is a code to reproduce the problem.
library (raster)
b<- brick
Paolo,
Using GLS seems a good approach for what you want to do.
However, as its names indicates GLS models does not use the OLS approach,
so you can't use the "classic" R square interpretation.
I would follow these steps (but if I am wrong please feel free to correct
me !!).
1) Run your model in
If I remember correctly, MODIS images are in HDF4 format and if you are in
a windows environment gdal is not compiled with the hdf4 driver.
As already suggested, you can use FWTools to convert them in geotiff (for
example).
You can call gdal_translate implemented in it (this version of gdal is
comp
With your example,
r <- raster(ncol=3, nrow=3)
r[] <- 1:ncell(r)
#a vector of cells I want to select
vals<-c(2,4,6)
plot(r)
values(r) <- ifelse(values(r) %in% vals, 1, NA)
dev.new()
plot(r)
Arnaud
[[alternative HTML version deleted]]
___
R-sig
See example below.
rast<- raster(nrows=10, ncols=10)
rast[1:20] <- 3
rast[21:25] <- 9
rast[26:40] <- 2
rast[40:50] <- 7
rast[51:100] <- 1
plot(rast)
values(rast) <- ifelse(values(rast) %in% c(9,7), 1, NA) # just replace
c(9,7) by your vector
dev.new()
plot(rast)
Arnaud
[[alternative HTML
, 2012 at 12:10 PM, Barry Rowlingson <
> b.rowling...@lancaster.ac.uk> wrote:
>
>> On Wed, Mar 14, 2012 at 4:14 PM, Arnaud Mosnier
>> wrote:
>> > Hi all,
>> >
>> > I am trying to open a netCDF file (
>> >
>> ftp://globcolour_data:fg
It would be nice to have a good "sparse raster" format; but unfortunately
> this one does not look like a generic implementation.
>
> Robert
>
>
> On Wed, Mar 14, 2012 at 12:10 PM, Barry Rowlingson <
> b.rowling...@lancaster.ac.uk> wrote:
>
>> On Wed, Mar
Hi all,
I am trying to open a netCDF file (
ftp://globcolour_data:fgh...@ftp.acri.fr/GLOB_4KM/RAN/CHL1/MERGED/GSM/2007/DAILY/L3b_20070615__GLOB_4_GSM-MERMODSWF_CHL1_DAY_00.nc.gz
).
However, when I use the raster package to load it as a raster ...
library(raster)
test<-raster("D:\\temp\\testAQUAT
Chris,
If you only want to investigate if certain "area" (clusters of cells) have
high numbers of fish than others.
You can try to use a cluster analysis. See the packages "cluster" or
"FactoMineR"
Arnaud
-
Date: Mon, 12 Dec 201
Dear Geo Users,
I am trying to create "random" points which density decrease with the
distance from a polygon or a line.
Is there an function in R that can allow me to do that ?
Arnaud
[[alternative HTML version deleted]]
___
R-sig-Geo mailing
Dear all,
In searching a solution from the internet, I found someone who had the same
problem as me but ... who had no answers.
I hope I will have better chance! :-)
Here is her explanation:
http://r-sig-geo.2731867.n2.nabble.com/Converting-raster-to-polygons-with-just-one-polygon-for-cells-with
Paul, I never used ggplot2 before. I have to look seriously at the
possibilities of this package.
Robert, I will wait for the next version of the raster package (Is the
updated version available on R forge ?).
Thanks a lot to both of you !
Arnaud
[[alternative HTML version deleted]]
__
Dear Geo Users,
Please, can someone explain me how to plot a raster using a logarithmic
scale and obtaining the legend with this scale ?
Thanks for any help,
Arnaud
[[alternative HTML version deleted]]
___
R-sig-Geo mailing list
R-sig-Geo@r-p
Dear list,
In order to allow others benefiting from my errors, see below a presentation
of a problem and it's solution by Roger Bivand (Thanks !).
##
I want to use natural breaks (jenks) method to find class intervals into
raster's values in order to plot it w
Dear list,
Is there a function in R that allow to split a SpatialLinesDataFrame into
segments of a defined length ?
Thanks,
Arnaud
[[alternative HTML version deleted]]
___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/ma
Thanks for making that crystal clear.
For the moment, I will probably stick to FWtools to make my conversions, but
I hope I will have time to learn how to build gdal from source including the
drivers I need.
Thanks again,
Arnaud
2011/9/4 Roger Bivand
> On Sat, 3 Sep 2011, Arnaud Mosnier wr
Hi Jan,
Thanks for you answer.
I tried your script but unfortunatly it does not work for my case.
If someone want to make some test with the kind of image I want to use, just
try this script to download and uncompress it.
TestFolder <- choose.dir()
download.file("
http://oceandata.sci.gsfc.nasa.
.
So my question is now ... can someone give me a step by step instruction
that I can use to build a GDAL version including the support for HDF4 format
(as it is the case in the version compiled with FWtools) ?
Thanks,
Arnaud
2011/9/2 Paul Hiemstra
> On 09/01/2011 05:20 PM, Arnaud Mosn
Hi Geo UseRs,
I am searching a way to read and manage HDF files in R (like files provided
by the ocean color web site, http://oceancolor.gsfc.nasa.gov/).
Thanks
Arnaud
[[alternative HTML version deleted]]
___
R-sig-Geo mailing list
R-sig-Geo@
Dear Yiching,
For now, I just use the square of the correlation between the observed
and predicted
valuesââ. But if someone has another solution, I am also very interested in
suggestions!
Arnaud
[[alternative HTML version deleted]]
___
R-s
Dear list,
Inspecting residuals of my linear models, I detected spatial autocorrelation.
In order to take this into account, I decided to use the GLS method
with the correlation = corGaus ( ~ X + Y).
Then, I can sort my GLS models based on their AIC.
But ... how to know the proportion of the vari
Federico,
I recommend reading the following paper :
Methods to account for spatial autocorrelation in the analysis of
species distributional data: a review
Carsten F. Dormann, Jana M. McPherson, Miguel B. Araújo, Roger Bivand,
Janine Bolliger, Gudrun Carl, Richard G. Davies, Alexandre Hirzel,
Wal
Dear Users,
I apologize to resubmit this question to your brains, but I need to
understand some of my results to be sure that I did not make errors setting
my analysis.
So, even (and particularly) if the answer is "You are totally wrong", please
let me know !
>From previous analysis (semi-variogr
Dears UseRs,
In Zuur's book (Mixed effects models and extensions in ecology with R), p
167, it is mentionned that the Variogram function (package nlme) scale the
sill to 1.
Here is the plot of the semi-variogram given by the Variogram function on my
"lme" object. (http://imm.io/3OLe)
Note that the
Dear Users,
>From previous analysis (semi-variograms using package gstat), I found
spatial autocorrelation in my dataset.
The best fitted model to this spatial correlation structure is the Gaussian
model (Spherical, Exponential, Linear tested and comparison done by Sum of
Square errors).
So I used
Dear Mixed-Modelers,
Sorry to re-post this message.
I am trying to fit linear models using lme and considering the spatial
autocorrelation structure of my data.
I know that the correlation has a half-normal shape, so I use the function
corGaus.
Observations are coming from several surveys, done
Dear Geo-UseRs,
I am trying to fit a linear model in lme considering the spatial
autocorrelation structure of my data.
I know that the correlation has a half-normal shape, so I use the function
corGaus.
Observations are coming from several surveys, done at various dates
(sometimes several surveys
Sure, It would be much appreciated !!
Arnaud
--
Would it be worthwile to the R-sig-geo community to expand this code
into a crossvalidate package? This package could provide an easy means
of crossvalidating
Dear GeoUseRs,
>From the large number of methods that can be used to spatially interpolate
data, we tried several of them (Inverse Distance Weighted, Natural
Neighbour, Spline, Kriging, Co-Kriging) on our dataset. We used ArcGIS to
apply the first three and R for kriging and test possibilities of
49 matches
Mail list logo