Spatial line start and end point in R
问题 I am attempting to use the sp package to access the start and end points of a linestring, similar to what ST_StartPoint and ST_EndPoint would produce using psql . No matter how I try to access the line, I get errors or NULL value: > onetrip@lines[[1]][1] Error in onetrip@lines[[1]][1] : object of type 'S4' is not subsettable > onetrip@lines@Lines@coords Error: trying to get slot "Lines" from an object of a basic class ("list") with no slots > onetrip@lines$Lines NULL The only solution that