Package org.oscim.core
Class MapElement
java.lang.Object
org.oscim.core.GeometryBuffer
org.oscim.core.MapElement
The MapElement class is a reusable container for a geometry with tags.
MapElement is created by TileDataSource(s) and passed to MapTileLoader via ITileDataSink.process(). This is just a buffer that belongs to TileDataSource, so don't keep a reference to it when passed as parameter or make sure to use a copy.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.oscim.core.GeometryBuffer
GeometryBuffer.GeometryType -
Field Summary
FieldsModifier and TypeFieldDescriptionintlayer of the element (0-10) overrides the theme drawing order.intfinal TagSetFields inherited from class org.oscim.core.GeometryBuffer
index, indexCurrentPos, pointNextPos, points, type -
Constructor Summary
ConstructorsConstructorDescriptionMapElement(float[] points, int[] index) MapElement(int numPoints, int numIndices) MapElement(MapElement element) -
Method Summary
Modifier and TypeMethodDescriptionclear()Reset buffer.getHeight(IRenderTheme theme) getMinHeight(IRenderTheme theme) booleanbooleanscale(float scaleX, float scaleY) Scale.voidsetCentroidPosition(float x, float y) voidsetLabelPosition(float x, float y) voidsetLayer(int layer) Set the layer of the element (0-10) to override theme drawing order.toString()translate(float dx, float dy) Translate.Methods inherited from class org.oscim.core.GeometryBuffer
addPoint, addPoint, addPoint, area, ensureIndexSize, ensurePointSize, getNumPoints, getPoint, getPoint, getPointsSize, getPointX, getPointY, isClockwise, isLine, isPoint, isPoly, isTris, makeCircle, makeCircle, removeLastPoint, reverse, setPoint, simplify, startHole, startLine, startPoints, startPolygon
-
Field Details
-
centroidPosition
-
labelPosition
-
layer
public int layerlayer of the element (0-10) overrides the theme drawing order. -
level
public int level -
tags
-
-
Constructor Details
-
MapElement
public MapElement() -
MapElement
public MapElement(int numPoints, int numIndices) -
MapElement
public MapElement(float[] points, int[] index) -
MapElement
- Parameters:
element- the map element to copy
-
-
Method Details
-
getHeight
- Returns:
- height in meters, if present
-
getMinHeight
- Returns:
- minimum height in meters, if present
-
isBuilding
public boolean isBuilding()- Returns:
- true if this is a building, else false.
-
isBuildingPart
public boolean isBuildingPart()- Returns:
- true if this is a building part, else false.
-
setCentroidPosition
public void setCentroidPosition(float x, float y) -
setLabelPosition
public void setLabelPosition(float x, float y) -
setLayer
public void setLayer(int layer) Set the layer of the element (0-10) to override theme drawing order. -
clear
Description copied from class:GeometryBufferReset buffer.- Overrides:
clearin classGeometryBuffer
-
scale
Description copied from class:GeometryBufferScale.- Overrides:
scalein classGeometryBuffer- Parameters:
scaleX- the x scale.scaleY- the y scale.- Returns:
- a reference to this object.
-
translate
Description copied from class:GeometryBufferTranslate.- Overrides:
translatein classGeometryBuffer- Parameters:
dx- the x translation.dy- the y translation.- Returns:
- a reference to this object.
-
toString
- Overrides:
toStringin classGeometryBuffer
-