You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to buffer on a FeatureCollection of MultiPolygons(this file), the current Buffer code (turf-bufferv1.0.1 used by turfv2.0.2) prepares the data by running it through combine. If the FeatureCollection's first feature's geometry type (fc.features[0].geometry.type) is "MultiPolygon", no geometry property is appended to the FeatureCollection during the combine operation. When the bufferOp later passes a stringified version of feature.geometry (which is undefined) to an instance of jsts.io.GeoJSONReader, the error Uncaught TypeError: Cannot read property 'type' of undefined is thrown. Based on my reading of the GeoJSON Feature Collection Objects spec, it is not invalid for a FeatureCollection object to not have a geometry property on the root of the object.
This bug appears to have been fixed with this committed change, so this issue can likely be tagged wont fix. I'm more interested in created this issue so that:
It can be logged as a known issue for users of turfv2.0.2 and any other turf versions relying on turf-bufferv.1.0.1.
Propose that a subset of that test file make it's way into a test fixture (likely within turf-combine)
Enquire as to when turf-buffer>v1.0.1 (the repo appears to be at v1.0.4 at this moment) will be rolled into a main version of turf.
The text was updated successfully, but these errors were encountered:
When trying to buffer on a
FeatureCollection
ofMultiPolygons
(this file), the current Buffer code (turf-buffer
v1.0.1
used byturf
v2.0.2
) prepares the data by running it throughcombine
. If theFeatureCollection
's first feature's geometry type (fc.features[0].geometry.type
) is"MultiPolygon"
, nogeometry
property is appended to theFeatureCollection
during thecombine
operation. When thebufferOp
later passes a stringified version offeature.geometry
(which isundefined
) to an instance ofjsts.io.GeoJSONReader
, the errorUncaught TypeError: Cannot read property 'type' of undefined
is thrown. Based on my reading of the GeoJSON Feature Collection Objects spec, it is not invalid for aFeatureCollection
object to not have ageometry
property on the root of the object.This bug appears to have been fixed with this committed change, so this issue can likely be tagged
wont fix
. I'm more interested in created this issue so that:turf
v2.0.2
and any otherturf
versions relying onturf-buffer
v.1.0.1
.turf-combine
)turf-buffer
>v1.0.1
(the repo appears to be atv1.0.4
at this moment) will be rolled into a main version ofturf
.The text was updated successfully, but these errors were encountered: