Module org.arakhne.afc.gis.giscore
Package org.arakhne.afc.gis
Interface GISPolylineSet<P extends MapPolyline>
-
- Type Parameters:
P
- is the type of the user data inside the node.
- All Superinterfaces:
Collection<P>
,GISElementSet<P>
,GISSet<P>
,Iterable<P>
,Set<P>
- All Known Implementing Classes:
MapPolylineGridSet
,MapPolylineTreeSet
public interface GISPolylineSet<P extends MapPolyline> extends GISElementSet<P>
This interface describes a set that contains GIS primitives and that permits to find them according to there geo-location.- Since:
- 14.0
- Version:
- 17.0 2020-01-04 14:41:53
- Author:
- Stéphane GALLAND
- See Also:
GISPrimitive
- Maven Group Id:
- org.arakhne.afc.gis
- Maven Artifact Id:
- giscore
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
add(P polyline, double precision, OutputParameter<P> firstNeighbour, OutputParameter<P> secondNeighbour)
Add the selected polyline inside the tree and replies the two nearest polylines that are already inside the tree.P
getNearestEnd(double x, double y)
Replies the object that has the nearest end to the specified point.P
getNearestEnd(Point2D<?,?> position)
Replies the object that has the nearest end to the specified point.-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface org.arakhne.afc.gis.GISElementSet
getNearest, getNearest, getNearestData, getNearestData
-
Methods inherited from interface org.arakhne.afc.gis.GISSet
boundsIterator, computeSize, get, get, get, getElementType, indexOf, isTypeRecomputedAfterRemoval, iterator, iterator, setTypeRecomputedAfterRemoval, slowContains, toIterable, toIterable
-
-
-
-
Method Detail
-
add
boolean add(P polyline, double precision, OutputParameter<P> firstNeighbour, OutputParameter<P> secondNeighbour)
Add the selected polyline inside the tree and replies the two nearest polylines that are already inside the tree.- Parameters:
polyline
- is the polyline to addprecision
- is the precision (in meters) used to detect the neighbours.firstNeighbour
- is one of the two nearest polylines that could be connected to the new segment.secondNeighbour
- is one of the two nearest polylines that could be connected to the new segment.- Returns:
true
if successfully added,false
otherwise
-
getNearestEnd
P getNearestEnd(Point2D<?,?> position)
Replies the object that has the nearest end to the specified point.- Parameters:
position
- is the position from which the nearest primitive must be replied.- Returns:
- the nearest element or
null
if none. - See Also:
getNearestEnd(double, double)
-
getNearestEnd
P getNearestEnd(double x, double y)
Replies the object that has the nearest end to the specified point.- Parameters:
x
- is the position from which the nearest primitive must be replied.y
- is the position from which the nearest primitive must be replied.- Returns:
- the nearest element or
null
if none.
-
-