When processing MultiPoints, many of the formats that implement GeometryProcessor do not call point_begin/point_end for each point in a multipoint, and instead call only xy. To be consistent with MultiLineString and MultiPolygon, we should surround each child geometry with it's corresponding begin/ends.
In truth, I don't know of a format yet that requires these events, so I expect most implementations will be a no-op, but I think making the usage consistent across Multi{Point,LineString,Polygon} makes things easier to understand.
processor.begin_multipoint(...)
for point in multipoint {
+ processor.begin_point(...)
processor.xy(...)
+ processor.end_point(...)
}
processor.end_multipoint(...)
Extracted from https://github.com/georust/geozero/pull/183
When processing MultiPoints, many of the formats that implement GeometryProcessor do not call
point_begin
/point_end
for each point in a multipoint, and instead call onlyxy
. To be consistent with MultiLineString and MultiPolygon, we should surround each child geometry with it's corresponding begin/ends.In truth, I don't know of a format yet that requires these events, so I expect most implementations will be a no-op, but I think making the usage consistent across
Multi{Point,LineString,Polygon}
makes things easier to understand.