mapbox / mapbox/geojson.io

Add "Copy Geometry" to feature editor

Open Beginner friendly
#984 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.3k
Forks
640
PR merge metrics
No merged PRs in 30d

Description

I have a workflow where I have GeoJSON data with lots of properties, but don't want to bring them all into GeoJSON.io for editing. Pasting a GeoJSON geometry into geojson.io works, but the geojson.io always outputs a FeatureCollection. I need just the geometry from a feature so I can paste it in the appropriate place in my data workflow.

Right now I am manually selecting the geometry in the JSON view of the Feature Editor, copying, and pasting elsewhere. Ideally this panel could have a "Copy Geometry" button below the existing "Copy" button, or somewhere nearby which would give me just the geometry and avoid manual selection of JSON in the code editor which is prone to human error.

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

Start at the Feature Editor panel and inspect how the existing "Copy" button handles the JSON view. Add a nearby "Copy Geometry" action that copies only the selected feature's geometry, then verify that the copied output excludes other properties and the surrounding FeatureCollection.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.