[R-sig-Geo] Creating points along polylines

MacQueen, Don macqueen1 at llnl.gov
Fri Feb 10 17:32:21 CET 2017


sp::spsample can create equally spaced points along lines

I don't know if there's a function that will directly find the nearest points between two layers, but if necessary you can program it yourself, possibly starting with spatstat::crossdist to calculate the distances.

More generally, I would look into the rgeos and spatstat packages. And visit the CRAN spatial task view; that might lead you to additional packages.

-Don

-- 
Don MacQueen

Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062


On 2/10/17, 5:21 AM, "R-sig-Geo on behalf of Tristan Bourgeois" <r-sig-geo-bounces at r-project.org on behalf of tristan.bourgeois at gmail.com> wrote:

    Dear all,
    
    I'm looking for a way to create points along polylines in 2 different cases
    :
    
    - First case :
    
    I want to create points along  2 polyline layers (hydrographic network)
    with a step between each point of *x *meters (as the QGIs pluggin "Locate
    points along lines" is able to do)
    
    Then, for these two "Points layers" I want to join the created points from
    one layer to the nearest points of the other one (as the  QGIs pluggin
    "MMGIS / HubDistance" does so)
    
    
    - Second case :
    
    I have a polyline layer (hydrographic network) which is sectionned into
    several parts. I want to create points at each sections' extremities and
    get teh coordinates of each of these points.
    
    Hope my explanations are enough clear ?
    
    Thanks in advance and have a sweet weekend !
    
    Cheers.
    
    
    
    -- 
    Tristan Bourgeois
    
    	[[alternative HTML version deleted]]
    
    _______________________________________________
    R-sig-Geo mailing list
    R-sig-Geo at r-project.org
    https://stat.ethz.ch/mailman/listinfo/r-sig-geo
    



More information about the R-sig-Geo mailing list