Transect spDS Models Coords

10 views
Skip to first unread message

Dave Pearce

unread,
Mar 13, 2025, 6:59:49 PMMar 13
to spOccupancy and spAbundance users
Hi all,

I'm wondering how I should include the coordinates for my transects since spDS models require the coordinates be a site x 2 matrix, but my transects are lines.

For reference my transects are in a shape file which I can manipulate and has starting and ending coordinates along with geometry for line strings. Below are an example of the transects.

Suggestions?
Thanks,
Dave 

Simple feature collection
Geometry type: LINESTRING
Dimension:     XY
Bounding box:  xmin: 578181.1 ymin: 3058157 xmax: 579197.6 ymax: 3063151
Projected CRS: NAD83 / UTM zone 14N
T_ID  OriginX OriginY     DestX   DestY       geometry
1  579197.6 3060216 579178.5 3063151   LINESTRING (579197.6 306021...
2  578961.0 3058163 578928.8 3063135   LINESTRING (578961 3058163,...
3  578711.1 3058161 578678.8 3063146   LINESTRING (578711.1 305816...
4  578461.1 3058159 578429.0 3063145   LINESTRING (578461.1 305815...
5  578211.2 3058157 578181.1 3062840   LINESTRING (578211.2 305815...

gilles colling

unread,
Mar 13, 2025, 7:29:50 PMMar 13
to Dave Pearce, spocc-spa...@googlegroups.com
Hi Dave,

I’m not sure if this is helpful, but since you need a single coordinate, you could use the midpoint of the line. You can calculate it manually or use st_centroid() from the sf package.

Cheers,
Gilles

On 13.03.2025, at 23:59, 'Dave Pearce' via spOccupancy and spAbundance users <spocc-spa...@googlegroups.com> wrote:

Hi all,
--
You received this message because you are subscribed to the Google Groups "spOccupancy and spAbundance users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spocc-spabund-u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/spocc-spabund-users/8d9955b0-7279-48cf-8aea-abb638132f06n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages