Module org.arakhne.afc.gis.giscore
Package org.arakhne.afc.gis.mapelement
Interface GISElementContainer<T extends MapElement>
-
- Type Parameters:
T- is the type of the containing elements.
- All Superinterfaces:
BoundedElement2afp<Rectangle2d>,GISContainer<T>,InformedIterable<T>,Iterable<T>
- All Known Implementing Classes:
ArrayMapElementLayer,GridMapElementLayer,MapElementLayer,RoadNetworkLayer,TreeMapElementLayer
public interface GISElementContainer<T extends MapElement> extends GISContainer<T>
Container of elements for a GIS application.- Since:
- 14.0
- Version:
- 17.0 2020-01-04 14:41:53
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.gis
- Maven Artifact Id:
- giscore
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaddMapElement(T element)Add a map element inside this container.booleanaddMapElements(Collection<? extends T> elements)Add map elements inside this container.Collection<T>getAllMapElements()Replies the map elements as an array.URLgetElementAttributeSourceURL()Replies the URL from which the attributes of the elements in this container were read.MapMetricProjectiongetElementGeometrySourceProjection()Replies the map projection of the data inside the file for which the URL is replied bygetElementGeometrySourceURL().URLgetElementGeometrySourceURL()Replies the URL from which the geometry of the elements in this container were read.TgetMapElementAt(int index)Replies the map element at the specified index.intgetMapElementCount()Replies the count of map elements.Iterator<T>iterator(Rectangle2afp<?,?,?,?,?,?> bounds)Iterates on the elements that intersect the specified bounds.voidonMapElementGraphicalAttributeChanged()Invoked when one of the graphical attributes of this element has changed, including those that change the bounding box.booleanremoveAllMapElements()Remove all the map elements from this container.booleanremoveMapElement(MapElement element)Remove a map element from this container.voidsetElementAttributeSourceURL(URL url)Set the URL from which the attributes of the elements in this container were read.voidsetElementGeometrySource(URL url, MapMetricProjection mapProjection)Set the URL from which the geometry of the elements in this container were read.-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.afp.BoundedElement2afp
getBoundingBox
-
Methods inherited from interface org.arakhne.afc.gis.primitive.GISContainer
bindChangeListener, getColor, getName, resetBoundingBox, size
-
Methods inherited from interface org.arakhne.afc.util.InformedIterable
getElementType
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
-
-
-
Method Detail
-
getMapElementCount
int getMapElementCount()
Replies the count of map elements.- Returns:
- the count of map elements.
-
getMapElementAt
T getMapElementAt(int index)
Replies the map element at the specified index.- Parameters:
index- the index.- Returns:
- the element at the given index
- Throws:
IndexOutOfBoundsException- in case of error.
-
getAllMapElements
Collection<T> getAllMapElements()
Replies the map elements as an array.- Returns:
- all the elements.
-
addMapElements
boolean addMapElements(Collection<? extends T> elements)
Add map elements inside this container.- Parameters:
elements- the new elements.- Returns:
trueif at least one element was added, otherwisefalse
-
addMapElement
boolean addMapElement(T element)
Add a map element inside this container.- Parameters:
element- the new element.- Returns:
trueif the element was added successfully, otherwisefalse
-
removeMapElement
boolean removeMapElement(MapElement element)
Remove a map element from this container.- Parameters:
element- the element to remove.- Returns:
trueif the element was removed successfully, otherwisefalse
-
removeAllMapElements
boolean removeAllMapElements()
Remove all the map elements from this container.- Returns:
trueif container has changed, otherwisefalse- Since:
- 4.0
-
onMapElementGraphicalAttributeChanged
void onMapElementGraphicalAttributeChanged()
Invoked when one of the graphical attributes of this element has changed, including those that change the bounding box.
-
getElementGeometrySourceURL
URL getElementGeometrySourceURL()
Replies the URL from which the geometry of the elements in this container were read.Basically, the replied URL may be the URL of a ESRI Shape file.
- Returns:
- the URL of the source of the geometry of
the elements, or
nullif no known source.
-
getElementGeometrySourceProjection
MapMetricProjection getElementGeometrySourceProjection()
Replies the map projection of the data inside the file for which the URL is replied bygetElementGeometrySourceURL().- Returns:
- the map projection of the data, or
nullifgetElementGeometrySourceURL()repliesnull. - Since:
- 4.1
-
getElementAttributeSourceURL
URL getElementAttributeSourceURL()
Replies the URL from which the attributes of the elements in this container were read.Basically, the replied URL may be the URL of a dBase file.
- Returns:
- the URL of the source of the attributes of
the elements, or
nullif no known source.
-
setElementAttributeSourceURL
void setElementAttributeSourceURL(URL url)
Set the URL from which the attributes of the elements in this container were read.Basically, the URL may be the URL of a dBase file.
- Parameters:
url- is the URL of the source of the attributes of the elements, ornullif no known source.
-
setElementGeometrySource
void setElementGeometrySource(URL url, MapMetricProjection mapProjection)
Set the URL from which the geometry of the elements in this container were read.Basically, the URL may be the URL of a ESRI Shape file.
- Parameters:
url- is the URL of the source of the geometry of the elements, ornullif no known source.mapProjection- is the map projection used to describe the data inside the file with the given URL.- Since:
- 4.1
-
iterator
@Pure Iterator<T> iterator(Rectangle2afp<?,?,?,?,?,?> bounds)
Iterates on the elements that intersect the specified bounds.- Parameters:
bounds- is the rectangle inside which the replied elements must be located- Returns:
- an iterator on the map elements.
- Since:
- 14.0
-
-