Skip to content

support point input#43

Merged
isaacbrodsky merged 3 commits intomasterfrom
point-type
Mar 11, 2026
Merged

support point input#43
isaacbrodsky merged 3 commits intomasterfrom
point-type

Conversation

@isaacbrodsky
Copy link
Copy Markdown
Collaborator

@isaacbrodsky isaacbrodsky commented Mar 1, 2026

Fixes #12
Note: While looking at this I noticed the options may not get passed down correctly for FeatureCollections.
LineStrings could be a possible future improvement.

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 100.0%. remained the same
when pulling b54c8c8 on point-type
into 7131b14 on master.

Copy link
Copy Markdown

@ajfriend ajfriend left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Copy Markdown
Collaborator

@nrabinowitz nrabinowitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a small perf note. If there's a reason to use flatten it would be good to have a test to demonstrate.

Comment on lines +132 to +134
return flatten(
geometry.coordinates.map(point => [h3.latLngToCell(point[1], point[0], resolution)])
);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason to flatten this, rather than just doing

Suggested change
return flatten(
geometry.coordinates.map(point => [h3.latLngToCell(point[1], point[0], resolution)])
);
return geometry.coordinates.map(point => h3.latLngToCell(point[1], point[0], resolution));

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used flatten because it also deduplicates values, it is true there are unnecessary copies in that function

@isaacbrodsky isaacbrodsky merged commit 3d49d26 into master Mar 11, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Point feature type

4 participants