Issue with naming of Poly Line
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 321
- Forks
- 195
- PR merge metrics
- No merged PRs in 30d
Description
[
geojson.point(gj),
geojson.line(gj),
geojson.polygon(gj),
geojson.multipolygon(gj),
geojson.multiline(gj),
].forEach(function (l) {
if (l.geometries.length && l.geometries[0].length) {
write(
// field definitions
l.properties,
// geometry type
l.type,
// geometries
l.geometries,
function (err, files) {
var fileName =
options && options.types && options.types[l.type.toLowerCase()]
? options.types[l.type.toLowerCase()]
: l.type;
zipTarget.file(fileName + ".shp", files.shp.buffer, { binary: true });
zipTarget.file(fileName + ".shx", files.shx.buffer, { binary: true });
zipTarget.file(fileName + ".dbf", files.dbf.buffer, { binary: true });
zipTarget.file(fileName + ".prj", prj);
}
);
}
});
When a geojson with linestring is being added, the shp type returned is polyline. But there is no option to edit the polyline name under shpwritedownloadoptions/zip optiosn
export interface DownloadOptions {
folder?: string;
filename?: string;
prj?: string;
types?: {
point?: string;
polygon?: string;
line?: string;
multipolygon?: string;
multiline?: string;
};
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the download code shown in the issue and the DownloadOptions interface, tracing how l.type is converted into the output filename. Add an option for the line geometry's returned polyline name, then verify that the corresponding .shp, .shx, .dbf, and .prj files use that name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100