Parallel transects across a polygon
Survey lines at a set spacing and bearing across a polygon, clipped to it, with a random start from a seed, each line's length and the total, and a zigzag route joining them if asked.
Experimental: not yet fully verified. How results are checked
7 transects, 2,390.972 m in all.
| Transect | Length | Start latitude | Start longitude | End latitude | End longitude |
|---|---|---|---|---|---|
| 1 | 341.561 m | 40.0029622 deg | -105.0000000 deg | 40.0029622 deg | -104.9960000 deg |
| 2 | 341.563 m | 40.0025119 deg | -105.0000000 deg | 40.0025119 deg | -104.9960000 deg |
| 3 | 341.565 m | 40.0020616 deg | -105.0000000 deg | 40.0020616 deg | -104.9960000 deg |
| 4 | 341.567 m | 40.0016113 deg | -105.0000000 deg | 40.0016113 deg | -104.9960000 deg |
| 5 | 341.570 m | 40.0011610 deg | -105.0000000 deg | 40.0011610 deg | -104.9960000 deg |
| 6 | 341.572 m | 40.0007107 deg | -105.0000000 deg | 40.0007107 deg | -104.9960000 deg |
| 7 | 341.574 m | 40.0002604 deg | -105.0000000 deg | 40.0002604 deg | -104.9960000 deg |
| Line | Latitude | Longitude |
|---|---|---|
| 1 | 40.0029622 deg | -105.0000000 deg |
| 1 | 40.0029622 deg | -104.9960000 deg |
| 2 | 40.0025119 deg | -105.0000000 deg |
| 2 | 40.0025119 deg | -104.9960000 deg |
| 3 | 40.0020616 deg | -105.0000000 deg |
| 3 | 40.0020616 deg | -104.9960000 deg |
| 4 | 40.0016113 deg | -105.0000000 deg |
| 4 | 40.0016113 deg | -104.9960000 deg |
| 5 | 40.0011610 deg | -105.0000000 deg |
| 5 | 40.0011610 deg | -104.9960000 deg |
| 6 | 40.0007107 deg | -105.0000000 deg |
| 6 | 40.0007107 deg | -104.9960000 deg |
| 7 | 40.0002604 deg | -105.0000000 deg |
| 7 | 40.0002604 deg | -104.9960000 deg |
- Total length
- Start offset
- Seed
- Plane
Provenance
- Computed by
- geometry.sampling.transects 1.0.0, core 0.1.0
- Model
- On the UTM plane: lines at the grid bearing (true bearing less the meridian convergence at the polygon's center), spaced by the ground spacing times the zone's point scale there, the first at a random fraction of the spacing (one draw) from the polygon's edge on the left of the lines' direction; each line clipped to the polygon by its crossings with every ring; lengths are geodesic; a zigzag joins each part's end to the next part's start, reversing every other line (Buckland et al. 2015)
- Accuracy
- Lines are the spacing apart on the ground at the polygon's center, to within the change in UTM scale across it; lengths are geodesic to a millimeter
- Notes
- 1 shown with the answer
- Cites
- Buckland, S. T., Rexstad, E. A., Marques, T. A., and Oedekoven, C. S., Springer, Distance Sampling: Methods and Applications; Blackman, D., and Vigna, S., ACM Transactions on Mathematical Software, Scrambled linear pseudorandom number generators
Something look off?
How we got thisFormula, worked example, sources, and proof
Model: On the UTM plane: lines at the grid bearing (true bearing less the meridian convergence at the polygon's center), spaced by the ground spacing times the zone's point scale there, the first at a random fraction of the spacing (one draw) from the polygon's edge on the left of the lines' direction; each line clipped to the polygon by its crossings with every ring; lengths are geodesic; a zigzag joins each part's end to the next part's start, reversing every other line (Buckland et al. 2015)
Show your work
Lines
parallel at the grid bearing, the spacing apart, from a random start50 m apart at 90° true, start 4.193 m in= 7 parts on 7 linesTransects
lines that cross the polygon2,390.972 m in all= 7
The same steps an agent gets from the MCP server with explain: true.
Accuracy: Lines are the spacing apart on the ground at the polygon's center, to within the change in UTM scale across it; lengths are geodesic to a millimeter
When to use this: Use this to plan line transects for a wildlife count, a vegetation survey, or a walk-over search: lines at an even spacing across the site with a random start, so the design is a probability sample. Choose the zigzag to get one continuous route.
Limitations: Lines are straight on the UTM plane, which over a few kilometers differs from a geodesic by far less than a field crew can walk. A line the polygon cuts in two (around a hole or a bay) becomes two parts. At most 10,000 transects.
Worked example: East-west lines 50 m apart across a field, seed 42. Source: A 340 m × 333 m field.
You enter
- Bearing
- 90 deg
- Polygon
- 40, -105 40, -104.996 40.003, -104.996 40.003, -105
- Seed
- 42
- Spacing
- 50 m
You get
- Transects
- 7
- Total length
- 2,390.972 m
- Start offset
- 4.193 m
- Seed
- 42
- Plane
- UTM zone 13N (WGS 84)
Review: Not yet independently reviewed by a GIS professional.
Last verified: 2026-10-20, when a maintainer last confirmed this tool's sources at the issuer. See the sources ledger.
Status: version 1.0.0, core 0.1.0. See this tool in the verification report.
Checked against: 21 golden test vectors (download the test vectors, each with its source and tolerance). See how results are checked and every source.
Sources
- Distance Sampling: Methods and Applications, Buckland, S. T., Rexstad, E. A., Marques, T. A., and Oedekoven, C. S., Springer, 1st edition. Survey design: systematic parallel line transects with a random start.
- Scrambled linear pseudorandom number generators, Blackman, D., and Vigna, S., ACM Transactions on Mathematical Software, Vol. 47, No. 4. xoshiro256**, seeded by splitmix64 as the authors suggest; doubles from the top 53 bits. Read free.
Experimental means this tool has not yet met the stable bar: at least 20 golden vectors, differential tests, and an independent worked example.