Erich Subscriptions | 1 Aug 09:42 2015
Picon

leaflet problem


I am creating clickable maps with leaflet and experiencing a problem.

The documentation seems not to indicate how to specify an urlTemplate for multiple urls
I want to use
http://maps{s}.wien.gv.at/basemap/bmapgrau/normal/google3857/{z}/{y}/{x}.png <http://maps{s}.wien.gv.at/basemap/bmapgrau/normal/google3857/{z}/{y}/{x}.png>
with the possible values for {s}
'','1','2','3','4'

How do I specify this?
	[[alternative HTML version deleted]]
Mueller,Drew | 1 Aug 09:26 2015

Discrete choice spatial durbin or spatial general model

I would like to know if it is possible to estimate either the spatial durbin or general spatial model within
spdep or sphet (or another package) for discrete choice dependent variables.  I have attempted to pass

family = binomial(link = "probit") 

to spdep, hoping that spdep uses the glm()function and accepts "..." arguments, but get an "unused
argument" error.  If it is not possible in spdep, is there another package that is able to estimate a model
with both autocorrelation and heteroskedasticity for binomial or multinomial discrete responses?  I
have successfully estimated the SAR and SEM using packages McSpatial and spatialprobit, but wanted to
know if it is currently possible to estimate a model that includes both types of spatial effects for
discrete responses.   I suspect that both spatial effects are present in my transportation mode-built
environment model.

Thanks for your help,
Drew
john d | 31 Jul 22:21 2015
Picon

Re: measuring longitudes as if they were parallels?

Cool. I'll look into that. Thanks. Loïc!

On Fri, Jul 31, 2015 at 3:44 PM, john d <dobzhanski <at> gmail.com> wrote:

> Cool. I'll look into that. Thanks. Loïc!
>
> On Fri, Jul 31, 2015 at 1:21 PM, Loïc Dutrieux <loic.dutrieux <at> wur.nl>
> wrote:
>
>> Hi John,
>>
>> Possibly what you're looking for is in the geosphere package (
>> https://cran.r-project.org/web/packages/geosphere/geosphere.pdf).
>>
>> Cheers,
>> Loïc
>>
>>
>> On 07/31/2015 04:47 PM, john d wrote:
>>
>>> Dear all,
>>>
>>> Here's another issue that I've been struggling with and I'd really
>>> appreciate any input.
>>>
>>> I want to compare the latitudinal and longitudinal extents of different
>>> shapefiles. Comparing latitudes is straightforward because they are
>>> measured as parallels, so they are "self-referential". However, measuring
>>> longitudes is always tricky because, as they are represented as
>>> meridians,
(Continue reading)

john d | 31 Jul 16:47 2015
Picon

measuring longitudes as if they were parallels?

Dear all,

Here's another issue that I've been struggling with and I'd really
appreciate any input.

I want to compare the latitudinal and longitudinal extents of different
shapefiles. Comparing latitudes is straightforward because they are
measured as parallels, so they are "self-referential". However, measuring
longitudes is always tricky because, as they are represented as meridians,
longitudinal degrees always depend on their latitude.

Is there a way to represent longitudes that is also self-referential?
Perhaps some transformation?

Any discussion in this respect will be greatly appreciated.

	[[alternative HTML version deleted]]
john d | 31 Jul 02:33 2015
Picon

finding limits in a shapefile

Dear all,

Is there a simple way to obtain the coordinates for the N, S, E and W
limits of a shapefile?

Thanks

	[[alternative HTML version deleted]]
Karla Shikev | 31 Jul 00:20 2015
Picon

generating shapefiles based on the values on a raster

Hi there,

I need to take a raster (e.g. mean annual temperature) and generate a
shapefile with all the regions between two values (e.g. between 20 and 25
degrees C). Any tips will be greatly appreciated.

Karla

	[[alternative HTML version deleted]]
Rodrigo Plei | 30 Jul 17:14 2015
Picon

error in reading shapefile

Dear all,

I am getting the following error message when I try to open a shapefile
using maptools:

"Error in .shp2LinesDF(Map, proj4string = proj4string, delete_null_obj =
delete_null_obj) :
  not an arc or poly Map object"

How I can sort this out (if tthis is possible)?

Regards,

Rodrigo

--

-- 
=8-->=8-->=8-->=8-->=8-->=8-->=8-->=8-->=8-->=8-->=8-->=8-->

Prof. Dr. Rodrigo Silvestre Martins

Universidade Federal de São Paulo
Departamento de Ciências do Mar
Campus Baixada Santista
Avenida Almirante Saldanha da Gama, 89
Ponta da Praia, 11030400 - Santos, SP - Brasil
Tel: + 55 13 3878-3965

http://www.unifesp.br/campus/san7/inicio-imar
<http://www.imar.unifesp.br/v2/>

