mapbox / mapbox/shp-write

[FEATURE] Specify attribute type

Open
#130 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
321
Forks
195
PR merge metrics
No merged PRs in 30d

Description

By default, dbf library is taking any number attributes and turning them into 3 decimal point floats.
For things like an id or count column, this doesn't make sense.
Would be useful to add an option for the user to specify the type they want associated with certain columns (in case you have one that *happens* to be all ints, and you also want to define it as int only)

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

No files, tests, or entry points are named. Start by locating the dbf attribute conversion logic and the public options passed to it, then inspect existing tests for numeric fields. Done means callers can specify a type for selected columns while existing automatic conversion remains supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.