CartoType Android API 8.8-7-gb35e4dc71
for Java development on Android
|
Public Member Functions | |
Geometry (CoordType aCoordType) | |
Geometry (Rect aRect, CoordType aCoordType) | |
Geometry (MapObject aMapObject) | |
Geometry (Geometry aOther, int aContourIndex) | |
native boolean | contourIsOuter (int aContourIndex) |
void | appendPoint (double aX, double aY) |
native void | appendPoint (double aX, double aY, int aPointType) |
native void | beginContour () |
CoordType | coordType () |
native int | contourCount () |
native int | pointCount (int aContourIndex) |
native PathPoint | point (int aContourIndex, int aPointIndex) |
native boolean | isEmpty () |
native boolean | isClosed () |
native void | setClosed (boolean aClosed) |
native void | reverse () |
native int | convertLinesToGreatCircles (double aMaxDistanceInMeters) |
PathIntersectionType | intersectionType (MapObject aMapObject) |
PathIntersectionInfo | intersectionInfo (MapObject aMapObject) |
PathIntersectionType[] | intersectionType (MapObject[] aMapObjectArray) |
PathIntersectionInfo[] | intersectionInfo (MapObject[] aMapObjectArray) |
boolean | intersects (MapObject aMapObject) |
boolean | contains (MapObject aMapObject) |
boolean | contained (MapObject aMapObject) |
Geometry | clip (ClipOperation aClipOperation, MapObject aMapObject) |
Geometry[] | clip (ClipOperation aClipOperation, MapObject[] aMapObjectArray) |
int | contourCount () |
int | pointCount (int aContourIndex) |
PathPoint | point (int aContourIndex, int aPointIndex) |
boolean | isClosed () |
Static Public Member Functions | |
static Geometry | envelope (MapObject aMapObject, double aOffsetInMeters) |
A class containing geometry for creating a map object or other purposes.
com.cartotype.Geometry.Geometry | ( | CoordType | aCoordType | ) |
Creates a geometry object using the specified coordinate type.
Creates a geometry object from a rectangle.
com.cartotype.Geometry.Geometry | ( | MapObject | aMapObject | ) |
Creates a geometry object containing the geometry of a map object.
com.cartotype.Geometry.Geometry | ( | Geometry | aOther, |
int | aContourIndex | ||
) |
Creates a geometry object from a single contour of another geometry object.
void com.cartotype.Geometry.appendPoint | ( | double | aX, |
double | aY | ||
) |
Appends a point to the current contour.
native void com.cartotype.Geometry.appendPoint | ( | double | aX, |
double | aY, | ||
int | aPointType | ||
) |
Appends a point to the current contour. The point type is one of the constants defined in the PathPoint class.
native void com.cartotype.Geometry.beginContour | ( | ) |
Begins a new contour. Use this function when creating a geometry object with more than one contour.
Geometry com.cartotype.Geometry.clip | ( | ClipOperation | aClipOperation, |
MapObject | aMapObject | ||
) |
Returns the result of clipping a map object using this geometry, which must be closed. Supports intersection, union, difference and exclusive-or operations. All operations except difference are commutative. The difference operation subtracts this geometry from aMapObject.
The returned geometry object is in degrees.
Geometry[] com.cartotype.Geometry.clip | ( | ClipOperation | aClipOperation, |
MapObject[] | aMapObjectArray | ||
) |
Returns the results of clipping an array of map objects using this geometry, which must be closed. Supports intersection, union, difference and exclusive-or operations. All operations except difference are commutative. The difference operation subtracts this geometry from the map objects.
The returned geometry objects are in degrees.
boolean com.cartotype.Geometry.contained | ( | MapObject | aMapObject | ) |
Returns true if this geometry is contained by the map object aMapObject.
boolean com.cartotype.Geometry.contains | ( | MapObject | aMapObject | ) |
Returns true if this geometry contains the map object aMapObject.
native int com.cartotype.Geometry.contourCount | ( | ) |
Returns the number of contours.
Implements com.cartotype.Path.
native boolean com.cartotype.Geometry.contourIsOuter | ( | int | aContourIndex | ) |
Returns true if a contour is an outer contour, defined as being anti-clockwise, that is, having a positive area when treating all points as on-curve. Useful only for closed geometries.
native int com.cartotype.Geometry.convertLinesToGreatCircles | ( | double | aMaxDistanceInMeters | ) |
Interpolates points at a maximum distance apart to convert lines to great circles. Works only with degree coordinates, and with on-curve points. Returns an error code (0 = success).
CoordType com.cartotype.Geometry.coordType | ( | ) |
Gets the coordinate type.
|
static |
Returns a geometry that is the envelope of a map object, created by offsetting the path by aOffset. The offset may be negative if the subject path is made of polygons only.
The returned geometry object is in degrees.
PathIntersectionInfo com.cartotype.Geometry.intersectionInfo | ( | MapObject | aMapObject | ) |
Returns information about the intersection of this geometry with a map object. The nearest positions are in degrees (X = longitude, Y = latitude) and the distance is in meters.
PathIntersectionInfo[] com.cartotype.Geometry.intersectionInfo | ( | MapObject[] | aMapObjectArray | ) |
Returns information about the intersection of this geometry with an array of map objects. The nearest positions are in degrees (X = longitude, Y = latitude) and the distances are in meters.
PathIntersectionType com.cartotype.Geometry.intersectionType | ( | MapObject | aMapObject | ) |
Returns the intersection type of this geometry with a map object.
PathIntersectionType[] com.cartotype.Geometry.intersectionType | ( | MapObject[] | aMapObjectArray | ) |
Returns the intersection types of this geometry with an array of map objects.
boolean com.cartotype.Geometry.intersects | ( | MapObject | aMapObject | ) |
Returns true if this geometry intersects, contains or is contained by the map object aMapObject.
native boolean com.cartotype.Geometry.isClosed | ( | ) |
Returns true if the geometry object is closed.
Implements com.cartotype.Path.
native boolean com.cartotype.Geometry.isEmpty | ( | ) |
Returns true if the geometry object has no points.
native PathPoint com.cartotype.Geometry.point | ( | int | aContourIndex, |
int | aPointIndex | ||
) |
Returns a point specified by contour index and point index.
Implements com.cartotype.Path.
native int com.cartotype.Geometry.pointCount | ( | int | aContourIndex | ) |
Returns the number of points in a contour.
Implements com.cartotype.Path.
native void com.cartotype.Geometry.reverse | ( | ) |
Reverses the order of the points in each contour.
native void com.cartotype.Geometry.setClosed | ( | boolean | aClosed | ) |
Sets the geometry object to open or closed.