mapbox / mapbox/shp-write

Mismatched .dbf and .shp record count when exporting multiple polylines

Open
#113 0 comments 1 reaction 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

When importing the generated dbf and shp from the `README.md` `zip` example into https://mapshaper.org/ it seems like the shapefile merges the two polylines into a singular polyline feature. I'm not educated on the internal workings of shapefiles (even after headscratchingly reading the 1998 published whitepaper), but that's my best understanding of what's happening.

![image](https://github.com/mapbox/shp-write/assets/6663260/b4a98608-a839-4bbb-98cf-5499e6654fb2)

I'm trying to resolve this as it prevents me from importing generated shapefiles into Autodesk Civil 3D resulting in the following error:

![image](https://github.com/mapbox/shp-write/assets/6663260/b0d15402-803c-41eb-8f2e-a7e009066410)

I do think I have a solution, will do a PR soon.

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 with the zip example in README.md and reproduce the export by importing its generated .dbf and .shp files into mapshaper.org. Compare the polyline and record counts, then confirm the exported files import into Autodesk Civil 3D without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.