Documentation for maplib/Geometry.kt¶
- data class Point¶
Point class. Holds X and Y coordinates.
- class CoordinateTransformation¶
Coordinate transformation class. Helps to transform from one spatial reference to another.
- static fun new(fromEPSG: Int, toEPSG: Int) : CoordinateTransformation¶
Create new coordinate transformation.
- Параметры
fromEPSG – Source EPSG spatial reference code.
toEPSG – Destination EPSG spatial reference code.
- Результат
CoordinateTransformation class instance.
- data class Envelope¶
Spatial envelope.
- fun constructor(minX: Double = 0.0, maxX: Double = 0.0, minY: Double = 0.0, maxY: Double = 0.0)¶
Main constructor
- Параметры
minX – X Minimum X value.
maxX – X Maximum X value.
minY – Y Minimum Y value.
maxY – Y Maximum X value.
- fun merge(other: Envelope)¶
Merge envelope with other envelope. The result of extent of this and other envelop will be set to this envelope.
- Параметры
other – Other envelope.
- class Geometry¶
Geometry class.
- fun constructor(handle: Long)
Main constructor
- Параметры
handle – e C API handle
- static fun typeToName(geometryType: Type) : String¶
Get name from geometry type.
- Параметры
geometryType – Geometry type.
- Результат
Geometry type name string.
- static fun createFromJson(json: JsonObject) : Geometry?¶
Create geometry from json object. The GeoJson geometry part.
- Параметры
json – JsonObject class instance.
- Результат
Geometry or null.
- fun transform(toEPSG: Int) : Boolean¶
Transform geometry from one spatial reference to another.
- Параметры
epsg – Destination spatial reference.
- Результат
True on success.
- fun transform(transformation: CoordinateTransformation) : Boolean¶
Transform geometry from one spatial reference to another.
- Параметры
transformation – CoordinateTransformation class instance.
- Результат
True on success.
- enum class Type¶
Geometry type.
NONE = 0 : No geometry.
POINT = 1 : Point.
LINESTRING = 2 : Linestring.
POLYGON = 3 : Polygon.
MULTIPOINT = 4 : Multipoint.
MULTILINESTRING = 5 : Multilinestring.
MULTIPOLYGON = 6 : Multipolygon.
- class GeoPoint¶
Geometry point class.