[R-sig-Geo] Converting contours to shapefiles and export them

Roger Bivand Roger.Bivand at nhh.no
Fri Sep 15 20:40:44 CEST 2006


On Fri, 15 Sep 2006 ekkehardt.altpeter at bag.admin.ch wrote:

> Dear List members,
> 
> I am running R 2.3.1 on a Windows 2000 machine. I have loaded the
> following packages: foreign, sp, maptools. I could load package
> shapefile as well, but this leads to conflicts with the packages sp and
> maptools.
> 
> I have the following question
> 
> I estimated by means of kde2d a 2-dimensional density based on a
> sample of points. I passed this estimation to contour. I would like to 
> export the result to a shapefile with lines. I have loaded foreign, sp 
> and maptools. Can you give me a hint?

?contourLines2SLDF
?writeLinesShape

gets you there in two steps. Have a look at their examples.
> 
> The result of contour is a list which has a vector for x and y and a
> 
> matrix for z mit dimension dim(x) X dim (y).
> 
>  
> 
> Thank's a lot for your feedbacks.
> 
>  
> 
> Ekkehardt Altpeter
> 
>  
> 
>  
> 
> _______________________________________________________
> 
> Bundesamt für Gesundheit
> 
> Direktionsbereich Öffentliche Gesundheit
> 
> Sektion Infektionskrankheiten
> 
> Dr. med. Ekkehardt Altpeter
> 
> wissenschaftlicher Mitarbeiter
> 
>  
> 
> Postadresse: Postfach, CH-3003 Bern
> 
> Büro: Schwarztorstr. 96
> 
> Telefon: +41 (0)31 324 98 34 FAX +41 (0)31 323 87 95
> 
> E-Mail: ekkehardt.altpeter at bag.admin.ch
> 
> Internet: www.bag.admin.ch 
> 
>  
> 
> 
> 	[[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