[R-sig-Geo] help using SVC_mle of library varycoef

2023-07-23 Thread Emanuele Barca
Hi, this is emanuele barca and I would like to learn the library varycoef. I created a simulation of an ideal spatial dataset (gaussian) and applied SVC_mle function: set.seed(1234) library(gstat) # create structure nx <- 100 ny <- 100 xy <- expand.grid(1:nx, 1:ny) names(xy) <- c("x","y")

Re: [R-sig-Geo] Help with spTimer or spTDyn to estimate the Bayesian Gaussian Process Model

2021-02-03 Thread alex_rugu--- via R-sig-Geo
I am getting the following error when running the below script for the Bayesian Gaussian Process (GP) Model using spTimer or spTDyn #Error  Output: GP models  Error in spGP.Gibbs(formula = formula, data = data, time.data = time.data,  :     Error: Years, Months, and Days are misspecified,  i.e.,

Re: [R-sig-Geo] Help when moving from PROJ4 to PROJ6

2020-07-28 Thread Gilberto Camara
Dear Roger I have installed the latest version of project, using “brew” as recommended by the PROJ website. I have also installed the latest versions of “sf” and “rgdal” as recommended by the “sf” GitHub. install.packages("rgdal", configure.args = c("--with-proj-lib=/usr/local/lib/",

Re: [R-sig-Geo] Help when moving from PROJ4 to PROJ6

2020-07-28 Thread Gilberto Camara
Dear Roger Please see my output: > sf_extSoftVersion() GEOS GDAL proj.4 GDAL_with_GEOS USE_PROJ_H "3.8.1""3.1.1""6.3.1" "true" “true" Thanks Gilberto === Prof Dr Gilberto Camara Secretariat

Re: [R-sig-Geo] Help when moving from PROJ4 to PROJ6

2020-07-28 Thread Roger Bivand
On Tue, 28 Jul 2020, Gilberto Camara wrote: Dear R-SIG-GEO (esp. Roger and Edzer) I am having problems with “raster”, “rgdal”, and “sf” when moving from PROJ4 to PROJ6. Roger’s explanation on the r-spatial blog ("https://www.r-spatial.org/r/2020/03/17/wkt.html”) and the rgdal blog

[R-sig-Geo] Help when moving from PROJ4 to PROJ6

2020-07-28 Thread Gilberto Camara
Dear R-SIG-GEO (esp. Roger and Edzer) I am having problems with “raster”, “rgdal”, and “sf” when moving from PROJ4 to PROJ6. Roger’s explanation on the r-spatial blog ("https://www.r-spatial.org/r/2020/03/17/wkt.html”) and the rgdal blog

Re: [R-sig-Geo] Help with universal kriging using gstat

2020-07-16 Thread Thomas Adams
Hi Roger, Thank you... I finally figured out what I was doing wrong and have been successful with gstat universal kriging. I will write-up the details for others later today and plan to write a technical note of such for GRASS GIS users, which I will submit there. Best, Tom On Thu, Jul 16, 2020

Re: [R-sig-Geo] Help with universal kriging using gstat

2020-07-16 Thread Roger Bivand
On Wed, 15 Jul 2020, Thomas Adams wrote: Hi all, It's been some time since I approached universal kriging using gstat (I struggled with this previously, years ago: https://stat.ethz.ch/pipermail/r-sig-geo/2006-May/001017.html). The problem... Within GRASS GIS, using R, I do this... (1) read

[R-sig-Geo] Help with universal kriging using gstat

2020-07-15 Thread Thomas Adams
Hi all, It's been some time since I approached universal kriging using gstat (I struggled with this previously, years ago: https://stat.ethz.ch/pipermail/r-sig-geo/2006-May/001017.html). The problem... Within GRASS GIS, using R, I do this... (1) read a raster DEM into R from GRASS -- srtm <-

Re: [R-sig-Geo] Help with geocode() & get_map() please

2020-05-28 Thread Poling, William via R-sig-Geo
7 May 2020 19:55:26 + From: "Poling, William" <mailto:poli...@aetna.com> Subject: [R-sig-Geo] Help with geocode()  & get_map() please   2. I am having trouble with get_map() ny.map <- get_map("New York", zoom = 8) Source : https://urldefense.proofpoint.com/v2/

Re: [R-sig-Geo] Help with geocode() & get_map() please

2020-05-28 Thread Poling, William via R-sig-Geo
Subject: [EXTERNAL] Re: Help with geocode() & get_map() please External Email - Use Caution On Thu, May 28, 2020 at 6:03 AM <mailto:r-sig-geo-requ...@r-project.org> wrote: Message: 1 Date: Wed, 27 May 2020 19:55:26 + From: "Poling, William" <mailto:poli...@aet

[R-sig-Geo] Help with geocode() & get_map() please

2020-05-27 Thread Poling, William via R-sig-Geo
Hello: #RStudio Version Version 1.2.1335 sessionInfo() # R version 4.0.0 Patched (2020-05-03 r78349) #Platform: x86_64-w64-mingw32/x64 (64-bit) #Running under: Windows 10 x64 (build 17763) library(ggmap) library(sp) library(rgdal) library(rgeos) I am trying to follow along with this

Re: [R-sig-Geo] Help with spTransform() function and final plot colors

2020-05-18 Thread Poling, William via R-sig-Geo
Thank you Michael this is very helpful. I see now where my trouble is, the EPSG. Best regards. WHP From: Michael Sumner Sent: Monday, May 18, 2020 5:02 AM To: Poling, William Cc: RsigGeo Subject: [EXTERNAL] Re: [R-sig-Geo] Help with spTransform() function and final plot colors

Re: [R-sig-Geo] Help with spTransform() function and final plot colors

2020-05-18 Thread Roger Bivand
This messy thread was on R-help first, and comes from a corporation able to pay for consulting help. It contains no reproducible example, and "+init=epsg:27700 +datum=WGS84" qualifies to fail GIS001 (the datum of OSGB is NOT WGS84, the same evident blunder is in the copied SO "code"). No

Re: [R-sig-Geo] Help with spTransform() function and final plot colors

2020-05-18 Thread Michael Sumner
Hi, your longlat coordinates are in the western hemisphere (-119, 39) but EPSG 27700 is designed for (and appropriate for some scenarios) somewhere in the UK. You need a local projection suitable for the area you are in. Look for an EPSG for your region, or maybe Albers conic or Lambert Azimuthal

Re: [R-sig-Geo] Help with spTransform() function and final plot colors

2020-05-18 Thread Poling, William via R-sig-Geo
Hello again. I also found this discussion on non-finite transformation error, however, I am not sure what to look for in the output after I apply my data? https://stackoverflow.com/questions/14880294/non-finite-transformation-detected-in-sptransform-in-rgdal-r-package str(sample) GPS.Points

Re: [R-sig-Geo] Help with spTransform() function and final plot colors

2020-05-18 Thread Poling, William via R-sig-Geo
Hello, I have found an additional problem. I should be getting 3 columns back in the xy@data at some point. $ ID : int 1 2 3 4 5 6 7 8 9 10 ... # $ Clust : int 1 1 1 1 1 1 1 1 1 1 ... This is always - 1 # $ Clust.1 : int 1 1 1 1 1 1 1 1

Re: [R-sig-Geo] Help with spTransform() function and final plot colors

2020-05-18 Thread Poling, William via R-sig-Geo
Hello, I have found an additional problem. I should be getting 3 columns back in the xy@data at some point. $ ID : int 1 2 3 4 5 6 7 8 9 10 ... # $ Clust : int 1 1 1 1 1 1 1 1 1 1 ... This is always - 1 # $ Clust.1 : int 1 1 1 1 1 1 1 1

[R-sig-Geo] Help with spTransform() function and final plot colors

2020-05-18 Thread Poling, William via R-sig-Geo
#RStudio Version Version 1.2.1335 sessionInfo() # R version 4.0.0 Patched (2020-05-03 r78349) #Platform: x86_64-w64-mingw32/x64 (64-bit) #Running under: Windows 10 x64 (build 17763) Hello. I am running my data through a routine I found that finds clusters of data points based on distance rule.

Re: [R-sig-Geo] Help to calculate the impacts using the spreg function in sphet package: GMM/IV with one endogenous and one instrument

2020-05-04 Thread Roger Bivand
On Mon, 4 May 2020, Roger Bivand wrote: On Sat, 2 May 2020, André M. Marques via R-sig-Geo wrote: Dear all, I apologize for my previous unclear code in the mail list.Now I hope to be clear about the problem I am facing in the following example: require("sf",

Re: [R-sig-Geo] Help to calculate the impacts using the spreg function in sphet package: GMM/IV with one endogenous and one instrument

2020-05-04 Thread Roger Bivand
On Sat, 2 May 2020, André M. Marques via R-sig-Geo wrote: Dear all, I apologize for my previous unclear code in the mail list.Now I hope to be clear about the problem I am facing in the following example: require("sf", quietly=TRUE)library(sphet)library(spatialreg) columbus <-

[R-sig-Geo] Help to calculate the impacts using the spreg function in sphet package: GMM/IV with one endogenous and one instrument

2020-05-02 Thread André M . Marques via R-sig-Geo
Dear all, I apologize for my previous unclear code in the mail list.Now I hope to be clear about the problem I am facing in the following example: require("sf", quietly=TRUE)library(sphet)library(spatialreg) columbus <- st_read(system.file("shapes/columbus.shp", package="spData")[1],

[R-sig-Geo] Help to calculate the impacts using the spreg function in sphet package: GMM/IV with one endogenous and one instrument

2020-05-02 Thread André M . Marques via R-sig-Geo
Dear all, # I am facing the following problem in calculating the impacts and their significance based on 'impacts' function in# {spatialreg} package:# I have one endogenous (HOVAL) and one instrument (PLUMB) ## endo=~HOVAL ; instruments=~PLUMB # How can I calculate the impact measures and their

Re: [R-sig-Geo] Help: assign crs to RasterBrick

2020-04-29 Thread Michael Sumner
You need to also setExtent() of the raster. That's the coordinates that the crs refers to xmin,xmax,ymin,ymax values in metres. Sometimes visual cues can be used to derive these from an image, sometimes the grid is a commonly used convention (a certain dimension, I.e. extent +resolution in a

[R-sig-Geo] Help: assign crs to RasterBrick

2020-04-29 Thread Jesús Rojo
> Hello everyone > I have a flipped RasterBrick without crs assigned (crs = NA): > plot(a[[100]] > > I would like to fill the map and assign the correct coordinate systems, that > it has been said to me to be specifically: > > "+init=EPSG:3034 +proj=lcc +lat_1=35 +lat_2=65 +lat_0=50 +lon_0=10

[R-sig-Geo] Help: assign crs to RasterBrick

2020-04-26 Thread Jesús Rojo
Hello everyone I have a flipped RasterBrick without crs assigned (crs = NA): plot(a[[100]] I would like to fill the map and assign the correct coordinate systems, that it has been said to me to be specifically: "+init=EPSG:3034 +proj=lcc +lat_1=35 +lat_2=65 +lat_0=50 +lon_0=10 +x_0=400

Re: [R-sig-Geo] Help

2020-01-13 Thread Bakary Faty
Dear Silver, Thank for your help. I think there had been a mix-up in the Coordinate Rference System. When I plot this shapefile I get it in the UTM Coordinate. Le Senegal is in Zone 28 North. The watershed on what I work is shared by trois Countries (Senegal, Gambie and Guinea). But in the

Re: [R-sig-Geo] Help

2020-01-12 Thread Micha Silver
Hello Bakary: Please keep questions on the list, so that others can benefit from the conversation. I see that the Basins shapefile you sent is declared to be in Long/Lat WGS84 Coordinate Reference System, however the coordinates (the X-Y locations)

Re: [R-sig-Geo] Help

2020-01-10 Thread Bakary Faty
Thank you very much for help, The code works fine but when I add the shapefile of my watershed I can not plot it. Le ven. 10 janv. 2020 à 09:41, Micha Silver a écrit : > > On 09/01/2020 21:02, Bakary Faty wrote: > > Thank you for appreciated reply, > > > > I explane you exactly what I want to

Re: [R-sig-Geo] Help

2020-01-10 Thread Micha Silver
On 09/01/2020 21:02, Bakary Faty wrote: Thank you for appreciated reply, I explane you exactly what I want to do with this R code attached. I want to adapt this code to my data to build an isohyet map. But i have some difficulties to adapt it to my case. I will be very happy when you will

Re: [R-sig-Geo] Help

2020-01-09 Thread Bakary Faty
Thanks very much angain, I'll check them out. Best regards Le jeu. 9 janv. 2020 à 19:05, Ben Tupper a écrit : > Your assignments that look like... > > minx <- rain_data_UTM at bbox[1,1] > > are not valid R statements - and that will cause an error. Instead, > obtain a matrix of the bounding

Re: [R-sig-Geo] Help

2020-01-09 Thread Ben Tupper
Your assignments that look like... minx <- rain_data_UTM at bbox[1,1] are not valid R statements - and that will cause an error. Instead, obtain a matrix of the bounding box using the bbox() function. Then extract your coordinates from that. I think you want... bb <- bbox(rain_data_UTM) minx

Re: [R-sig-Geo] Help

2020-01-09 Thread Bakary Faty
Thank you for appreciated reply, I explane you exactly what I want to do with this R code attached. I want to adapt this code to my data to build an isohyet map. But i have some difficulties to adapt it to my case. I will be very happy when you will help my to adapt this R code (attached) to my

Re: [R-sig-Geo] Help

2020-01-09 Thread Ben Tupper
Welcome to r-sig-geo! I don't think that you haven't provided us enough information so that we can help. On the other hand, does the example below using expand.grid help? minx <- 20 maxx <- 25 miny <- 31 maxy <- 36 pixel <- 1 grd <- expand.grid(x = seq(minx, maxx, by=pixel), y = seq(miny, maxy,

[R-sig-Geo] Help

2020-01-09 Thread Bakary Faty
Dear, I'm writing to express my wish to join R-sig-geo list users. I was doing a search on the net to know how to build an isohyet map and I came across this R code. However, I stumbled upon a problem from the line : grd <- expand.grid(x=seq(minx, maxx, by=pixel), y=seq(miny, maxy, by=pixel)), I

Re: [R-sig-Geo] Help with simple Map of US states to predefined regions

2018-09-14 Thread Bill Poling
Thank you Jerome, I will peruse and let you know. Best regards WHP From: Jérome Mathieu Sent: Friday, September 14, 2018 3:37 AM To: Bill Poling Cc: r-sig-geo Subject: Re: [R-sig-Geo] Help with simple Map of US states to predefined regions Hi, this might help you: http://socviz.co

[R-sig-Geo] Help with simple Map of US states with predefined regions Version 2 (Solved)

2018-09-14 Thread Bill Poling
, September 13, 2018 4:41 PM To: Bill Poling ; r-sig-geo@r-project.org Subject: Re: [R-sig-Geo] Help with simple Map of US states with predefined regions Version 2 I know this is not a complete solution -- and it's a very different approach -- but it should at least show you a way to reliably get states

Re: [R-sig-Geo] Help with simple Map of US states to predefined regions

2018-09-14 Thread Jérome Mathieu
Hi, this might help you: http://socviz.co/maps.html#maps http://strimas.com/r/tidy-sf/ https://cran.r-project.org/web/packages/fiftystater/vignettes/fiftystater.html Jerome Le mer. 12 sept. 2018 à 20:27, Bill Poling a écrit : > > Hi > > I have this df with three columns ProviderState,

Re: [R-sig-Geo] Help with simple Map of US states to predefined regions

2018-09-13 Thread MacQueen, Don via R-sig-Geo
I know this is not a complete solution -- and it's a very different approach -- but it should at least show you one way to reliably get states colored by region. I also left out Alaska and Hawaii. require(sp) require(rgdal) ## US Census Bureau Tiger file -- polygons of each US State ## try

Re: [R-sig-Geo] Help with simple Map of US states with predefined regions Version 2

2018-09-13 Thread MacQueen, Don via R-sig-Geo
I know this is not a complete solution -- and it's a very different approach -- but it should at least show you a way to reliably get states colored by region. (I also left out Alaska and Hawaii, since the point here is how to color the regions) require(sp) require(rgdal) ## US Census Bureau

[R-sig-Geo] Help with simple Map of US states with predefined regions Version 2

2018-09-13 Thread Bill Poling
Hi, I hope someone can help me finalize this please. I am coming close to what I need using variations from two ggplot2 tutorials. This first gives me the map of the US with AK & HI but I cannot figure out how to get my 5 regions colored

Re: [R-sig-Geo] help: Problem getting centroids inside lists

2018-09-12 Thread Ariel Fuentesdi
I understand, but I said "it doesn't work" because it gave an undesired solution, but I'll try to be more explicit next time. And I forgot to say that: s <- 1: length(ct) And thank you for your advice, but the answer of Vijay Lulla resolved my problem. Regards, Ariel 2018-09-12 17:43 GMT-03:00

Re: [R-sig-Geo] help: Problem getting centroids inside lists

2018-09-12 Thread Vijay Lulla
Maybe the following function is what you're looking for? getcentroids <- function(x1) { getcentroid <- function(x) { coords <- slot(x, "coords") numrows <- dim(coords)[1] ret <- if(numrows == 2) { matrix(apply(coords,2,mean), nrow=1) } else { if(numrows == 1) {

Re: [R-sig-Geo] help: Problem getting centroids inside lists

2018-09-12 Thread Ariel Fuentesdi
I went to a more general approach, that is: ctply <- lapply(X = s, FUN = function(x) sapply(X = ct[[x]], FUN = function(y) if(length(y)>1) geosphere::centroid(slot(y, "coords")) else sp::coordinates(slot(y, "coords" But now I want to add the case when they are only two

[R-sig-Geo] Help with simple Map of US states to predefined regions

2018-09-12 Thread Bill Poling
Hi I have this df with three columns ProviderState, ProviderStateCode, ProviderRegion I wanted to use to create a simple 5 color map I have reviewed fiftystater pkg and map pkg but not sure how to simply take these three columns and plot a simple 5 color map based on the Region the state is

Re: [R-sig-Geo] help: Problem getting centroids inside lists

2018-09-10 Thread MacQueen, Don via R-sig-Geo
If all of your data frames had enough points then this should work: myfun1 <- function(le) { list(one=geosphere::centroid(coordinates(le$one)), two=geosphere::centroid(coordinates(le$two)) ) } lapply(ct, myfun1) To handle the one point case, try the following, which I think

[R-sig-Geo] help regarding methodology

2018-08-10 Thread Monica Kundu
I want to work on conditional probability using spatial analysis. To be more precise, as in one event depends on the other but not vice versa and I want to prove this relation spatially. what methodology I can use. [[alternative HTML version deleted]]

Re: [R-sig-Geo] Help

2018-05-14 Thread Bede-Fazekas Ákos
Dear Soufianou, this is just a framework. Let's say that you have a vector ('variables') containing the name of the environmental variables. library(raster) library(dismo) library(corrplot) for (variable in variables) {     assign(variable, raster(paste0(variable, ".asc")) } environment <-

[R-sig-Geo] Help

2018-05-14 Thread Soufianou Abou via R-sig-Geo
Dear Rolf Turner, I have points of presence of cowpea in Niger in CSV format; in addition to other variables (soil texture, soil pH, altitude, I downloaded from worldclim archives, the 19 environmental variables, I cut them all at the Niger scale and I converted them under ASCUI format. The

[R-sig-Geo] Help

2018-05-14 Thread Soufianou Abou via R-sig-Geo
Bonjour , j'aimerais utiliser  maxent pour modéliser la distribution potentielle du niébé sur la base des données de présence seuls. En effet, jai acquis un certains nombre de variables environnementales et bioclimatiques concernant ma zone d'étude.  Mais pour choisir les variables les plus

Re: [R-sig-Geo] Help about gstat's functions for spatio temporal data interpolation

2018-05-13 Thread Edzer Pebesma
Dear Bruno, you'll find everything at https://github.com/edzer/gstat On 05/12/2018 09:05 PM, Bruno Sesti wrote: > Hi, I am trying to do spatio-temporal kriging and I am interested > especially in the software implementation of the algorithm and of data > analysis. I saw that R have many

Re: [R-sig-Geo] 'help'

2018-04-14 Thread Roger Bivand
On Sat, 14 Apr 2018, Sarah Goslee wrote: Hi, It's pretty much impossible, since we don't know what GIS software you used, what commands, what R package and code, or what your data look like. As a starting point, I'd suggest carefully rereading the help files for both the GIS and the R

Re: [R-sig-Geo] 'help'

2018-04-14 Thread Sarah Goslee
Hi, It's pretty much impossible, since we don't know what GIS software you used, what commands, what R package and code, or what your data look like. As a starting point, I'd suggest carefully rereading the help files for both the GIS and the R functions, to make sure that they are doing the

[R-sig-Geo] 'help'

2018-04-13 Thread Yalemzewod Gelaw
Hi I tried to compute the Moran's I statistics using GIS and R. However, I got different values. Could you please brief me how the difference can occurs? Using GIS Global Moran's I Summary Moran's Index: 0.151485 Expected Index: -0.007692 Variance:0.001040 z-score:

Re: [R-sig-Geo] help

2018-04-05 Thread Andrew Duff
Shouldn't this line be xlist <- nb2listw(neighbours,glist = NULL,style = "W",zero.policy =TRUE) instead of xlist <- nb2listw(neighbours,glist = NULL,style = "W",zero.policy =TRU) ? On Wed, Apr 4, 2018 at 9:44 PM, Yalemzewod Gelaw wrote: > I am a new student to R

Re: [R-sig-Geo] help

2018-04-05 Thread Roger Bivand
On Thu, 5 Apr 2018, Yalemzewod Gelaw wrote: I am a new student to R learning for spatial analysis. I was hoping someone could help me with the error message I keep getting when I try to convert the neighbour data to a listw object use the nb2listw() function. plot(xw_nbq,

[R-sig-Geo] help

2018-04-04 Thread Yalemzewod Gelaw
I am a new student to R learning for spatial analysis. I was hoping someone could help me with the error message I keep getting when I try to convert the neighbour data to a listw object use the nb2listw() function. plot(xw_nbq, coords,add=TRUE,col="red")> summary(xw_nbq) Neighbour list

Re: [R-sig-Geo] Help installing lwgeom on macOS

2018-02-26 Thread Patrick Schratz
Hi Kent, brew install geos && brew install postgis (for lwgeom) works for me. On Feb 25 2018, at 8:33 pm, Kent Johnson wrote: > > I am trying to install lwgeom 0.1-4 from source on macOS 10.13.3. > First try: > R CMD INSTALL lwgeom_0.1-4.tar.gz > ... > checking for

Re: [R-sig-Geo] Help installing lwgeom on macOS

2018-02-25 Thread Kent Johnson
This seems to work: R CMD INSTALL lwgeom_0.1-4.tar.gz --configure-args='-with-geos-config=/Library/Frameworks/GEOS.framework/Versions/3/unix/bin/geos-config --with-liblwgeom=/Applications/Postgres.app/Contents/Versions/10/lib/liblwgeom-2.4.0.dylib'

[R-sig-Geo] Help installing lwgeom on macOS

2018-02-25 Thread Kent Johnson
I am trying to install lwgeom 0.1-4 from source on macOS 10.13.3. First try: R CMD INSTALL lwgeom_0.1-4.tar.gz ... checking for geos-config... no no configure: error: geos-config not found or not executable. Second try: R CMD INSTALL lwgeom_0.1-4.tar.gz

[R-sig-Geo] help needed regarding package OSRM

2017-11-08 Thread Timothée Giraud
Hi, osrmRoute() requests a route between 2 points, it can return a SpatialLinesDataFrame of the route with travel time (minutes) and travel distance (kilometers) in its data slot. osrmTable() requests a travel time matrix between a set of points, it can return a matrix in minutes between

Re: [R-sig-Geo] help needed regarding package OSRM

2017-11-07 Thread Bacou, Melanie
This works for me (`f` is a data.frame of X,Y origin locations, `t` is a data.frame of X,Y destinations): osrm_api <- function(f, t, key=NULL) {   url <- "https://router.project-osrm.org/table/v1/driving/"   url <- paste0(url,     paste(f$X,

[R-sig-Geo] help needed regarding package OSRM

2017-11-07 Thread Shruti Tripathi
Hi, We want to compute the distances between two matrices of points in (long, lat) This is how, as per the manual distance is calculated between two points: route <- osrmRoute(src = com[1, c("comm_id", "lon","lat")], dst = com[15, c("comm_id", "lon","lat")]) How would I compute the same for a

[R-sig-Geo] Help to interpret optimal bandwidth in ggwr.sel (spgwr package)

2017-10-14 Thread Manuel Ribeiro
Dear list, i am using spgwr as an exploratory tool in the analysis of environment-health associations. The study area is square, with dimensions 100x100 m. In one of the results of my analysis, i found an optimal bandwidth (optimizing the CV score) of 507 m. And I interpret this bandwidth as

Re: [R-sig-Geo] help with plotKML::kml()

2017-08-07 Thread Tomislav Hengl
I think I set the color of the polygon line "white" which is the KML default, so you can only change the color of polygons (fill); see: https://github.com/cran/plotKML/blob/master/R/layer.SpatialPolygons.R#L112 To change colors per polygon you should run: data(eberg_zones) legend =

[R-sig-Geo] Help with plotKML::kml() ?

2017-08-04 Thread MacQueen, Don
Can I get some help with the plotKML::kml() function? I'm looking at various documentation and having trouble finding what I need. Suppose "foo" is a SpatialPolygonsDataFrame object with a lat/long coordinate reference system. Then in R I can do, for example, plot(foo, col='yellow',

Re: [R-sig-Geo] Help for STFDF Object Creation

2017-04-23 Thread Ankur Sarker via R-sig-Geo
Thanks for your reply. Sorry for my second post, I tried to be more clear. Here is link of my complete source code, data and R instance:https://drive.google.com/drive/folders/0B3tdiSZ9hBj4dVZXOXItUjdrRlE?usp=sharing Hope, it would be easier to understand my problem. On Sunday, April 23,

Re: [R-sig-Geo] Help for STFDF Object Creation

2017-04-23 Thread Edzer Pebesma
Please provide a script of an example that we can reproduce, preferably using data that is loaded from a package (to safe other people's time), otherwise it is impossible for anyone to help you, or unlikely somebody will. Your script does not create count data but assumes it is there; you don't

[R-sig-Geo] Help for STFDF Object Creation

2017-04-22 Thread Ankur Sarker via R-sig-Geo
Hi, I am trying to create a STFDF object and draw variogram. However, I am getting several errors. Here is my r code: #create count data c0157ts <- as.numeric(c(t(c0157))) c0001ts <- as.numeric(c(t(c0001))) #create coordinates lat <- 0 lon <- 0 lat[1] <- 34.0793684 lon[1] <- -81.1301722

Re: [R-sig-Geo] HELP: Fitting a model variogram

2017-02-08 Thread Kapo Coulibaly
Can you share your variogram (a graph) and your initial parameters? On Wed, Feb 8, 2017 at 1:55 AM, Kareem Longwe wrote: > Dear all > I am trying to fit a model variogram, but I am stuck on *ini.cov.pars. *I > am working in R. > > Would anyone give me a clue how to

[R-sig-Geo] HELP: Fitting a model variogram

2017-02-08 Thread Kareem Longwe
Dear all I am trying to fit a model variogram, but I am stuck on *ini.cov.pars. *I am working in R. Would anyone give me a clue how to estimate the 'partial sill and range'. I have tried changing numbers but I continuously get the following error message in R: Warning messages: 1: In

Re: [R-sig-Geo] Help regarding Autoencoder

2017-01-24 Thread Roger Bivand
On Tue, 24 Jan 2017, Subir Paul wrote: Dear All, I was using "SAENET" package for autoencoding. I used the following code: h=SAENET.train(data[,1:200], n.nodes = c(100, 20), unit.type = ("logistic"), lambda = 0.001, beta = 0.0001, rho = 0.01, epsilon = 0.01, optim.method =

[R-sig-Geo] Help regarding Autoencoder

2017-01-24 Thread Subir Paul
Dear All, I was using "SAENET" package for autoencoding. I used the following code: h=SAENET.train(data[,1:200], n.nodes = c(100, 20), unit.type = ("logistic"), lambda = 0.001, beta = 0.0001, rho = 0.01, epsilon = 0.01, optim.method = c("BFGS"),

Re: [R-sig-Geo] Help: impact measures in spatial panel durbin model

2016-04-20 Thread Youba Ndiaye
Thanks a lot. That's very helpful Best regards. Youba. Roger Bivand a écrit : > On Wed, 20 Apr 2016, Youba Ndiaye wrote: > >> Dear all, >> >> I'm a Ph.D student  and I'm working on spatial econometrics approach. >> >> I want to implement a static spatial durbin model  in

Re: [R-sig-Geo] Help: impact measures in spatial panel durbin model

2016-04-20 Thread Roger Bivand
On Wed, 20 Apr 2016, Youba Ndiaye wrote: Dear all, I'm a Ph.D student  and I'm working on spatial econometrics approach. I want to implement a static spatial durbin model  in R  with "splm" function. But the particular case of my model is that my durbin model is partial such as:   y = rho.Wy

[R-sig-Geo] Help: impact measures in spatial panel durbin model

2016-04-20 Thread Youba Ndiaye
Dear all, I'm a Ph.D student  and I'm working on spatial econometrics approach. I want to implement a static spatial durbin model  in R  with "splm" function. But the particular case of my model is that my durbin model is partial such as:   y = rho.Wy + X.beta + WZ.theta + epsilon    X and Z

Re: [R-sig-Geo] help with 2d- Density plots (ggplot2)

2016-01-16 Thread Thierry Onkelinx
Dear Amao, It's not clear how the "hundreds of species" come into the play. Do you want a map for each species? Or rather a single map that combines the species info. ggplot2() has AFAIK no options to restrict the output of stat_bin2d() to a polygon. Best regards, ir. Thierry Onkelinx

Re: [R-sig-Geo] help with 2d- Density plots (ggplot2)

2016-01-16 Thread Amao Abduljamiu
Yes Sir, my plan is to have several maps .i.e a map for each species. Sent from my iPad > On Jan 16, 2016, at 10:18 PM, Thierry Onkelinx > wrote: > > Dear Amao, > > It's not clear how the "hundreds of species" come into the play. Do you want > a map for each

[R-sig-Geo] help with 2d- Density plots (ggplot2)

2016-01-15 Thread Amao Abduljamiu
Dear All, I need help with 2d- Density plots (ggplot2)... I'm trying to plot ecological distribution of some species of organisms i'm studying over the Arabian/Persian Gulf. Here is a sample of code i've tried, Backround layer nc <- get_map("Persian Gulf", zoom = 6, maptype = 'terrain',

Re: [R-sig-Geo] Help with as.numeric(rownames(over(SpatialPoints(set1, set2, returnList= TRUE)[[1]]))

2015-11-02 Thread chris english
Hi Alan; As you say, runs most of the time. I took the liberty of cleaning out the >'s, removed the call to plyr as it doesn't seem to be used, and the rm(list=ls()) since I wasn't playing in a sandbox. How frequently does it misbehave? I'm sorry I can't offer anything more constructive than the

Re: [R-sig-Geo] Help with as.numeric(rownames(over(SpatialPoints(set1, set2, returnList= TRUE)[[1]]))

2015-11-02 Thread chris english
Alan, Possibly a nonsensical way of testing but I ran rep(try(transits <- random_walk(5000,1),silent=F), 100) and it completed without issue. Chris On Mon, Nov 2, 2015 at 5:33 AM, chris english wrote: > Hi Alan; > As you say, runs most of the time. I took the

[R-sig-Geo] Help with as.numeric(rownames(over(SpatialPoints(set1, set2, returnList= TRUE)[[1]]))

2015-11-01 Thread Alan Briggs
Hello. Below is a fully repeatable R-Script that I'm having trouble with. Generally, here's what I'm trying to do: 1) Randomly generate a tile.list() 2) Randomly generate a new point 3) Identify which polygon in the tile.list the new randomly generated point is in This works fine MOST of the

Re: [R-sig-Geo] Help on pointLabel() function for engineering drawings

2015-09-28 Thread Dhiraj Khanna
Oscar, I did as you suggested by putting “” for labels that I didn’t want. However, the labels still overlap the drawing :( Here is my code: library(dplyr)library(maptools)#Known Size of Sheet xmin <- -357.7 xmax <- 19.3 ymin <- -90.2 ymax <- 159.7 #Read in the data linescoords <-

Re: [R-sig-Geo] Help on pointLabel() function for engineering drawings

2015-09-27 Thread Oscar Perpiñán Lamigueiro
> Will using the lineLabel function align the labels as per the > orientation of the line? Yes, exactly. > Also, I changed the lines to points and then tried the pointLabel > function. However, it ignores all the points that are not mentioned > in the argument of the function and still plots

Re: [R-sig-Geo] Help on pointLabel() function for engineering drawings

2015-09-26 Thread Oscar Perpiñán Lamigueiro
Hi, You could try the `lineLabel` and `sp.lineLabel` functions of this same package. Best. Oscar. -- Oscar Perpiñán Lamigueiro Dpto. Ing. Eléctrica, Electrónica, Automática y Física Aplicada Escuela Técnica Superior de Ingeniería y Diseño Industrial URL: http://oscarperpinan.github.io

Re: [R-sig-Geo] Help on pointLabel() function for engineering drawings

2015-09-26 Thread Roger Bivand
On Sat, 26 Sep 2015, Dhiraj Khanna wrote: Thank you Oscar for the reply. Will try as you suggest. However, must admit that I am quite a noob when it comes to plotting. Was looking at your lineLabel() function and couldn't figure out what a "list of lines" is. Anyway, will struggle a little and

[R-sig-Geo] Help on pointLabel() function for engineering drawings

2015-09-24 Thread Dhiraj Khanna
Hello, I am trying to solve automatic label placement problem for an engineering drawing using the Simulated Annealing algorithm. I came across the pointLabel() function in the

Re: [R-sig-Geo] [Help] Error in spChFIDs(SP, x) : lengths differ

2015-09-05 Thread Robert J. Hijmans
There is no need to 'make a copy of the attribute table' of the sp object. Instead, you should be able to do: library(sp) # From https://www.census.gov/geo/maps-data/data/cbf/cbf_state.html states <- readOGR(dsn = "./cb_2014_us_state_5m.shp", layer = "cb_2014_us_state_5m") states <-

Re: [R-sig-Geo] [Help] Error in spChFIDs(SP, x) : lengths differ

2015-09-04 Thread Ignacio Martinez
Thanks Edzer. I think I understand the problem better now (this is all very new to me). Is there a solution so I can generate the map with my data? Thanks again! On Fri, Sep 4, 2015 at 9:51 AM Edzer Pebesma wrote: > > > On 09/04/2015 03:29 PM, Ignacio Martinez

[R-sig-Geo] [Help] Error in spChFIDs(SP, x) : lengths differ

2015-09-04 Thread Ignacio Martinez
I'm trying to create a map using leaflet. I'm basically following this but my data is a bit different this time around. Additionally, I'm using dplyr instead of data.table. This is the code i'm trying to run: counts <- structure(

Re: [R-sig-Geo] [Help] Error in spChFIDs(SP, x) : lengths differ

2015-09-04 Thread Edzer Pebesma
On 09/04/2015 03:29 PM, Ignacio Martinez wrote: > I'm trying to create a map using leaflet. I'm basically following this > but my data is a bit > different this time around. Additionally, I'm using dplyr instead of > data.table. > > This is the

Re: [R-sig-Geo] [Help] Error in spChFIDs(SP, x) : lengths differ

2015-09-04 Thread Ignacio Martinez
I'm not sure what I'm missing. This is not working (same error): counts <- structure( list( STUSPS = c( "CA", "NC", "TX", "FL", "VA", "OH", "NY", "GA", "IL", "WA", "CO", "AZ", "MD", "LA", "SC", "KS", "DC", "TN", "MA", "MI", "MN",

Re: [R-sig-Geo] [Help] Error in spChFIDs(SP, x) : lengths differ

2015-09-04 Thread Ignacio Martinez
This works :-) : library(dplyr) library(leaflet) library(rgdal) library(sp) states <- rgdal::readOGR(dsn = "./cb_2014_us_state_5m.shp", layer = "cb_2014_us_state_5m", verbose = FALSE) statesnames <- states@data %>% mutate(STUSPS =

Re: [R-sig-Geo] [Help] Error in spChFIDs(SP, x) : lengths differ

2015-09-04 Thread Edzer Pebesma
On 09/04/2015 03:53 PM, Ignacio Martinez wrote: > Thanks Edzer. I think I understand the problem better now (this is all > very new to me). Is there a solution so I can generate the map with my data? > The STUSPS fields of counts and states match, but you seem to filter the attribute table after

Re: [R-sig-Geo] Help needed with extraction of raster statistics by polygons

2015-08-25 Thread Dominik Schneider
Denys, The GIS functions in R have great utility, but speed is an issue; extract() in particular. So, if you make a 30m raster equivalent to the Grid30m but with the cell numbers as the values, you can use extract just once to determine which cells are to be extracted with each polygon. Then use

[R-sig-Geo] Help needed with extraction of raster statistics by polygons

2015-08-25 Thread Denys Dukhovnov via R-sig-Geo
Hello all! I need to spatially calculate 30-meter grid raster mean over US Census blocks in North East region (approx. 1.9 mln street blocks/polygons). I came up with the script that runs in parallel, but it still takes days to complete, even when the i7 CPU is used up to the max. My

Re: [R-sig-Geo] help: krigged map do not show colours

2015-08-05 Thread Jon Skoien
Anand, I could not open your .grd file in R, I think the .gri file is missing. However, looking at it in a text editor, and comparing with your R-script, it seems something went wrong with your projections. Your .csv-file has LatLong coordinates, but you are setting the projection to

Re: [R-sig-Geo] help: krigged map do not show colours

2015-08-05 Thread Jon Skoien
Hi, You have attached some data, but we still dont know exactly what you do with the data (do you use the logarithm, how many bins, did you project the data set...?). However, having had a quick look using the LatLong coordinates (not really recommended), I can see that the variogram from

Re: [R-sig-Geo] help: krigged map do not show colours

2015-08-05 Thread Anand Sookun
Dear Jon and Roman Thanks for the reply. Im attaching the code. You may be right that the variogram may be problematic but it fitted well visually. I think also that the prediction grid was not well created. I wiould be grateful to have to hints.code how to create a useful grid and also for

Re: [R-sig-Geo] help: krigged map do not show colours

2015-08-05 Thread Roman Luštrik
Unfortunately we don't have access to all the variables you use in `krige` call. Consider making a reproducible example. Cheers, Roman On Mon, Aug 3, 2015 at 5:30 PM, Anand Sookun asoo...@gmail.com wrote: Hi Thank you Roman for your kind response. The data is as attached which is part of

  1   2   3   >