uber / uber/h3

Add edgeToVertexes function

Open
#1,071 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
6.5k
Forks
627
Avg merge
3d 21h
Merged PRs (30d)
6

Description

It would be handy to have a function that provides the start and end vertices of an edge. I suppose such a function could work for both directed and (future) undirected edges. For the current directed edge mode, I think we would want the output vertices to be ordered according to the right hand rule:

Image

The API might look something like these:

H3Error edgeToVertexes(H3Index edge, H3Index *v1, H3Index *v2);
H3Error edgeToVertexes(H3Index edge, H3Index *vertexes);

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files or tests. Start by locating the existing directed-edge and vertex APIs, then compare their endpoint ordering with the right-hand-rule diagram. Resolve which proposed signature fits the public API and verify that both endpoints are returned in the specified order with appropriate error handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.