|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IIntersection
A road intersection, which may be signalised or unsignalised. An intersection contains one or more nodes, and there is no upper limit on the number of nodes, so intersections may be arbitrarily complex.
For example, a roundabout is commonly configured to be a single intersection, as is a staggered 4-way junction.
A vehicle approaching an intersection can make decisions based on the numbered exit from that intersection, which is more powerful than decisions based on simple link-exit numbers.
If the intersection is signalised it will have an associated controller. The limitation of one intersection per controller is not really a limitation, as the intersection can be arbitrarily complex.
| Field Summary |
|---|
| Fields inherited from interface com.azalient.api.a.tables.IRecord |
|---|
DELETED, KEY_SEP, KEY_SEP_CHAR |
| Method Summary | |
|---|---|
IUndoable |
add(IUndoStack us,
IStream m)
Add a stream to this intersection |
void |
addCrossing(ICrossing crossing)
Add a crossing to the array stored by this intersection |
IUndoable |
addNode(IUndoStack us,
INode node)
Add a node to this intersection |
IUndoable |
addTurn(IUndoStack us,
ITurn turn)
Add a turn to this intersection |
IController |
controller()
Returns the controller for this intersection, if it is signalised |
void |
controller(IController controller)
Set the controller for this intersection |
ICrossing[] |
crossings()
An array of crossings stored at this intersection. |
IXyz |
defaultControllerPosition()
Returns the default location for the south-west corner of the controller box |
void |
delCrossing(ICrossing crossing)
Delete a crossing from the array stored by this intersection |
IUndoable |
delNode(IUndoStack us,
INode node)
Delete a node from this intersection |
IUndoable |
delTurn(IUndoStack us,
ITurn turn)
Delete a turn from this intersection |
IXyz[][] |
edgePoints()
Return a 2-dimensional array of points defining the intersection outline. |
int |
exits()
The number of exits from this intersection. |
ITurn |
firstTurnMatching(ILink linkI,
ILink linkO)
Returns the first turn that matches the inward-outward link pair. |
void |
nextlanes(ILane entry,
ILink exit,
int next,
int range)
Create or remove streams on this intersection between the given pair of links to match the lane range specified |
IXyz |
nodeCentroid()
A location point calculated as the centred of all the nodes that are included in the intersection. |
INode[] |
nodes()
Returns an array of nodes that form part of this intersection |
int |
number()
Returns the "name" of an intersection, which is an integer number, unique within the model. |
IUndoable |
remove(IUndoStack us,
IStream m)
Remove a stream from this intersection |
boolean |
signalized()
Returns true if the intersection is signalized |
IStream[] |
streams()
Returns an array of all the streams on this intersection. |
ITurn[] |
turns()
Returns an array of all the turns on this intersection. |
ITurn[] |
turnsMatching(ILink linkI,
ILink linkO)
Returns an array of all the turns that match the inward-outward link pair. |
| Methods inherited from interface com.azalient.api.b.network.ISurface |
|---|
add, name, remove, selected |
| Methods inherited from interface com.azalient.api.file.StoreRecordRW |
|---|
canRename, rename, store |
| Methods inherited from interface com.azalient.api.file.RecordR |
|---|
extraSet, finished, isApplicable, isEditable, set |
| Methods inherited from interface com.azalient.api.a.tables.IRecord |
|---|
name |
| Methods inherited from interface com.azalient.api.file.RecordW |
|---|
extraCols, extraGet, extraGetB, extraGetD, extraGetI, extraGetS, extraGetT, get, isVolatile |
| Method Detail |
|---|
int number()
INode[] nodes()
ITurn[] turns()
IStream[] streams()
int exits()
boolean signalized()
IController controller()
void controller(IController controller)
IUndoable addNode(IUndoStack us,
INode node)
IUndoable delNode(IUndoStack us,
INode node)
IUndoable addTurn(IUndoStack us,
ITurn turn)
IUndoable delTurn(IUndoStack us,
ITurn turn)
IUndoable add(IUndoStack us,
IStream m)
IUndoable remove(IUndoStack us,
IStream m)
ITurn firstTurnMatching(ILink linkI,
ILink linkO)
On most intersections, there will be either zero or one turn for each link pair, but where
an extra turn has been created, perhaps for a bus phase, this will return one of those turns.
To retrieve all turns for a link pair, use turnsMatching(ILink, ILink)
A turn will exist for a link pair only if there is a stream connecting a lane on the inward link to a lane on the outward link. If there is only a filter lane, then no turn will exist.
linkI - the inward link, also referred to as the approach road or linklinkO - the outward link, also referred to as the exit road or link
ITurn[] turnsMatching(ILink linkI,
ILink linkO)
ITurn.ZERO.
On most intersections, there will be either zero or one turn for each link pair, but where an extra turn has been created, perhaps for a bus phase, there will be two turns for this pair. Theoretically, there is no limit to the number of turns for a link pair, although each turn must have at least one stream.
A turn will exist for a link pair only if there is a stream connecting a lane on the inward link to a lane on the outward link. If there is only a filter lane, then no turn will exist.
linkI - the inward link, also referred to as the approach road or linklinkO - the outward link, also referred to as the exit road or linkIXyz nodeCentroid()
IXyz defaultControllerPosition()
void addCrossing(ICrossing crossing)
void delCrossing(ICrossing crossing)
ICrossing[] crossings()
IXyz[][] edgePoints()
First dimension = number of polylines
Second dimension = number of points in each polyline
void nextlanes(ILane entry,
ILink exit,
int next,
int range)
entry - the entry or approach linkexit - the exit linknext - the lowest numbered exit lane indexrange - the size of the range of exit lanes, 1 for a single lane, 2 for 2 lanes, etc.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||