Skip to content

Working with segments - vignette #66

Closed

Description

@temospena

Activity

  1. Robinlovelace commented on Jun 24, 2025

    @Robinlovelace
    Member

    Agreed, all segments the same colour, right? 🧐

  2. temospena commented on Jun 16, 2026

    @temospena
    CollaboratorAuthor

    the plot code at L173 was fine — the real bug was in elevation_add(). It used m[, 3] (positional) to split the coordinate matrix by feature, but sf::st_coordinates() on a cast-segmentised sf returns columns X, Y, L1 — so the positional index 3 is L1, which starts at 1 for every feature. All segments end up merged into one geometry, slope_xyz gets one group → one scalar → identical slope for all rows.

    Fix: m[, "L1"] — uses the named column, which correctly holds the feature row index.

  3. added 3 commits that reference this issue on Jun 16, 2026
  4. linked a pull request that will close this issue66 working with segments vignette #76on Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions