Turfjs / Turfjs/turf

pointOnFeature imports @turf/center

Open
#2,408 2 comments 0 reactions 1 assignee View on GitHub

@rowanwins is already working on this.

Since Apr 30, 2023.

question
Dominant language
TypeScript
Stars
10.5k
Forks
1k
Avg merge
1h 11m
Merged PRs (30d)
4

Description

I don't know if this is a bug or not, but in the pointOnFeature code, the center module is imported even though it is named centroid. Wouldn't it be correct that the centroid module should be loaded here?

// https://github.com/Turfjs/turf/blob/v6.5.0/packages/turf-point-on-feature/index.js#L2
import explode from "@turf/explode";
import centroid from "@turf/center"; // Should here be @turf/centroid?
import nearestPoint from "@turf/nearest-point";

Sorry if that is what you intended.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.