-
Notifications
You must be signed in to change notification settings - Fork 196
Description
If you pass .zip() an array of multilinestring features, the lines are consolidated into a single feature.
For the features below, I would expect a shapefile with two independently selectable features. However, they are unified into a single feature. I haven't seen this same issue when working with points
const features = [
{type:"Feature",geometry:{type:"MultiLineString",coordinates:[[[-118.429159,33.997878],[-118.429407,33.998196]],[[-118.429797,33.998696],[-118.429904,33.998833]],[[-118.428464,33.996969],[-118.428366,33.99686],[-118.42825,33.99675],[-118.428044,33.99658]],[[-118.428464,33.996969],[-118.428583,33.997131],[-118.428833,33.997472]]]}},
{type:"Feature",geometry:{type:"MultiLineString",coordinates:[[[-118.403108,34.01443],[-118.403007,34.014388]]]}}
]
const dataforZip = {
type: "FeatureCollection",
features: features,
options
}
const zipData = await shpwrite.zip(
dataforZip,
options
);
The output geometry from the above is:
{"type":"MultiLineString","coordinates":[[[-118.429159,33.997878],[-118.42940700000001,33.998196]],[[-118.429797,33.99869600000001],[-118.429904,33.998833]],[[-118.42846399999999,33.996969],[-118.42836599999998,33.99686],[-118.42825000000002,33.996750000000006],[-118.42804400000001,33.99658]],[[-118.42846399999999,33.996969],[-118.428583,33.997131],[-118.428833,33.997472]],[[-118.40310800000002,34.01443],[-118.403007,34.014388]]]}