[R-sig-Geo] Shapefile Created with R

Michael Sumner mdsumner at gmail.com
Mon Sep 20 02:39:04 CEST 2010


What are you selecting them in? Do you need them separated in R, or in
some GIS? In software I use (Manifold) I would just use the Decompose
operation, but if you want to do this in R you'll need to regenerate
the SpatialLines object by working through the lists of coordinate
matrices that it contains.

It might be worth writing a function to do this for maptools, pretty
easy for lines as long as you don't need to check for actual
"touching" intersections.

Cheers, Mike.




On Mon, Sep 20, 2010 at 10:17 AM, kapo coulibaly <kmcoulib at gmail.com> wrote:
> I created contour a shape file using roughly the following code:
> grd.contour<-contourLines(list.x,list.y,grd.mat,levels=nlevel)
> grd.contour<-ContourLines2SLDF(grd.contour)
> shapef<-tclvalue(tkgetSaveFile(filetypes="{{Shape Files} {.shp}} {{All
> files} *}"))
> writeLinesShape(grd.contour,shapef)
> It works perfectly. The only problem is that all contours on the map with
> the same value are attached to the same record. Basically if a select a
> contour with elevation two, all contours on the map are selected even if
> they are not spatially connected. Is there a way to create a contour shapes
> with independant records even when values are equal.
> Any help is greatly apprecciated.
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



-- 
Michael Sumner
Institute for Marine and Antarctic Studies, University of Tasmania
Hobart, Australia
e-mail: mdsumner at gmail.com



More information about the R-sig-Geo mailing list