search for: longlat

Displaying 20 results from an estimated 61 matches for "longlat".

2008 Jul 15
1
code reduction (if anyone feels like it)
...941, 33.3453), nrow=1) RM179 <- matrix(c(-81.890929, 33.317914), nrow=1) RM148 <- matrix(c(-81.7547337, 33.1514072), nrow=1) RM119 <- matrix(c(-81.501919, 32.94038), nrow=1) RM61 <- matrix(c(-81.262388, 32.524739), nrow=1) RM215.sp <- SpatialPoints(RM215, proj4string=CRS("+proj=longlat +datum=WGS84")) d060101 <- as.POSIXct("2006-01-01", tz="EST") study_seq <- seq(from=d060101, length.out=761, by="days") up.215 <- sunriset(RM215.sp, study_seq, direction="sunrise", POSIXct.out=TRUE) down.215 <- sunriset(RM215.sp, study_seq, d...
2012 Oct 18
1
spTransform longlat to utm
Dear all, I am trying to project my LongLat-maps to a plane. The ultimate purpose is to do a search of points in vicinity of other points using overlay-commands (sp) with radius in km. I am applying spTransform (package rgdal) and it gives my some curious results. An example. Let's take a point lying somewhere in Germany, zone=32U x...
2007 Jan 17
1
sp: proj4string has no impact
...oj=aea +lat_1=46 +lat_2=73 +lat_0=60 +lon_0=84 +x_0=0 +y_0=0 +ellps=clrk66 +units=m +no_defs") doesn't have any impact on the plotted object. I also tested the simple example: xy = cbind(x = 2 * runif(100) - 1, y = 2 * runif(100) - 1) plot(SpatialPoints(xy, proj4string = CRS("+proj=longlat")),xlim=c(-1,1),ylim=c(-1,1)) looks exactly like plot(SpatialPoints(xy, proj4string =CRS("+proj=stere +lon_0=98 +over")) or plot(SpatialPoints(xy)) without any projection. What I'm doing wrong? I use the latest versions of sp and rgdal. With many thanks for any hint, Al...
2013 Jan 18
2
How to re-project ease( Equal Area Scalable Earth) grid with a ~25 km cylindrical projection to WGS84 0.25 degree?
...varname = "Soil_Moisture") d: class : RasterLayer dimensions : 586, 1383, 810438 (nrow, ncol, ncell) resolution : 0.2603037, 0.2916659 (x, y) extent : -180, 180, -85.4581, 85.4581 (xmin, xmax, ymin, ymax) coord. ref. : +proj=longlat +datum=WGS84 names : Retrieved.soil.moisture.value zvar : Soil_Moisture a <- spTransform(d, CRS ("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs")) but I got this error: Error in function (classes, fdef, mtable) :...
2012 Jun 05
2
Converiting longitude/latitude to utm
...tude/latitude to utm but I got an error. As soon as the longitude coordinate is greater than 90, I get the folloowing error message: "error in pj_transform: latitude or longitude exceeded limits" Here is what I did: SP<-SpatialPoints(cbind(126.59,-14.30),proj4string=CRS("+proj=longlat")) coordinatesUTM<-spTransform(SP,CRS("+proj=utm")) Error in spTransform(SP, CRS("+proj=utm")) : error in pj_transform: latitude or longitude exceeded limits Can someone explain me what I did wrong? I am using coordinates of Australia so the range of my longitudes is...
2018 May 24
2
Problem with adding a raster and a brick
...ion, and origin are the same, so according to my understand it should work. The objects look like so: > obs.clim class : RasterLayer dimensions : 60, 200, 12000 (nrow, ncol, ncell) resolution : 0.5, 0.5 (x, y) extent : -70, 30, 50, 80 (xmin, xmax, ymin, ymax) coord. ref. : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0 data source : /home/mpayne/Documents/Predictability_engine/scratch/Bluefin/HadISST/ obs_climatology.nc names : sst z-value : 1988-02-15 zvar : sst > mdl.anom class : RasterBrick dimensions : 60, 200, 12000, 1 (nrow, ncol, ncell,...
2018 Mar 28
2
Fwd: netCDF to GeoTIFF by layer in r
...netcdf class : RasterLayer band : 1 (of 4 bands) #the bands here are the four soil layers dimensions : 16800, 43200, 725760000 (nrow, ncol, ncell) resolution : 0.00833333, 0.00833333 (x, y) extent : -180, 179.9998, -56, 83.99995 (xmin, xmax, ymin, ymax) coord. ref. : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0 data source : C:\FAPSEP_Eucalyptus\FAPSEP\Soil_Weather_data\Agro_IBIS_Eucalipto\VMC21\VMC21.nc names : Volumetric.water.content.at..33.kPa z-value : 4.5 zvar : VMC2 VMC1<-writeRaster(importnetcdf,filename="file.tiff",format=&...
2017 May 12
1
spTransform
...ess must be) UTM. I need to transform these into lon, lat. My use of spTransform, however, keeps giving me the wrong results. For what it's worth, it only seems to be messing up the latitude. My final line of code looks like this: pointsTransformed <- spTransform(pointsutm, CRS("+proj=longlat +datum=WGS84 +zone=36S")) The line before looks like: pointsutm <- SpatialPoints(cbind(pointsmapspatial$Point_Y, pointsmapspatial$Point_X), proj4string = CRS("+proj=utm +zone=36S +ellps=GRS80") Can you see what I did wrong? [[alternative HTML version deleted]]
2008 Jul 15
2
POSIXct extract time
RM215.sp <- SpatialPoints(RM215, proj4string=CRS("+proj=longlat +datum=WGS84")) d060101 <- as.POSIXct("2006-01-01", tz="EST") study_seq <- seq(from=d060101, length.out=761, by="days") up.215 <- sunriset(RM215.sp, study_seq, direction="sunrise", POSIXct.out=TRUE) down.215 <- sunriset(RM215.sp, study_seq, d...
2018 Mar 28
0
netCDF to GeoTIFF by layer in r
...er > band : 1 (of 4 bands) > #the bands here are the four soil layers > dimensions : 16800, 43200, 725760000 (nrow, ncol, ncell) > resolution : 0.00833333, 0.00833333 (x, y) > extent : -180, 179.9998, -56, 83.99995 (xmin, xmax, ymin, ymax) > coord. ref. : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0 > data source : > C:\FAPSEP_Eucalyptus\FAPSEP\Soil_Weather_data\Agro_IBIS_Eucalipto\VMC21\VMC21.nc > names : Volumetric.water.content.at..33.kPa > z-value : 4.5 > zvar : VMC2 > > > > VMC1<-writeRaster(importn...
2010 Nov 29
1
Moran I for very large data set
Hi Are there any more efficient ways of calculating the neighbourhood object for large datasets? I am trying to compute Moran I statistics for a very large data set (over 14,000 points). I have been using moran.test from the spdep package and everything works fine for a small data set (200 points). However, applying the same script to the whole dataset is taking days to compute (it so far has
2013 Apr 24
2
How to make a raster image in R from my own data set
...es("spdep", dependencies=TRUE) library(spdep) # spatial dependence install.packages("pastecs", dependencies=TRUE) library(pastecs) pts<-read.table.url("https://www.betydb.org//miscanthusyield.csv", header=T, sep=",") proj4string(pts)=<- CRS("+proj=longlat +datum=WGS84") #--------------------------------------------------------------------------- Cheers, Kristi [[alternative HTML version deleted]]
2009 Jul 16
2
Problems generating image from tiff file
I imported the attached tiff file and converted the coordinate system to long lat and graphed it: californiatiff<- readGDAL("california1.tif") proj4string(californiatiff) > rasterprojection <- spTransform(californiatiff, CRS("+proj=longlat") however, when using the plot command for rasterprojection, I get a blob. I can see the outline of the state of california and nevada, but rather than being able to see the geographic features, it is just a monocolor blob. My suspicion is that since it is a list of coordinates and another...
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 Feb 01
1
Gauss-Krüger coordinates system
Dear All, I need to convert some Northing-Easting coordinates from the Gauss-Krüger system into latitude-longitude. Any suggestions on how to do it? Regards, Marco Marco Giannitrapani Statistical Consultant Tel: +44151373 5945 Email: Internet: http://www.shell.com [[alternative HTML version deleted]]
2007 Nov 21
1
problem with nb2listw
...meone could help me with the error message I keep getting when I try to use the nb2listw() function. I have 45 sites and I want to get an autocorrelation value for sites within 1000m of each other. coords<-cbind(EAST,NORTH) coords<-as.matrix(coords) nb1000<-dnearneigh(coords,0,1000,longlat=TRUE) then when I try to run the nb2listw(nb1000, style="W") I get an error message of "Empty neighbour sets found". Can someone tell me what this means and how to possible fix it. Thanks Lynnette ~ Lynnette Dagenais M.Sc. Candidate Department of Renewable Resources Univers...
2009 Nov 18
0
Effective measurement of point-polygon distance
...ind( c(65,67,76,68,65), c(30,29,24,22,30) )))))) # Test points: x = c(5, 7, 35, 28) y = c(60, 70, 90, 85) xy <- SpatialPoints(cbind(y,x)) distance <- rep(NA, 4) for (i in 1:4){distance[i] <- min(spDistsN1(coordinates(spsample((w1), n=50, type = "regular")), coordinates(xy[i,]), longlat=T))} for (i in 1:4){distance[i] <- min(spDistsN1(coordinates(spsample((w2), n=50, type = "regular")), coordinates(xy[i,]), longlat=T))} distance # What I need, is a for-loop (or something similar) that goes through the list of polygons, checks the minimum # distance to each point for...
2012 May 01
0
Plotting shapefiles on existing maps
...e is a *.prj file accompanying the *.shp), try using the transform() method in the rgdal package to do this. If there is a *.prj file, this should work: library(rgdal) my_lines <- readOGR(<directory>, <shapefile_without_extension>) my_lines1 <- transform(my_lines, CRS("+proj=longlat +ellps=WGS84")) *I believe the above line should be: my_lines1 <- spTransform(my_lines, CRS("+proj=longlat +ellps=WGS84")) plot(my_lines1, add=TRUE) If not, you'll need to work out exactly what the projection is, and set it in PROJ.4 notation by: proj4string(my_lines) <-...
2008 Aug 19
4
converting coordinates from utm to longitude / latitude
Hi, is there a function in R to convert data read with read.shape and which is originally in UTM coordinates into longitude / latitude coordinates? I found the convUL() function from the PBSmapping package but I have no idea how I could apply that to the read.shape object. Many thanks, Werner __________________________________________________ Do sragenden Schutz gegen Massenmails.
2009 Jul 15
1
Simulation code error
...<- names(xx) + V <- paste(V, collapse="+") + V <- paste("SBA~", V) + rd <- round(nrow(data)*(2/3)) + d <- sample(seq(1:nrow(data)),rd) + dat1 <- data[d,] + dat2 <- data[-d,] + crd <- cbind(dat1$Longitude,dat1$Latitude) + dist80 <- dnearneigh(crd,0,100,longlat=F) + dist80sw <- nb2listw(dist80, style="B") + fm <- errorsarlm(as.formula(V), data=dat1, listw=dist60sw) + pred <- predict(fm,dat2) + C[i,1] <- cor(dat2$SBA,pred) + out <- cbind(C) + } + colMeans(out) + } > > sim.sp(df2007.5k.s2,CM,1,1000) Error in nb2listw(dist80, s...