Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

point_begin/point_end should be called around xy for each Point in a MultiPoint #184

Open
michaelkirk opened this issue Dec 30, 2023 · 1 comment

Comments

@michaelkirk
Copy link
Member

Extracted from #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 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(...)
@kylebarron
Copy link
Member

I don't think this is possible without a breaking change because point_begin does not have a tagged argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants