Roger Bivand | 5 Sep 2005 09:26
Picon

Re: your mail

Dear Md. Moshiur Rahman,

You sent your question to the list administrator, not to the list, so I am 
sending my reply to you and the list.

The simple answer is at the end, but first the complicated answer ...

It would be useful to know which file formats you have access to for your 
data. 

You are correct in saying that the e00 and binary coverages are from
Arc/Info, which many years ago ran only on minicomputers under many
operating systems (Unix, Vax VMS, ...), but never Windows nor Linux (PC
ArcInfo was a different programme running under DOS and 16-bit Windows up
to Windows 95).

ArcView was never more than a "viewer" when first designed, but ESRI - the 
authors of Arc/Info - found that their main customers wanted a 
Windows-based product. For this reason, the newer ArcGIS only runs on 
Windows (I believe), and can use both the legacy e00 and binary coverages 
inherited from Arc/Info, and the simple shapefile format added to ArcView 
as it developed.

The difference between the e00/binary coverage format and shapefiles is
that the former, original Arc/Info files describe the geometry of the
stored objects in a more complicted way. Each line is only stored once,
and the "arc/node" data model builds the lines into more complex
structures - indeed, the product names Arc/Info, ArcView, and ArcGIS refer
directly to the use of this structure. Shapefiles just contain lines or
ring polygons for each object, so contiguous objects have duplicated
(Continue reading)

Fernando González Cortés | 5 Sep 2005 13:42
Picon

help with spatial interpolation

Hello,

    I have the following problem: I have a set of 3d points irregularly spaced. I have to obtain a grid with the
interpolated values between the points and I have to use a spline interpolation. I have seen some R
packages that perform some kind of interpolation but I don't know which one should I use. Can anyone help me
to find the right one?
    I just used the 'Tps' method of the 'fields' package and i've obtained a nice graphic. Does anyone knows how
to export the result of the interpolation to be used in a GIS application?

Thanks in advance
Fernando
	[[alternative HTML version deleted]]
Fernando González Cortés | 7 Sep 2005 08:20
Picon

Re: help with spatial interpolation

I think I've solved the problem. I used the maptools library to read the
points from a shapefile and the fields library to obtain the grid. Here is
the script:

library(maptools)
points <- read.shape("points2d")
x <- array(0, c(length(points$Shapes),2))
for (i in 1:length(points$Shapes)) { x[i,1] <-
points$Shapes[[i]]$verts[,1] }
for (i in 1:length(points$Shapes)) { x[i,2] <-
points$Shapes[[i]]$verts[,2] }
y = points$att.data[[2]]
library(fields)
fit <- Tps(x, y)
fit.prediction <- predict.se(fit)
out <- predict.surface(fit, nx=1000, ny=1000)
png()
par(mai=c(0,0,0,0))
image(out, axes=FALSE, col=gray((100 - 0:100) / 100))
dev.off()

Bye

----- Original Message ----- 
From: "Rick Reeves" <reeves <at> nceas.ucsb.edu>
To: "'Fernando González Cortés'" <fernando.gonzalez <at> iver.es>
Sent: Wednesday, September 07, 2005 1:35 AM
Subject: RE: [R-sig-Geo] help with spatial interpolation

Fernando:
(Continue reading)

Narendran Kodandapani | 7 Sep 2005 17:39
Picon
Favicon

logistic regressions

Hi all,

Is it possible to conduct a logistic regression in R
using a range of probabilities in a response variable,
and subsequently will it be possible to apply weights
to each observation and rerun the logistic regression.

Thanks,

Naren
PhD Candidate,
MSU,
USA
Roger Bivand | 7 Sep 2005 20:46
Picon

sp 0.8-1 has incompatible changes

Package sp, with classes and methods for spatial data, has version 0.8-1
now released on CRAN. The new version contains a number of incompatible
changes w.r.t. 0.7-10, both at the binary level (slot names) and the
interface level (class names and functions provided). The motivation
for this was moving to a more logical naming structure and less data
replication.

The incompatible changes are:
============================
+ SpatialRings are now called SpatialPolygons
  - SpatialPolygons now consist of a list of Polygons, where each
  Polygons object has one or more (single) Polygon objects.
+ SpatialRingsDataFrame are now called SpatialPolygonsDataFrame
+ SpatialLines now consist of a list of Lines objects, where each
  Lines object has one or more (single) Line objects.
+ Polygons, Polygon, Lines and Line do not contain projection or
  bounding box information anymore.

Further changes:
method "[", plot, show and summary are now present for all classes,
and implemented in S4 style.

package maptools now depends on sp:
+ Reading sp objects from shapefiles is now done with functions
  readShapePoly and readShapeLines

Further changes:
===============
+ by default, axes are not drawn on maps. This saves space,
  and usually the numerical values shown are little informative,
(Continue reading)

