Properties
ReferencedNodes
#Gets a hash set of all the nodes currently being referenced by at least one way.
Methods
AddToRhinoDocument
#Add the entire map to a rhino document.
Parameters:
| document (RhinoDoc) | Document to populate. |
| mapping (OsmMapping) | Mapping function or null to use 1:1 mapping. |
| settings (OsmSettings) | Insertion settings. |
Returns: Array of Rhino object IDs that were added.
FindNode
#Find the node with the specified id.
Parameters:
| id (long) | Identifier to search for. |
Returns: Node with given id or null if no such node can be found.
FindNodesByTag
#Find all nodes that pass a custom test.
Parameters:
| filter (OsmTag) | Filter tag (optionally with wildcard characters). |
Returns: Enumeration of nodes.
FindWay
#Find the way with the specified id.
Parameters:
| id (long) | Identifier to search for. |
Returns: Way with given id or null if no such way can be found.
FindWaysByTag
#Find all nodes that pass a custom test.
Parameters:
| filter (OsmTag) | Filter tag (optionally with wildcard characters). |
Returns: Enumeration of ways.
GetWayGeometry
#Get the actual geometry of a way.
Parameters:
| way (OsmWay) | Way to parse. |
| mapping (OsmMapping) | Mapping function or null for 1:1 mapping. |
Returns: Polyline geometry.
GetWayGeometry
#Get the actual geometry of a way.
Parameters:
| way (OsmWay) | Way to parse. |
Returns: Polyline geometry.
GetWayLength
#Compute the length (in lon-lat space) of a way.
Parameters:
| way (OsmWay) | Way to measure. |
Returns: Length of way.
MergeWays
#Merge ways into single ways.
Parameters:
| retainDirection (bool) | If true, ways will not be reversed in order to be merged. |
| mergeParent (OsmWayMergeParent) | Determines which way comes out 'on top' when two ways merge. |
| combineAllTags (bool) | If true, tags will be copied from all ways, not just the parent way. |
| exemptIds (HashSet<long>) | Optional collection of exempt way ids to not be merged. May be null. |
Returns: Number of ways that disappeared.
ParseFile
#Parse an OpenStreetMap xml file.
Parameters:
| file (string) | File. |
| filter (OsmSettings) | Optional filter. |
| messages (out List<Message>) | Array of messages encountered during parsing. |
Returns: Loaded map.
ParseFile
#Parse an OpenStreetMap xml document. If the document contains more than one osm node, only the first one will be loaded.
Parameters:
| doc (XmlDocument) | Document. |
| filter (OsmSettings) | Optional filter. |
| messages (out List<Message>) | Array of messages encountered during parsing. |
Returns: Loaded map.
RemoveTaggedWays
#Remove all ways that have a matching tag.
RemoveTags
#Remove all specific tags from nodes and ways.
Parameters:
| tags (IEnumerable<OsmTag>) |
Returns: Number of tags removed.
RemoveTags
#Remove all specific tags from nodes and ways.
Parameters:
| tagNames (IEnumerable<string>) | Tag names (may include wilcard characters). |
Returns: Number of tags removed.
RemoveUnusedNodes
#Remove all nodes that are not used by any ways.
Parameters:
| retainNodesWithTags (bool) | If true, nodes with at least one tag will not be removed. |
Returns: Number of nodes removed.
RemoveWays
#Remove a set of ways from this file.
Parameters:
| wayIds (IEnumerable<long>) | Ways to remove. |
| removeOrphanedNodes (bool) | If true, all nodes currently orphaned will also be removed. |
RetainTaggedWays
#Retain all ways that have a matching tag.
ToString
#Get a short description of this file.
Returns: String description.
Overrides: Object.ToString