Click or drag to resize

Location Class

Class describing a location in a network. ,'s are not allowed in the ID.
Inheritance Hierarchy

Namespace:  DHI.Mike1D.Generic
Assembly:  DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 19.0.0.0 (11.1.1.1111)
Syntax
public class Location : ILocation, IComparable, 
	ICloneable, IEquatable<ILocation>, IExtensibleDataObject

The Location type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyChainage
Chainage. Unit: [m]
Public propertyExtensionData
Data from an extended DataContract not recognized here
Public propertyID
Identification name
Top
Methods
  NameDescription
Public methodStatic memberCalculateRatio
Calculate the ratio of the inter Location position in between the start (sc) and end (ec) locations, such that
v = (1-ratio)*v_sc + ratio*v_ec
If inter is not in between sc and ec, ratio can be negative or larger than one.
Public methodClone
Returns a deep clone of this object
Public methodCompareTo
Compares two ILocations. First id is compared, secondly chainage. This can be used to sort the ILocations, first alphabetically, secondly by chainage.
Public methodStatic memberCreateSpanAroundLocation
Create a LocationSpan around the given location, that goes startDist up and endDist down from the chainage of the location. Span will go from location.Chainage-startDist to location.Chainage+endDist.
Public methodEquals(Object)
Determines whether the specified Object is equal to the current Object.
(Overrides ObjectEquals(Object).)
Public methodEquals(ILocation)
Indicates whether the current object is equal to another object of the same type. The Location chainage must be within LOCATION_EQUAL_TOLERANCE.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFromString
This method is made to get back from a Location.ToString(). It is therefor very important that any changes in ToString are reflected in this method.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Overrides ObjectGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIDCompareTo
Compare the ID with the others ID.
Public methodIDEquals(ILocation)
Check if the ID equals the others ID
Public methodIDEquals(ILocationSpan)
Check if the ID equals the others ID, case ignored (culture invariant)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
This method os important when creating a node id from a location. It is important to act in _chainage == Constants.DELETEVALUE since this is how rivers are connected to pipes.
(Overrides ObjectToString.)
Public methodToStringInUserUnits
Gives the textual representation of the string in user units.
Top
Fields
  NameDescription
Protected field_chainage
Position along the reach.
Protected field_id
Identification name
Top
Extension Methods
  NameDescription
Public Extension MethodChainageAsDiagnosticsValue
Get chainage as DiagnosticsValue (includes unit)
(Defined by GenericExtensions.)
Public Extension MethodChainageEquals(Double)Overloaded.
Returns true if the chainage equals, withing LOCATION_EQUAL_TOLERANCE
(Defined by GenericExtensions.)
Public Extension MethodChainageEquals(Double, Double)Overloaded.
Returns true if the chainage equals, withing tolerance
(Defined by GenericExtensions.)
Top
See Also