Does multipoint,multiPolyline,multiPolygon support? #314
Replies: 3 comments 3 replies
-
An |
Beta Was this translation helpful? Give feedback.
-
S2Shape can be all of those because it can contain multiple chains of a particular dimension, that gives you multipoint and multipolyline, and then S2Shape can represent both simple and complex (disjoint interior area) polygons. Whether you consider a 2D S2hape to be one polygon or a group of multiple polygons is a matter of interpretation. |
Beta Was this translation helpful? Give feedback.
-
A Polygon has one shell, or outermost ring. A MultiPolygon has multiple
shells. But on the sphere, there isn't really a good sense of "outermost".
Consider a polygon formed by a ring at 10 degrees north and a ring at 10
degrees south, oriented so that the polygon contains the 20 degree tall
band of latitude centered on the equator. Unlike 2D geometry where you need
to know which ring is the outermost, it doesn't matter on the sphere --
the +10 ring can be the shell with a hole at -10 latitude, or vice-versa.
Similarly, S2 operations aren't specialized on the dimension of the
geometries, so there are no specific types for MultiLine and MultiPoint.
But you can create collections, either as a simple vector of S2Shape*, or
as an S2ShapeIndex if you want to operate on the collection as a whole.
This indexed collection type is another great strength of S2 over libraries
like GEOS, which only provide much simpler indexes of envelopes. This makes
a large difference in performance when you have to work with complex lines
or polygons, especially.
Kind regards,
Eric
…On Thu, Apr 27, 2023 at 7:33 AM smcallis ***@***.***> wrote:
S2Shape can be all of those because it can contain multiple chains of a
particular dimension, that gives you multipoint and multipolyline, and then
S2Shape can represent both simple and complex (disjoint interior area)
polygons. Whether you consider a 2D S2hape to be one polygon or a group of
multiple polygons is a matter of interpretation.
—
Reply to this email directly, view it on GitHub
<#314 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4DAANW4G3MFHTLAY43BNDXDJ7T7ANCNFSM6AAAAAAXNOQHLA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I did not find support for multipoint, multiPolyline, multiPolygon, does the community have any considerations?
Beta Was this translation helpful? Give feedback.
All reactions