The following functions provide various routines for adding, removing, and updating Polygons in Google Earth. More...
Functions | |
int | GE_GetPolygonCount () |
Returns the current number of Polygons added to the Google Earth map by the GE SDK. | |
BOOL | GE_RefreshPolygon (STRING polygon_name) |
Forces an update to the Polygon with the given polygon name. | |
BOOL | GE_AddPolygon (STRING polygon_name, STRING outer_boundary_points, STRING color) |
Adds a new Polygon with the given outer boundary to Google Earth. | |
BOOL | GE_DeletePolygon (STRING polygon_name) |
Removes the Polygon with the given name from the Google Earth map. | |
BOOL | GE_PolygonExists (STRING polygon_name, int *index) |
Determines if a Polygon with the given name has been added to Google Earth by the GE SDK. | |
BOOL | GE_PolygonVisible (STRING polygon_name) |
Determines if the Polygon with the given name is currently visible in Google Earth. | |
BOOL | GE_ShowPolygon (STRING polygon_name) |
Sets the Polygon with the given name to visible. | |
BOOL | GE_HidePolygon (STRING polygon_name) |
Sets the Polygon with the given name to invisible. | |
STRING | GE_GetPolygonName (int index) |
Retrieves the name of the Polygon at the given index. | |
BOOL | GE_SetPolygonName (STRING polygon_name, STRING new_name) |
Changes the name of a Polygon. | |
STRING | GE_GetPolygonSnippet (STRING polygon_name) |
Retrieves a Polygon's snippet. | |
BOOL | GE_SetPolygonSnippet (STRING polygon_name, STRING snippet) |
Changes the snippet of the given Polygon. | |
int | GE_GetPolygonSnippetMaxLines (STRING polygon_name) |
Retrieves the given Polygon's snippet maxLines attribute value. | |
BOOL | GE_SetPolygonSnippetMaxLines (STRING polygon_name, int max_lines) |
Changes the snippet maxLines attribute value for the given Polygon. | |
STRING | GE_GetPolygonKML (STRING polygon_name) |
Retrieves the KML content that makes up the given Polygon. | |
STRING | GE_GetPolygonDescription (STRING polygon_name) |
Retrieves the description of the given Polygon. | |
BOOL | GE_SetPolygonDescription (STRING polygon_name, STRING description) |
Sets the description of the given Polygon. | |
BOOL | GE_GetPolygonExtrude (STRING polygon_name) |
Retrieves the given Polygon's extrude state. | |
BOOL | GE_SetPolygonExtrude (STRING polygon_name, BOOL extrude) |
Sets the given Polygon's extrude state. | |
BOOL | GE_GetPolygonTessellate (STRING polygon_name) |
Retrieves the given Polygon tessellate state. | |
BOOL | GE_SetPolygonTessellate (STRING polygon_name, BOOL tessellate) |
Sets the given Polygon tessellate state. | |
int | GE_GetPolygonAltMode (STRING polygon_name) |
Retrieves the altitude mode of the given Polygon. | |
BOOL | GE_SetPolygonAltMode (STRING polygon_name, int alt_mode) |
Sets the altitude mode of the given Polygon. | |
STRING | GE_GetPolygonColor (STRING polygon_name) |
Retrieves the given Polygon's current boundary color. | |
BOOL | GE_SetPolygonColor (STRING polygon_name, STRING color) |
Sets the given Polygon's boundary color. | |
BOOL | GE_GetPolygonOutline (STRING polygon_name) |
Retrieves the given Polygon's outline state. | |
BOOL | GE_SetPolygonOutline (STRING polygon_name, BOOL outline) |
Sets the given Polygon's outline state. | |
STRING | GE_GetPolygonOutlineColor (STRING polygon_name) |
Retrieves the given Polygon's current outline color. | |
BOOL | GE_SetPolygonOutlineColor (STRING polygon_name, STRING color) |
Sets the given Polygon's outline color. | |
float | GE_GetPolygonOutlineWidth (STRING polygon_name) |
Retrieves the width of the given Polygon's outline. | |
BOOL | GE_SetPolygonOutlineWidth (STRING polygon_name, float width) |
Sets the given Polygon's outline width. | |
BOOL | GE_GetPolygonFill (STRING polygon_name) |
Retrieves the given Polygon's fill state. | |
BOOL | GE_SetPolygonFill (STRING polygon_name, BOOL fill) |
Sets the given Polygon's fill state. | |
int | GE_GetPolygonOuterBoundaryPointCount (STRING polygon_name) |
Retrieves the total count of geographical points for the given Polygon's outer boundary. | |
STRING | GE_GetPolygonOuterBoundary (STRING polygon_name) |
Retrieves a string of all coordinate points for the given Polygon's outer boundary. | |
STRING | GE_GetPolygonOuterBoundaryPointStr (STRING polygon_name, int point_index) |
Retrieves the outer boundary point at the specified index for the given Polygon. | |
double * | GE_GetPolygonOuterBoundaryPoint (STRING polygon_name, int point_index) |
Retrieves a 3-element array of the outer boundary point at the specified index for the given Polygon. | |
BOOL | GE_SetPolygonOuterBoundary (STRING polygon_name, STRING points) |
Sets the linear ring outer boundary coordinate points for the given Polygon. | |
BOOL | GE_SetPolygonOuterBoundaryPoint (STRING polygon_name, int point_index, double lat, double lon, double alt) |
Sets the specified outer boundary coordinate point of the given Polygon. | |
double | GE_GetPolygonOuterBoundaryPerimeter (STRING polygon_name) |
Retrieves the perimeter (in miles) of the given Polygon's outer boundary. | |
double * | GE_GetPolygonAveragedCenterPoint (STRING polygon_name) |
Retrieves a 3-element array for the Polygon's computed center point. | |
int | GE_GetPolygonInnerBoundaryCount (STRING polygon_name) |
Retrieves the total count of inner boundaries of the given Polygon. | |
int | GE_GetPolygonInnerBoundaryPointCount (STRING polygon_name, int boundary_index) |
Retrieves the total count of geographical points for the given Polygon's specified inner boundary. | |
STRING | GE_GetPolygonInnerBoundary (STRING polygon_name, int boundary_index) |
Retrieves a string of all coordinate points for the given Polygon's specified inner boundary. | |
STRING | GE_GetPolygonInnerBoundaryPointStr (STRING polygon_name, int boundary_index, int point_index) |
Retrieves the inner boundary point at the specified index and boundary for the given Polygon. | |
double * | GE_GetPolygonInnerBoundaryPoint (STRING polygon_name, int boundary_index, int point_index) |
Retrieves a 3-element array of the inner boundary point at the specified index and boundary for the given Polygon. | |
BOOL | GE_AddPolygonInnerBoundary (STRING polygon_name, STRING points) |
Adds an inner boundary linear ring of coordinate points to the given Polygon. | |
BOOL | GE_SetPolygonInnerBoundary (STRING polygon_name, int boundary_index, STRING points) |
Sets the Polygon's linear ring inner boundary coordinate points for specified boundary. | |
BOOL | GE_SetPolygonInnerBoundaryPoint (STRING polygon_name, int boundary_index, int point_index, double lat, double lon, double alt) |
Sets the specified inner boundary coordinate point of the given Polygon. | |
double | GE_GetPolygonInnerBoundaryPerimeter (STRING polygon_name, int boundary_index) |
Retrieves the perimeter (in miles) of the given Polygon's specified inner boundary. | |
BOOL | GE_MovePolygon (STRING polygon_name, double lat, double lon, double alt) |
Moves the given Polygon. |
The following functions provide various routines for adding, removing, and updating Polygons in Google Earth.
Polygons represent an enclosed boundary with zero or more inner boundaries. Each boundary is defined by a set of 3 or more coordinate points. Polygon boundaries can be constructed to represent 3-dimensional structures such as buildings, borders, or any other conceivable object.
int GE_GetPolygonCount | ( | ) |
Returns the current number of Polygons added to the Google Earth map by the GE SDK.
BOOL GE_RefreshPolygon | ( | STRING | polygon_name | ) |
Forces an update to the Polygon with the given polygon name.
polygon_name | The name of the Polygon to update |
BOOL GE_AddPolygon | ( | STRING | polygon_name, | |
STRING | outer_boundary_points, | |||
STRING | color | |||
) |
Adds a new Polygon with the given outer boundary to Google Earth.
polygon_name | The name of the Polygon to update | |
outer_boundary_points | A group of 3 or more 3-tuple coordinate points (longitude,latitude,altitude) that construct the Polygon's outer boundary | |
color | A string representing the color of the boundary formatted as aabbggrr, where aa is opacity, bb is blue, gg is green, and rr is red. |
BOOL GE_DeletePolygon | ( | STRING | polygon_name | ) |
Removes the Polygon with the given name from the Google Earth map.
polygon_name | The name of the Polygon to remove |
BOOL GE_PolygonExists | ( | STRING | polygon_name, | |
int * | index | |||
) |
Determines if a Polygon with the given name has been added to Google Earth by the GE SDK.
If the function returns TRUE, then the index parameter will contain a value that represents the index into the GE SDK internal Polygon collection.
polygon_name | The name of the Polygon | |
index | The index into the internal Polygon collection where polygon_name exists if found |
BOOL GE_PolygonVisible | ( | STRING | polygon_name | ) |
Determines if the Polygon with the given name is currently visible in Google Earth.
polygon_name | The name of the Polygon |
BOOL GE_ShowPolygon | ( | STRING | polygon_name | ) |
Sets the Polygon with the given name to visible.
polygon_name | The name of the Polygon |
BOOL GE_HidePolygon | ( | STRING | polygon_name | ) |
Sets the Polygon with the given name to invisible.
polygon_name | The name of the Polygon |
STRING GE_GetPolygonName | ( | int | index | ) |
Retrieves the name of the Polygon at the given index.
index | The index into the internal Polygon collection |
BOOL GE_SetPolygonName | ( | STRING | polygon_name, | |
STRING | new_name | |||
) |
Changes the name of a Polygon.
polygon_name | The name of an existing Polygon to be renamed | |
new_name | The new name to be given to the Polygon |
STRING GE_GetPolygonSnippet | ( | STRING | polygon_name | ) |
Retrieves a Polygon's snippet.
polygon_name | The name of the Polygon |
BOOL GE_SetPolygonSnippet | ( | STRING | polygon_name, | |
STRING | snippet | |||
) |
Changes the snippet of the given Polygon.
polygon_name | The name of the Polygon | |
snippet | The snippet to be applied to the given Polygon |
int GE_GetPolygonSnippetMaxLines | ( | STRING | polygon_name | ) |
Retrieves the given Polygon's snippet maxLines attribute value.
polygon_name | The name of the Polygon |
BOOL GE_SetPolygonSnippetMaxLines | ( | STRING | polygon_name, | |
int | max_lines | |||
) |
Changes the snippet maxLines attribute value for the given Polygon.
polygon_name | The name of the Polygon | |
max_lines | The value to be applied to the maxLines attribute |
STRING GE_GetPolygonKML | ( | STRING | polygon_name | ) |
Retrieves the KML content that makes up the given Polygon.
polygon_name | The name of the Polygon |
STRING GE_GetPolygonDescription | ( | STRING | polygon_name | ) |
Retrieves the description of the given Polygon.
polygon_name | The name of the Polygon |
BOOL GE_SetPolygonDescription | ( | STRING | polygon_name, | |
STRING | description | |||
) |
Sets the description of the given Polygon.
polygon_name | The name of the Polygon | |
description | The description to apply to the Model |
BOOL GE_GetPolygonExtrude | ( | STRING | polygon_name | ) |
Retrieves the given Polygon's extrude state.
polygon_name | The name of the Polygon |
BOOL GE_SetPolygonExtrude | ( | STRING | polygon_name, | |
BOOL | extrude | |||
) |
Sets the given Polygon's extrude state.
polygon_name | The name of the Polygon | |
extrude | The state to be applied to the given Polygon's <extrude> element |
BOOL GE_GetPolygonTessellate | ( | STRING | polygon_name | ) |
Retrieves the given Polygon tessellate state.
polygon_name | The name of the Polygon |
BOOL GE_SetPolygonTessellate | ( | STRING | polygon_name, | |
BOOL | tessellate | |||
) |
Sets the given Polygon tessellate state.
polygon_name | The name of the Polygon | |
tessellate | The state to be applied to the given Polygon <tessellate> element |
int GE_GetPolygonAltMode | ( | STRING | polygon_name | ) |
Retrieves the altitude mode of the given Polygon.
polygon_name | The name of the Polygon |
BOOL GE_SetPolygonAltMode | ( | STRING | polygon_name, | |
int | alt_mode | |||
) |
Sets the altitude mode of the given Polygon.
polygon_name | The name of the Polygon | |
alt_mode | Altitude mode for the given Polygon (relativeToGround (0), absolute (1), or clampToGround (2)) |
STRING GE_GetPolygonColor | ( | STRING | polygon_name | ) |
Retrieves the given Polygon's current boundary color.
polygon_name | The name of the Polygon |
BOOL GE_SetPolygonColor | ( | STRING | polygon_name, | |
STRING | color | |||
) |
Sets the given Polygon's boundary color.
polygon_name | The name of the Polygon | |
color | A string representing the color formatted as aabbggrr, where aa is opacity, bb is blue, gg is green, and rr is red. |
BOOL GE_GetPolygonOutline | ( | STRING | polygon_name | ) |
Retrieves the given Polygon's outline state.
polygon_name | The name of the Polygon |
BOOL GE_SetPolygonOutline | ( | STRING | polygon_name, | |
BOOL | outline | |||
) |
Sets the given Polygon's outline state.
polygon_name | The name of the Polygon | |
outline | The state to be applied to the given Polygon's <outline> element |
STRING GE_GetPolygonOutlineColor | ( | STRING | polygon_name | ) |
Retrieves the given Polygon's current outline color.
polygon_name | The name of the Polygon |
BOOL GE_SetPolygonOutlineColor | ( | STRING | polygon_name, | |
STRING | color | |||
) |
Sets the given Polygon's outline color.
polygon_name | The name of the Polygon | |
color | A string representing the Polygon's outline color formatted as aabbggrr, where aa is opacity, bb is blue, gg is green, and rr is red |
float GE_GetPolygonOutlineWidth | ( | STRING | polygon_name | ) |
Retrieves the width of the given Polygon's outline.
polygon_name | The name of the Polygon |
BOOL GE_SetPolygonOutlineWidth | ( | STRING | polygon_name, | |
float | width | |||
) |
Sets the given Polygon's outline width.
polygon_name | The name of the Polygon | |
width | The width of the Polygon's outline in pixels |
BOOL GE_GetPolygonFill | ( | STRING | polygon_name | ) |
Retrieves the given Polygon's fill state.
polygon_name | The name of the Polygon |
BOOL GE_SetPolygonFill | ( | STRING | polygon_name, | |
BOOL | fill | |||
) |
Sets the given Polygon's fill state.
polygon_name | The name of the Polygon | |
fill | The state to be applied to the given Polygon's <fill> element |
int GE_GetPolygonOuterBoundaryPointCount | ( | STRING | polygon_name | ) |
Retrieves the total count of geographical points for the given Polygon's outer boundary.
polygon_name | The name of the Polygon |
STRING GE_GetPolygonOuterBoundary | ( | STRING | polygon_name | ) |
Retrieves a string of all coordinate points for the given Polygon's outer boundary.
polygon_name | The name of the Polygon |
STRING GE_GetPolygonOuterBoundaryPointStr | ( | STRING | polygon_name, | |
int | point_index | |||
) |
Retrieves the outer boundary point at the specified index for the given Polygon.
polygon_name | The name of the Polygon | |
point_index | The index of the outer boundary coordinate point |
double* GE_GetPolygonOuterBoundaryPoint | ( | STRING | polygon_name, | |
int | point_index | |||
) |
Retrieves a 3-element array of the outer boundary point at the specified index for the given Polygon.
polygon_name | The name of the Polygon | |
point_index | The index of the outer boundary coordinate point |
BOOL GE_SetPolygonOuterBoundary | ( | STRING | polygon_name, | |
STRING | points | |||
) |
Sets the linear ring outer boundary coordinate points for the given Polygon.
polygon_name | The name of the Polygon | |
points | A set of geographical points to be applied to the given Polygon's outer boundary <coordinates> element |
BOOL GE_SetPolygonOuterBoundaryPoint | ( | STRING | polygon_name, | |
int | point_index, | |||
double | lat, | |||
double | lon, | |||
double | alt | |||
) |
Sets the specified outer boundary coordinate point of the given Polygon.
polygon_name | The name of the Polygon | |
point_index | The index of the outer boundary coordinate point to set | |
lat | The latitude of the point | |
lon | The longitude of the point | |
alt | The altitude of the point |
double GE_GetPolygonOuterBoundaryPerimeter | ( | STRING | polygon_name | ) |
Retrieves the perimeter (in miles) of the given Polygon's outer boundary.
polygon_name | The name of the Polygon |
double* GE_GetPolygonAveragedCenterPoint | ( | STRING | polygon_name | ) |
Retrieves a 3-element array for the Polygon's computed center point.
polygon_name | The name of the Polygon |
int GE_GetPolygonInnerBoundaryCount | ( | STRING | polygon_name | ) |
Retrieves the total count of inner boundaries of the given Polygon.
polygon_name | The name of the Polygon |
int GE_GetPolygonInnerBoundaryPointCount | ( | STRING | polygon_name, | |
int | boundary_index | |||
) |
Retrieves the total count of geographical points for the given Polygon's specified inner boundary.
polygon_name | The name of the Polygon | |
boundary_index | The index of the inner boundary |
STRING GE_GetPolygonInnerBoundary | ( | STRING | polygon_name, | |
int | boundary_index | |||
) |
Retrieves a string of all coordinate points for the given Polygon's specified inner boundary.
polygon_name | The name of the Polygon | |
boundary_index | The index of the inner boundary |
STRING GE_GetPolygonInnerBoundaryPointStr | ( | STRING | polygon_name, | |
int | boundary_index, | |||
int | point_index | |||
) |
Retrieves the inner boundary point at the specified index and boundary for the given Polygon.
polygon_name | The name of the Polygon | |
boundary_index | The index of the inner boundary | |
point_index | The index of the inner boundary coordinate point |
double* GE_GetPolygonInnerBoundaryPoint | ( | STRING | polygon_name, | |
int | boundary_index, | |||
int | point_index | |||
) |
Retrieves a 3-element array of the inner boundary point at the specified index and boundary for the given Polygon.
polygon_name | The name of the Polygon | |
boundary_index | The index of the inner boundary | |
point_index | The index of the inner boundary coordinate point |
BOOL GE_AddPolygonInnerBoundary | ( | STRING | polygon_name, | |
STRING | points | |||
) |
Adds an inner boundary linear ring of coordinate points to the given Polygon.
polygon_name | The name of the Polygon | |
points | A set of geographical points to be applied to the given Polygon |
BOOL GE_SetPolygonInnerBoundary | ( | STRING | polygon_name, | |
int | boundary_index, | |||
STRING | points | |||
) |
Sets the Polygon's linear ring inner boundary coordinate points for specified boundary.
polygon_name | The name of the Polygon | |
boundary_index | The index of the inner boundary | |
points | A set of geographical points to be applied to the given Polygon |
BOOL GE_SetPolygonInnerBoundaryPoint | ( | STRING | polygon_name, | |
int | boundary_index, | |||
int | point_index, | |||
double | lat, | |||
double | lon, | |||
double | alt | |||
) |
Sets the specified inner boundary coordinate point of the given Polygon.
polygon_name | The name of the Polygon | |
boundary_index | The index of the inner boundary | |
point_index | The index of the inner boundary coordinate point | |
lat | The latitude of the point | |
lon | The longitude of the point | |
alt | The altitude of the point |
double GE_GetPolygonInnerBoundaryPerimeter | ( | STRING | polygon_name, | |
int | boundary_index | |||
) |
Retrieves the perimeter (in miles) of the given Polygon's specified inner boundary.
polygon_name | The name of the Polygon | |
boundary_index | The index of the inner boundary |
BOOL GE_MovePolygon | ( | STRING | polygon_name, | |
double | lat, | |||
double | lon, | |||
double | alt | |||
) |
Moves the given Polygon.
The Polygon's position is moved in reference to the averaged center point.
polygon_name | The name of the Polygon | |
lat | The latitude of the point to move to | |
lon | The longitude of the point to move to | |
alt | The altitude of the point to move to |