An S2Polygon is an S2Region object that represents a polygon. A polygon is defined by zero or more loops; recall that the interior of a loop is defined to be its left-hand side (see S2Loop). There are two different conventions for creating an S2Polygon:
Build the S2ShapeIndex only when it is first needed. This can save significant amounts of memory and time when geometry is constructed but never queried, for example when converting from one format to another.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
2005 Google Inc. All Rights Reserved.
An S2Polygon is an S2Region object that represents a polygon.