|
|
|
|
|
- Properties specific to PolygonGeo variables
- Functions that use the PolygonGeo type
PolygonGeo (Variable type) In french: PolygoneGéo
The PolygonGeo type is used to define all the advanced characteristics of a geographic polygon. You can define and change the characteristics of this geographic polygon using different WLanguage properties. Characteristics of a geographic polygon: A geographic polygon is a polygon mapped on an spherical representation of the earth. A geographic polygon consists of: - a boundary, which is a simple, closed geographic linestring.
- one or more optional holes, which are also simple, closed geographic linestrings.
Holes can't be nested, nor can they intersect with each other or with boundaries.
To be considered valid, a polygon must meet certain criteria: - Its boundary is a simple and closed linestring, i.e., it does not intersect itself and its last and first points are equal.
- The points of the boundary must be ordered clockwise.
- Holes must be oriented counterclockwise.
- Holes are also simple and closed.
- The holes of a polygon cannot cross. They can intersect, but cannot have points of their interiors in common. Therefore, intersections (if any) occur at a tangent point. This also applies to intersections between the boundary and holes of a polygon.
- A polygon cannot have spikes or lines without an interior.
- The interior of a polygon is a connected set of points. It should always be possible to go from one point of the interior of the polygon to another without crossing the boundary. This means that a hole should never split the interior of a polygon into more parts.
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
myGeoLinestring is LinestringGeo
myGeoLinestring.AddPoint(2.681548, 43.802043)
myGeoLinestring.AddPoint(2.816297, 43.725179)
myGeoLinestring.AddPoint(2.842733, 43.817899)
myGeoLinestring.AddPoint(2.644979, 43.837466)
myGeoLinestring.AddPoint(2.681548, 43.802043)
Trace("myGeoLinestring: " + GeometrySerializeWKT(myGeoLinestring))
myGeoPolygon is PolygonGeo
myGeoPolygon.Outline = myGeoPolygon
myGeoLinestring.Point.DeleteAll()
myGeoLinestring.AddPoint(2.755159351, 43.793494741)
myGeoLinestring.AddPoint(2.763978715, 43.820568136)
myGeoLinestring.AddPoint(2.783053152, 43.769702969)
myGeoLinestring.AddPoint(2.755159351, 43.793494741)
myGeoPolygon.Hole.Add(myGeoLinestring)
Trace("myGeoPolygon: " + GeometrySerializeWKT(myGeoPolygon))
Trace("GeometryIsValid: " + GeometryIsValid(myGeoPolygon))
Properties Properties specific to PolygonGeo variables The following properties can be used to handle a geographic polygon: | | | Property name | Type used | Effect |
---|
Outline | LinestringGeo | Exterior ring of the polygon. This outline is a simple, closed linestring defined in geographic coordinates. | Hole | Array of LinestringGeo | Simple, closed linestrings (defined in geographic coordinates) inside the exterior ring of the polygon. | Type | Integer constant | Type of the current geometry. For a geographic polygon, corresponds to the gtPolygonGeo constant. Remark: Until version 2024 Update 2, this constant was named stPolygonGeo.This property is available in read-only. |
Remarks Functions that use the PolygonGeo type The following functions use PolygonGeo variables:
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|