(Continue reading)

adeela uaf | 30 Jul 05:49 2015
Picon

CRS format

Hi,
I want to project my data on a map. The data were taken from a town of Faisalabad city in Pakistan. But I don't know how to place an 'epsg' value for that. As for meuse data set the codes are:

data(meuse)
>coordinates(meuse)<-~x+y # convert to SPDF
>proj4string(meuse) <- CRS('+init=epsg:28992')
For my dataset
coordinates(mt)<-~XCORD+YCORD
how can I find the epsg code.
Regards,
Adeela
Attachment (mt - Copy.csv): text/csv, 936 bytes
_______________________________________________
R-sig-Geo mailing list
R-sig-Geo <at> r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Helen Chen | 30 Jul 05:46 2015
Picon

questions for predicting spatial GEV in spatial extreme package

Hi,

I would like to predict spatial GEV from spatial extreme package for my
data.

The following is the code I run:

library(SpatialExtremes)

rainfall=read.csv("rainfall.csv")
coordinate=read.csv("coordinates.csv")
rain=as.matrix(rainfall)
coord=as.matrix(coordinate)

## Define the trend surfaces
loc.form <- scale.form <- z ~ x * y
shape.form <- z ~ 1

## Center and scale the covariates
covariates <- scale(coord[,1:2])
M0 <- fitspatgev(rain, covariates, loc.form, scale.form, shape.form)

I got error message as:

> M0 <- fitspatgev(rain, covariates, loc.form, scale.form, shape.form)
Error in scale.model$dsgn.mat %*% scaleCoeff : non-conformable arguments
In addition: Warning messages:
1: In model.matrix.default(mt, mf, contrasts) :
  the response appeared on the right-hand side and was dropped
2: In model.matrix.default(mt, mf, contrasts) :
  problem with term 2 in model.matrix: no columns are assigned
3: In model.matrix.default(mt, mf, contrasts) :
  the response appeared on the right-hand side and was dropped
4: In model.matrix.default(mt, mf, contrasts) :
  problem with term 2 in model.matrix: no columns are assigned

Could anyone help me to figure it out? Many thanks in advance.

Helen

	[[alternative HTML version deleted]]
Andy Bunn | 29 Jul 19:08 2015
Picon

raster::calc with multiple arguments

Hi all, likely a dumb question. I want to use raster::calc with a function containing more than one
argument. This violates the expectation of calc so I know the code below shouldn't work but I'm wondering
what the best alternative is for calculating values for a new raster object from another raster object
using a function with multiple arguments (e.g., fun2 below).

Regards and thanks in advance, Andy

require(raster)
r <- raster(ncols=36, nrows=18)
r[] <- 1:ncell(r)

# multiply values by 10
fun1 <- function(x) { x * 10}
# multiply values by alpha
fun2 <- function(x, alpha) { x * alpha}

rc1 <- calc(r, fun1) # works
rc2 <- calc(r, fun2, alpha=10) # doesn't work

	[[alternative HTML version deleted]]
Picon

plotKML - set color according to category

Dear Dr. Hengl,

First of all, I would like to thank you and your colleagues for the 
great package plotKML that I really enjoy using.
This was indeed a missing link to visualize data, in our case tracking 
data, in Google Earth to easily explore them visually.

I would like to ask you a question about the possibilities to color the 
points according to a variable.
In my data table I have a column with classification category "phase" 
(e.g. migration, stopover, breeding, wintering etc.).
Using e.g.: 
kml_layer(data,colour=phase,colour_scale=worldgrids_pal[[4]]), I get 
tracks nicely colored depending on category.

But the difficulty arises when one bird has less levels of the category 
than another (e.g. one bird making no stopover).
In this case the same colors are used, but for different values of the 
category, just in the order of first appearance.
To easily compare tracks between individuals I would like to color the 
same category always in the same color. I tried to
define the colors for each category and give the column with a color 
value per point to the kml_layer function, but this
didn't work. Is it possible to determine the color of each point?

At the moment I just use the combination of kml_open, kml_layer and 
kml_close to produce the output.
Unfortuntely, the much more beautiful and handy plotKML for Space-time 
Trajectory Data Frames doesn't work for the
tracks since they have too many points. Could you tell me what is the 
limit for this? And might it be possible for more
points in near future?

Thank you in advance for your help!

Kind regards,
Almut Schlaich

--

-- 
Almut Schlaich

Werkgroep Grauwe Kiekendief
telefoon: +31(0)650459766
e-mail: almut.schlaich <at> grauwekiekendief.nl
postadres: Postbus 46, 9679 ZG Scheemda
www.grauwekiekendief.nl
twitter:  <at> grauwekiek
facebook: www.facebook.com/pages/Werkgroep-Grauwe-Kiekendief/190585087622000

Gmane