[R-sig-Geo] Re: [R] writing polygons/segments to shapefiles(.sh p)o r other A rcGIS compatible file

Roger Bivand Roger.Bivand at nhh.no
Tue Mar 2 15:42:39 CET 2004

On Mon, 1 Mar 2004, Nicholas Lewin-Koh wrote:

> Hi again,
> I took a look at maptools code and shapelib last night. It should not be
> hard to modify to create and write 
> shapefiles. I think I never developed it in maptools because I never
> really thought of R as
> being suitable for editing maps. I thought R would be very suitable for
> designing cartographic dispays for 
> statistical purposes. 

I think you are correct in principle, but I can see situations where 
people want to export subsets of say polygons, lines, or points.

> That said, If I can get it working in an evening or two I will submit it
> to Roger for inclusion in maptools.

That's very generous - if you can make a first attempt at making your code 
work, that will give us a start. The places where my head ached were 
whether we need to check shapes for compliance before writing them to file 
- but maybe shapelib does that - I don't think so? Should we just let 
people write anyway?

> Do any of the other geo interfaces in development write map formats? Eg
> the Rgdal interface?

It should but doesn't - you can (I think) overwrite bands, but this is 
something that needs fixing - for those interested, rgdal is on 
sourceforge, so checking out under cvs is possible, so that improvements 
and additions can be brought in under control.


> Nicholas
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://www.stat.math.ethz.ch/mailman/listinfo/r-sig-geo

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

More information about the R-sig-Geo mailing list