[R-sig-Geo] .shp

Roger Bivand Roger.Bivand at nhh.no
Thu Apr 3 21:03:42 CEST 2008


On Thu, 3 Apr 2008, Renata Grigorio wrote:

> I'm trying to do an application thatread a file.shp in a server by 
> Rserve, but I didn´t. Can you give me asugestion to do this?

The answer is no. The R lists have a posting guide, which says that if you 
do not give a simple, working example of your problem, you should not 
expect an answer. If you send a script with a couple of commands 
illustrating your problem, someone will try to help.

For the time being, forget Rserve, try to make the script work at the 
command line. There may not be anyone at all who uses Rserve for spatial 
data - all such interfaces, like (D)COM, have trouble with rich objects. 
Unless you have reflected the R class used to read the shapefile into your 
target language, you have no easy access to its contents, and the same 
applies in the other direction too. As you know, you read shapefiles best 
in R by:

library(rgdal)
shp <- readOGR(dsn="...", layer="...")

where shp is a Spatial*DataFrame defined in the sp package. But that is on 
the R side of the interface, not on the foreign language side. You need to 
say what you actually need to do, and to think through what data needs to 
be on which side. You could just as will use GDAL/OGR bindings in your 
foreign language and extract the data of interest there.

A long no, but there you go.

Roger

>
> Thank you
>
>
>
>
> para armazenamento!
>
> 	[[alternative HTML version deleted]]
>
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no


More information about the R-sig-Geo mailing list