- 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 Rectangle2d
calcBounds()
Compute the bounds of this element.double
getPointSize()
Replies the size of this point in meters.Shape2d<?>
getShape()
Replies the shape of this this element.boolean
intersects(Shape2D<?,?,?,?,?,? extends Rectangle2afp<?,?,?,?,?,?>> rectangle)
Replies if this element has an intersection with the specified rectangle.boolean
isDoubleFramed()
Replies if this point is dfouble framed.void
setDoubleFramed(boolean doubleFramed)
Set if this point must be drawn with a double frame.void
setPointSize(double sizeInMeters)
Set the size of this point in meters.void
toJson(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, ornull
if 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, ornull
if 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, ornull
if 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, ornull
if 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:JsonableObject
Replies the Json representation of this node.- Specified by:
toJson
in interfaceJsonableObject
- Overrides:
toJson
in 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:
intersects
in classMapElement
- Parameters:
rectangle
- the rectangle- Returns:
true
if 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:
calcBounds
in 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
- istrue
if the point must have a double frame, otherwisefalse
-
isDoubleFramed
@Pure public boolean isDoubleFramed()
Replies if this point is dfouble framed.- Returns:
true
if this point has a double frame, otherwisefalse
-
getShape
public Shape2d<?> getShape()
Description copied from interface:BoundedGISElement
Replies the shape of this this element.The bounding box replied by
BoundedElement2afp.getBoundingBox()
encloses the replied shape.- Returns:
- the shape or
null
if not applicable.
-
-