Package | net.systemeD.halcyon.connection |
Class | public class Way |
Inheritance | Way ![]() ![]() |
Property | Defined by | ||
---|---|---|---|
angle : Number [read-only]
| Way | ||
clockwise : Boolean [read-only]
| Way | ||
![]() | connection : Connection
Connection to which this entity belongs.
| Entity | |
![]() | deleted : Boolean = false | Entity | |
![]() | entities : Array List of entities.
| Entity | |
entity_type : String = "way" [static]
| Way | ||
![]() | hasParents : Boolean Whether this entity has any parents.
| Entity | |
![]() | hasParentWays : Boolean Whether this entity has any parents that are Ways.
| Entity | |
![]() | id : Number OSM ID.
| Entity | |
![]() | isDirty : Boolean Check if entity is modified since last markClean().
| Entity | |
length : uint [read-only]
| Way | ||
![]() | loaded : Boolean Is entity fully loaded, or is it just a placeholder reference (as a relation member)?
| Entity | |
![]() | locked : Boolean = false Lock against purging when off-screen
| Entity | |
![]() | memberships : Array Returns all relations that this Entity is part of, as array of {relation, position, role}, sorted by position.
| Entity | |
![]() | numParentWays : uint How many parents are Ways?
| Entity | |
![]() | parentObjects : Array All parents of this entity.
| Entity | |
![]() | parentRelations : Array All parents that are Relations
| Entity | |
![]() | parentsLoaded : Boolean = true Have all its parents (ie, relations that contain this object as a member, ways that contain this node) been loaded into memory
| Entity | |
![]() | parentWays : Array Get array of all Ways of which this object (presumably a node) is a child.
| Entity | |
![]() | status : String | Entity | |
![]() | timestamp : String Most recent modification of the entity (from OSM API).
| Entity | |
![]() | uid : Number User ID who last edited this entity (from OSM API).
| Entity | |
![]() | version : uint Current version number.
| Entity |
Method | Defined by | ||
---|---|---|---|
Way(connection:Connection, id:Number, version:uint, tags:Object, loaded:Boolean, nodes:Array, uid:Number, timestamp:String = null)
| Way | ||
![]() |
Create parent link from this entity to another.
| Entity | |
Way | |||
appendNode(node:Node, performAction:Function):uint
| Way | ||
![]() |
countParentObjects(within:Object):uint
How many parents does this entity have that satisfy the "within" constraint?
| Entity | |
deleteNodesFrom(start:int, performAction:Function):void
| Way | ||
Way | |||
expandBbox(node:Node):void
| Way | ||
![]() |
findParentRelationsOfType(type:String, role:String = null):Array
Returns parents that are relations, and of the specified type, and of which this entity is the correct role (if provided).
| Entity | |
![]() |
getDescription():String
Basic description of Entity - should be overriden by subclass.
| Entity | |
Way | |||
Way | |||
Given one node, return the next in sequence, cycling around a loop if necessary.
| Way | ||
Way | |||
getPJunctionNodeIndex():uint
Given a P-shaped way, return the index of midway node that one end connects back to.
| Way | ||
Given one node, return the previous, cycling around a loop if necessary.
| Way | ||
![]() |
getRelationMemberships():Array
| Entity | |
![]() |
getTag(key:String):String
Retrieve a tag by key.
| Entity | |
![]() |
getTagArray():Array
Returns an array that duplicates the tags on this entity.
| Entity | |
![]() | Entity | ||
![]() |
getTagsCopy():Object
Returns an object that duplicates the tags on this entity.
| Entity | |
![]() |
getTagsHash():Object
| Entity | |
getType():String
| Way | ||
![]() |
hasInterestingTags():Boolean
Whether the entity has any tags other than meta-tags (attribution, created_by, source, tiger:...)
| Entity | |
hasLockedNodes():Boolean
| Way | ||
hasOnceOnly(node:Node):Boolean
| Way | ||
![]() |
Whether 'entity' is a parent of this Entity.
| Entity | |
![]() |
hasTags():Boolean
Whether the entity has > 0 tags.
| Entity | |
indexOfNode(node:Node):int
| Way | ||
insertNode(index:uint, node:Node, performAction:Function):void
| Way | ||
insertNodeAtClosestPosition(newNode:Node, isSnap:Boolean, performAction:Function):int
Finds the 1st way segment which intersects the projected
coordinate and adds the node to that segment.
| Way | ||
intersects(left:Number, right:Number, top:Number, bottom:Number):Boolean
| Way | ||
isArea():Boolean
| Way | ||
![]() |
isDeleted():Boolean
Whether entity is marked deleted.
| Entity | |
isEmpty():Boolean
| Way | ||
isPShape():Boolean
Whether the way has a loop that joins back midway along its length
| Way | ||
isType(str:String):Boolean
| Way | ||
![]() |
isUneditedTiger():Boolean
Rough function to detect entities untouched since TIGER import.
| Entity | |
![]() |
markClean():void
Reset modified flag.
| Entity | |
![]() |
markDirty():void
Set entity as modified.
| Entity | |
![]() |
Copy tags from another entity into this one, creating "key=value1; value2" pairs if necessary.
| Entity | |
Merges another way into this one, removing the other one.
| Way | ||
nullify():void
| Way | ||
prependNode(node:Node, performAction:Function):uint
| Way | ||
remove(performAction:Function):void
| Way | ||
![]() |
removeFromParents(performAction:Function):void
| Entity | |
removeNode(node:Node, performAction:Function):void
| Way | ||
removeNodeByIndex(index:uint, performAction:Function, fireEvent:Boolean = true):void
| Way | ||
![]() |
removeParent(parent:Entity):void
Remove parent link.
| Entity | |
![]() |
renameTag(oldKey:String, newKey:String, performAction:Function):void
Change oldKey=[value] to newKey=[value], with optional undoability.
| Entity | |
![]() |
renumber(newID:Number, newVersion:uint):void
Assign a new ID and version.
| Entity | |
![]() |
resume():void
Resume redrawing of the object
| Entity | |
reverseNodes(performAction:Function):void
| Way | ||
![]() |
Compare tags between two entities.
| Entity | |
![]() |
setDeletedState(isDeleted:Boolean):void
Mark entity as deleted.
| Entity | |
![]() |
setStatus(s:String):void
Change entity status.
| Entity | |
![]() |
setTag(key:String, value:String, performAction:Function):void
Set key=value, with optional undoability.
| Entity | |
sliceNodes(start:int, end:int):Array
| Way | ||
![]() |
suspend():void
Temporarily prevent redrawing of the object.
| Entity | |
![]() |
tagIs(key:String, value:String):Boolean
| Entity | |
toString():String
| Way | ||
update(version:uint, tags:Object, loaded:Boolean, parentsLoaded:Boolean, nodes:Array, uid:Number, timestamp:String = null):void
| Way | ||
![]() |
updateEntityProperties(version:uint, tags:Object, loaded:Boolean, parentsLoaded:Boolean, uid:Number, timestamp:String):void
Set a bunch of properties in one hit.
| Entity | |
within(left:Number, right:Number, top:Number, bottom:Number):Boolean
| Way |
angle | property |
angle:Number
[read-only]Implementation
public function get angle():Number
clockwise | property |
clockwise:Boolean
[read-only]Implementation
public function get clockwise():Boolean
entity_type | property |
public static var entity_type:String = "way"
length | property |
length:uint
[read-only]Implementation
public function get length():uint
Way | () | constructor |
public function Way(connection:Connection, id:Number, version:uint, tags:Object, loaded:Boolean, nodes:Array, uid:Number, timestamp:String = null)
Parameters
connection:Connection |
|
id:Number |
|
version:uint |
|
tags:Object |
|
loaded:Boolean |
|
nodes:Array |
|
uid:Number |
|
timestamp:String (default = null )
|
addToEnd | () | method |
public function addToEnd(topos:int, node:Node, performAction:Function):void
Parameters
topos:int |
|
node:Node |
|
performAction:Function |
appendNode | () | method |
public function appendNode(node:Node, performAction:Function):uint
Parameters
node:Node |
|
performAction:Function |
uint |
deleteNodesFrom | () | method |
public function deleteNodesFrom(start:int, performAction:Function):void
Parameters
start:int |
|
performAction:Function |
endsWith | () | method |
expandBbox | () | method |
getFirstNode | () | method |
getLastNode | () | method |
getNextNode | () | method |
public function getNextNode(node:Node):Node
Given one node, return the next in sequence, cycling around a loop if necessary.
Parametersnode:Node |
Node |
getNode | () | method |
getPJunctionNodeIndex | () | method |
public function getPJunctionNodeIndex():uint
Given a P-shaped way, return the index of midway node that one end connects back to.
Returnsuint |
getPrevNode | () | method |
public function getPrevNode(node:Node):Node
Given one node, return the previous, cycling around a loop if necessary.
Parametersnode:Node |
Node |
getType | () | method |
public override function getType():String
Returns
String |
hasLockedNodes | () | method |
public function hasLockedNodes():Boolean
Returns
Boolean |
hasOnceOnly | () | method |
indexOfNode | () | method |
insertNode | () | method |
public function insertNode(index:uint, node:Node, performAction:Function):void
Parameters
index:uint |
|
node:Node |
|
performAction:Function |
insertNodeAtClosestPosition | () | method |
public function insertNodeAtClosestPosition(newNode:Node, isSnap:Boolean, performAction:Function):int
Finds the 1st way segment which intersects the projected coordinate and adds the node to that segment. If snap is specified then the node is moved to exactly bisect the segment.
ParametersnewNode:Node |
|
isSnap:Boolean |
|
performAction:Function |
int |
intersects | () | method |
public function intersects(left:Number, right:Number, top:Number, bottom:Number):Boolean
Parameters
left:Number |
|
right:Number |
|
top:Number |
|
bottom:Number |
Boolean |
isArea | () | method |
public function isArea():Boolean
Returns
Boolean |
isEmpty | () | method |
public override function isEmpty():Boolean
Returns
Boolean |
isPShape | () | method |
public function isPShape():Boolean
Whether the way has a loop that joins back midway along its length
ReturnsBoolean |
isType | () | method |
public override function isType(str:String):Boolean
Parameters
str:String |
Boolean |
mergeWith | () | method |
public function mergeWith(way:Way, topos:int, frompos:int, performAction:Function):void
Merges another way into this one, removing the other one.
Parametersway:Way |
|
topos:int |
|
frompos:int |
|
performAction:Function |
nullify | () | method |
public override function nullify():void
prependNode | () | method |
public function prependNode(node:Node, performAction:Function):uint
Parameters
node:Node |
|
performAction:Function |
uint |
remove | () | method |
public override function remove(performAction:Function):void
Parameters
performAction:Function |
removeNode | () | method |
public function removeNode(node:Node, performAction:Function):void
Parameters
node:Node |
|
performAction:Function |
removeNodeByIndex | () | method |
public function removeNodeByIndex(index:uint, performAction:Function, fireEvent:Boolean = true):void
Parameters
index:uint |
|
performAction:Function |
|
fireEvent:Boolean (default = true )
|
reverseNodes | () | method |
public function reverseNodes(performAction:Function):void
Parameters
performAction:Function |
sliceNodes | () | method |
public function sliceNodes(start:int, end:int):Array
Parameters
start:int |
|
end:int |
Array |
toString | () | method |
public override function toString():String
Returns
String |
update | () | method |
public function update(version:uint, tags:Object, loaded:Boolean, parentsLoaded:Boolean, nodes:Array, uid:Number, timestamp:String = null):void
Parameters
version:uint |
|
tags:Object |
|
loaded:Boolean |
|
parentsLoaded:Boolean |
|
nodes:Array |
|
uid:Number |
|
timestamp:String (default = null )
|
within | () | method |
public override function within(left:Number, right:Number, top:Number, bottom:Number):Boolean
Parameters
left:Number |
|
right:Number |
|
top:Number |
|
bottom:Number |
Boolean |