Martin Maechler | 7 Sep 2005 23:05
Picon

Re: logistic regressions


This is not related really to "Geo" AFAICS, so why don't ask such a
question on R-help, instead?

>>>>> "Narendran" == Narendran Kodandapani <naren_svk <at> yahoo.com>
>>>>>     on Wed, 7 Sep 2005 08:39:14 -0700 (PDT) writes:

    Narendran> Hi all, Is it possible to conduct a logistic
    Narendran> regression in R using a range of probabilities in
    Narendran> a response variable, and subsequently will it be
    Narendran> possible to apply weights to each observation and
    Narendran> rerun the logistic regression.

    Narendran> Thanks,

    Narendran> Naren PhD Candidate, MSU, USA

    Narendran> _______________________________________________
    Narendran> R-sig-Geo mailing list
    Narendran> R-sig-Geo <at> stat.math.ethz.ch
    Narendran> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand | 9 Sep 2005 10:44
Picon

Re: [R] shapefiles manipulations ??

On Fri, 9 Sep 2005, justin bem wrote:

> cheers ,
>  I need help in shapefile manipulations. I have two shapefiles of my
> country Cameroon. The first contain 10 provinces and each province
> contains a certain number of administratives units. I dont have ESRI Arc
> view. I want to add a admistrative unit of the center province to the
> map with 10 province.
>  
> Is it possible to to take a peace of shapefile and combining it to another ?

In principle, yes. There are two R packages (maptools and shapefiles) that 
read and write shapefiles, and the newly released combination of maptools 
and the sp package should be able to handle this.

Since sp has objects defined down to the simple polygons, extracting a 
subset from one map and inserting it into another should not be too 
difficult.

The specific difficulty will be both to add the administrative unit, and 
to adjust the borders of the province that it belongs to. I suggest 
following this up on the R-sig-geo list; if you can make your shapefiles 
available (perhaps on a website), together with details of which 
administrative unit needs to be inserted, help should be forthcoming.

>  
> Thanks !
> 

--

-- 
(Continue reading)

Susumu Tanimura | 9 Sep 2005 12:34
X-Face
Picon

linewidth of polygon

Dear Roger and all members in this list,

This is request for the next version of maptools.  

A polygon map sometime has so small polygon that its fg color is
invisible because boundary color covers all inside of the polygon.

My at hoc solution is to edit output eps file with emacs, and change
the value of linewidth directory.  It is, however, troublesome job.

It is very nice if we can assign the value of linewidth when we use
plot.Map.  Or even option to remove boundary itself.

--
Susumu Tanimura
Dept. of Socio-environmental Medicine
Inst. of Tropical Medicine, Nagasaki University
TEL 095-849-7865 FAX 095-849-7867
e-mail stanimura-ngs <at> umin.ac.jp
Michael Sumner | 9 Sep 2005 12:59
Picon
Picon
Favicon

Re: linewidth of polygon

Hello,

>My at hoc solution is to edit output eps file with emacs, and change
>the value of linewidth directory.  It is, however, troublesome job.
>
>  
>
You might try this (here lwd is being passed to lower level plot functions)

pl <- read.shape("pl.shp")      

plot(pl, lwd = 0.5)

However ?par reveals
...
     'lwd' The line width, a _positive_ number, defaulting to '1'.  The
          interpretation is device-specific, and some devices do not
          implement line widths less than one.

and I certainly don't see a difference with either postscript() or pdf() 
- Windows XP. 

I don't know enough about the various devices - eps() etc. -  to know if 
this is likely to be helpful.

>It is very nice if we can assign the value of linewidth when we use
>plot.Map.  Or even option to remove boundary itself.
>  
>

(Continue reading)

Roger Bivand | 9 Sep 2005 13:26
Picon

Re: linewidth of polygon

On Fri, 9 Sep 2005, Michael Sumner wrote:

> Hello,
> 
> >My at hoc solution is to edit output eps file with emacs, and change
> >the value of linewidth directory.  It is, however, troublesome job.
> >
> >  
> >
> You might try this (here lwd is being passed to lower level plot functions)
> 
> pl <- read.shape("pl.shp")      
> 
> plot(pl, lwd = 0.5)
> 
> However ?par reveals
> ...
>      'lwd' The line width, a _positive_ number, defaulting to '1'.  The
>           interpretation is device-specific, and some devices do not
>           implement line widths less than one.
> 
> and I certainly don't see a difference with either postscript() or pdf() 
> - Windows XP. 

No, I believe 1 is the lowest you get. I think that the visual effect can 
be varied by increasing the plot area or other fiddling around when 
opening a device. As far as I know, plot.Map() does not successfully pass 
lwd= either, I'll add the ... to plot.Map calls to polygon(), which will 
permit thicker borders, will be in 0.5-2.

(Continue reading)


Gmane