[R-sig-Geo] Distribute points along lines

Kamran Safi ksafi at orn.mpg.de
Fri Jul 3 15:14:53 CEST 2009


Hi,

I think you can use spsample() together with type=random and n=your 
sample size.

Kami



Agustin Lobo wrote:
> Hi!
>
> Is there any way to distribute a set of random or regularly-spaced
> points along a line imported from a shape file into a
> SpatialLinesDataFrame? I've been searching, but could not find it.
> Should I use coordinates() to get the vertex, then calculate the a&b
> parameters for each line and distribute the points? Or is it there
> something already done?
>
> Thanks,
>
> Agus
>
> Dr. Agustin Lobo
> Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
> LLuis Sole Sabaris s/n
> 08028 Barcelona
> Spain
> Tel. 34 934095410
> Fax. 34 934110012
> email: Agustin.Lobo at ija.csic.es
> http://www.ija.csic.es/gt/obster
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>
-- 

Kamran Safi

Max Planck Institute for Ornithology
Vogelwarte Radolfzell
Schlossallee 2
78315 Radolfzell
Germany

Phone +49-7732-150173
Fax +49-7732-150190

and

Institute of Zoology
Zoological Society of London
Regent's Park
NW1 4RY London
United Kingdom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3275 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20090703/92ebb318/attachment.bin>


More information about the R-sig-Geo mailing list