- java.lang.Object
-
- org.arakhne.afc.gis.primitive.AbstractGISElement<C,T>
-
- org.arakhne.afc.gis.primitive.AbstractBoundedGISElement<GISElementContainer<?>,MapElement>
-
- org.arakhne.afc.gis.mapelement.MapElement
-
- org.arakhne.afc.gis.mapelement.MapPonctualElement
-
- org.arakhne.afc.gis.mapelement.MapPoint
-
- All Implemented Interfaces:
Serializable,Cloneable,EventListener,AttributeChangeListener,AttributeCollection,AttributeProvider,BoundedGISElement,FlagContainer,GISCloneable<MapElement>,GISContentElement<GISElementContainer<?>>,GISEditable,GISElement,GISFlagContainer,GISPrimitive,BoundedElement2afp<Rectangle2d>,JsonableObject
public class MapPoint extends MapPonctualElement
This class permits to store a geo-located point.- Since:
- 14.0
- Version:
- 17.0 2020-01-04 14:41:53
- Author:
- Stéphane GALLAND
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.gis
- Maven Artifact Id:
- giscore
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.arakhne.afc.gis.mapelement.MapElement
MapElement.VisualizationType
-
-
Field Summary
-
Fields inherited from class org.arakhne.afc.gis.mapelement.MapElement
ATTR_COLOR, ATTR_USE_CONTAINER_COLOR, ATTR_VISUALIZATION_TYPE
-
Fields inherited from interface org.arakhne.afc.gis.primitive.FlagContainer
FLAG_READONLY, FLAG_SELECTED
-
Fields inherited from interface org.arakhne.afc.gis.primitive.GISElement
ATTR_NAME, NAME_COMPARATOR
-
Fields inherited from interface org.arakhne.afc.gis.primitive.GISPrimitive
COMPARATOR
-
-
Constructor Summary
Constructors Constructor Description MapPoint(double geoX, double geoY)Create a new map element.MapPoint(UUID id, double geoX, double geoY)Create a new map element.MapPoint(UUID id, AttributeCollection attributeSource, double geoX, double geoY)Create a new map element.MapPoint(UUID id, AttributeCollection attributeSource, Point2D<?,?> point)Create a new map element.MapPoint(UUID id, Point2D<?,?> point)Create a new map element.MapPoint(AttributeCollection attributeSource, double geoX, double geoY)Create a new map element.MapPoint(AttributeCollection attributeSource, Point2D<?,?> point)Create a new map element.MapPoint(Point2D<?,?> point)Create a new map element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Rectangle2dcalcBounds()Compute the bounds of this element.doublegetPointSize()Replies the size of this point in meters.Shape2d<?>getShape()Replies the shape of this this element.booleanintersects(Shape2D<?,?,?,?,?,? extends Rectangle2afp<?,?,?,?,?,?>> rectangle)Replies if this element has an intersection with the specified rectangle.booleanisDoubleFramed()Replies if this point is dfouble framed.voidsetDoubleFramed(boolean doubleFramed)Set if this point must be drawn with a double frame.voidsetPointSize(double sizeInMeters)Set the size of this point in meters.voidtoJson(JsonBuffer buffer)Replies the Json representation of this node.-
Methods inherited from class org.arakhne.afc.gis.mapelement.MapPonctualElement
contains, distance, equals, getDistance, getGeoLocation, getPoint, getX, getY, hashCode, setLocation, setLocation
-
Methods inherited from class org.arakhne.afc.gis.mapelement.MapElement
addGISEditableChangeListener, boundsContains, boundsIntersects, clone, contains, equals, finalize, fireElementChanged, fireGraphicalAttributeChanged, fireShapeChanged, getColor, getFlags, getRawColor, getVisualizationType, hasFlag, isContainerColorUsed, isReadOnlyObject, onAttributeChanged, removeGISEditableChangeListener, resetBoundingBox, setColor, setContainerColorUse, setFlag, setReadOnlyObject, setUUID, setVisualizationType, switchFlag, unsetFlag
-
Methods inherited from class org.arakhne.afc.gis.primitive.AbstractBoundedGISElement
getBoundingBox, setBoundingBox
-
Methods inherited from class org.arakhne.afc.gis.primitive.AbstractGISElement
addAttributeChangeListener, addAttributes, addAttributes, attributes, copyAttributes, flush, freeMemory, getAllAttributeNames, getAllAttributes, getAllAttributesByType, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttributeAsBool, getAttributeAsDate, getAttributeAsDouble, getAttributeAsEnumeration, getAttributeAsEnumeration, getAttributeAsFloat, getAttributeAsInetAddress, getAttributeAsInt, getAttributeAsJavaClass, getAttributeAsLong, getAttributeAsString, getAttributeAsURI, getAttributeAsURL, getAttributeAsUUID, getAttributeCollection, getAttributeCount, getAttributeObject, getAttributeProvider, getContainer, getGeoId, getName, getTopContainer, getUUID, hasAttribute, hashKey, isEventFirable, onAttributeChangeEvent, removeAllAttributes, removeAttribute, removeAttributeChangeListener, renameAttribute, renameAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributes, setAttributes, setAttributeType, setContainer, setEventFirable, setName, toMap, toMap, toString
-
Methods inherited from interface org.arakhne.afc.attrs.collection.AttributeCollection
addAttributeChangeListener, addAttributes, addAttributes, flush, isEventFirable, removeAllAttributes, removeAttribute, removeAttributeChangeListener, renameAttribute, renameAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributes, setAttributes, setAttributeType, setEventFirable
-
Methods inherited from interface org.arakhne.afc.attrs.collection.AttributeProvider
attributes, freeMemory, getAllAttributeNames, getAllAttributes, getAllAttributesByType, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttributeAsBool, getAttributeAsDate, getAttributeAsDouble, getAttributeAsEnumeration, getAttributeAsEnumeration, getAttributeAsFloat, getAttributeAsInetAddress, getAttributeAsInt, getAttributeAsJavaClass, getAttributeAsLong, getAttributeAsString, getAttributeAsURI, getAttributeAsURL, getAttributeAsUUID, getAttributeCount, getAttributeObject, hasAttribute, toMap, toMap
-
Methods inherited from interface org.arakhne.afc.gis.primitive.GISContentElement
getContainer, getTopContainer, setContainer
-
Methods inherited from interface org.arakhne.afc.gis.primitive.GISEditable
getName, setName
-
Methods inherited from interface org.arakhne.afc.gis.primitive.GISElement
copyAttributes, getName, hashKey, setName
-
Methods inherited from interface org.arakhne.afc.gis.primitive.GISPrimitive
getGeoId, getUUID
-
-
-
-
Constructor Detail
-
MapPoint
public MapPoint(Point2D<?,?> point)
Create a new map element.- Parameters:
point- is a location component of the point in the geo-referenced space.
-
MapPoint
public MapPoint(double geoX, double geoY)Create a new map element.- Parameters:
geoX- is a location component of the point in the geo-referenced space.geoY- is a location component of the point in the geo-referenced space.
-
MapPoint
public MapPoint(AttributeCollection attributeSource, Point2D<?,?> point)
Create a new map element.- Parameters:
attributeSource- is the provider of the attributes for this element.point- is a location component of the point in the geo-referenced space.
-
MapPoint
public MapPoint(AttributeCollection attributeSource, double geoX, double geoY)
Create a new map element.- Parameters:
attributeSource- is the provider of the attributes for this element.geoX- is a location component of the point in the geo-referenced space.geoY- is a location component of the point in the geo-referenced space.
-
MapPoint
public MapPoint(UUID id, Point2D<?,?> point)
Create a new map element.- Parameters:
id- is the unique identifier of this element, ornullif unknown.point- is a location component of the point in the geo-referenced space.- Since:
- 4.0
-
MapPoint
public MapPoint(UUID id, double geoX, double geoY)
Create a new map element.- Parameters:
id- is the unique identifier of this element, ornullif unknown.geoX- is a location component of the point in the geo-referenced space.geoY- is a location component of the point in the geo-referenced space.- Since:
- 4.0
-
MapPoint
public MapPoint(UUID id, AttributeCollection attributeSource, Point2D<?,?> point)
Create a new map element.- Parameters:
id- is the unique identifier of this element, ornullif unknown.attributeSource- is the provider of the attributes for this element.point- is a location component of the point in the geo-referenced space.- Since:
- 4.0
-
MapPoint
public MapPoint(UUID id, AttributeCollection attributeSource, double geoX, double geoY)
Create a new map element.- Parameters:
id- is the unique identifier of this element, ornullif unknown.attributeSource- is the provider of the attributes for this element.geoX- is a location component of the point in the geo-referenced space.geoY- is a location component of the point in the geo-referenced space.- Since:
- 4.0
-
-
Method Detail
-
toJson
@Pure public void toJson(JsonBuffer buffer)
Description copied from interface:JsonableObjectReplies the Json representation of this node.- Specified by:
toJsonin interfaceJsonableObject- Overrides:
toJsonin classMapPonctualElement- Parameters:
buffer- the Json buffer.
-
intersects
@Pure public boolean intersects(Shape2D<?,?,?,?,?,? extends Rectangle2afp<?,?,?,?,?,?>> rectangle)
Replies if this element has an intersection with the specified rectangle.- Specified by:
intersectsin classMapElement- Parameters:
rectangle- the rectangle- Returns:
trueif this MapElement is intersecting the specified area, otherwisefalse
-
calcBounds
@Pure protected Rectangle2d calcBounds()
Compute the bounds of this element. This function does not update the internal attribute replied byAbstractBoundedGISElement.getBoundingBox()- Specified by:
calcBoundsin classAbstractBoundedGISElement<GISElementContainer<?>,MapElement>- Returns:
- the bounds
-
setPointSize
public void setPointSize(double sizeInMeters)
Set the size of this point in meters.- Parameters:
sizeInMeters- the size of the point.
-
getPointSize
@Pure public double getPointSize()
Replies the size of this point in meters.- Returns:
- the size of this point in meters.
-
setDoubleFramed
public void setDoubleFramed(boolean doubleFramed)
Set if this point must be drawn with a double frame.- Parameters:
doubleFramed- istrueif the point must have a double frame, otherwisefalse
-
isDoubleFramed
@Pure public boolean isDoubleFramed()
Replies if this point is dfouble framed.- Returns:
trueif this point has a double frame, otherwisefalse
-
getShape
public Shape2d<?> getShape()
Description copied from interface:BoundedGISElementReplies the shape of this this element.The bounding box replied by
BoundedElement2afp.getBoundingBox()encloses the replied shape.- Returns:
- the shape or
nullif not applicable.
-
-