ThinkGeo.MapSuite.Routing.RtgRoutingSource
Inheritance Hierarchy
Members Summary
Public Constructors
RtgRoutingSource()
Parameters
RtgRoutingSource(String)
Parameters
Protected Constructors
Public Methods
GetRouteSegmentCount()
Return Value
Type:Int32
Description:N/A
Parameters
Open()
Return Value
Type:Void
Description:N/A
Parameters
Close()
Return Value
Type:Void
Description:N/A
Parameters
GetRouteSegmentByFeatureId(String)
Return Value
Parameters
featureId
Type:String
Description:N/A
GetRouteSegmentsNearestTo(BaseShape,FeatureSource,GeographyUnit,Int32)
Return Value
Parameters
numberOfItemsToFind
Type:Int32
Description:N/A
BeginTransaction()
Return Value
Type:Void
Description:N/A
Parameters
CommitTransaction()
Return Value
Parameters
RollbackTransaction()
Return Value
Type:Void
Description:N/A
Parameters
AddRouteSegment(RouteSegment)
Return Value
Type:Void
Description:N/A
Parameters
UpdateRouteSegment(RouteSegment)
Return Value
Type:Void
Description:N/A
Parameters
DeleteRouteSegment(String)
Return Value
Type:Void
Description:N/A
Parameters
id
Type:String
Description:N/A
ToString()
Return Value
Type:String
Description:N/A
Parameters
Equals(Object)
Return Value
Type:Boolean
Description:N/A
Parameters
obj
Type:Object
Description:N/A
GetHashCode()
Return Value
Type:Int32
Description:N/A
Parameters
GetType()
Return Value
Type:Type
Description:N/A
Parameters
GenerateRoutingData(String,FeatureSource)
Return Value
Type:Void
Description:None
Parameters
GenerateRoutingData(String,FeatureSource,BuildRoutingDataMode)
Return Value
Type:Void
Description:None
Parameters
GenerateRoutingData(String,FeatureSource,BuildRoutingDataMode,String)
Return Value
Type:Void
Description:None
Parameters
GenerateRoutingData(String,FeatureSource,BuildRoutingDataMode,GeographyUnit,DistanceUnit)
Return Value
Type:Void
Description:None
Parameters
rtgFilePathName
Type:String
Description:N/A
GenerateRoutingData(String,String,BuildRoutingDataMode)
Return Value
Type:Void
Description:None
Parameters
sourceShapeFilePathName
Type:String
Description:N/A
GenerateRoutingData(String,String,String,BuildRoutingDataMode)
Return Value
Type:Void
Description:None
Parameters
rtgFilePathName
Type:String
Description:N/A
sourceShapeFilePathName
Type:String
Description:N/A
GenerateRoutingData(String,String,String,BuildRoutingDataMode,GeographyUnit,DistanceUnit)
Return Value
Type:Void
Description:None
Parameters
rtgFilePathName
Type:String
Description:N/A
sourceShapeFilePathName
Type:String
Description:N/A
GenerateRoutingData(String,String,String,BuildRoutingDataMode,GeographyUnit,DistanceUnit,Double)
Return Value
Type:Void
Description:N/A
Parameters
rtgFilePathName
Type:String
Description:N/A
sourceShapeFilePathName
Type:String
Description:N/A
toleranceInMeter
Type:Double
Description:N/A
GenerateRoutableShapeFile(String,String,OverwriteMode)
Return Value
Type:Void
Description:N/A
Parameters
GenerateRoutableShapeFile(String,String,OverwriteMode,GeographyUnit,Double)
Return Value
Type:Void
Description:N/A
Parameters
shapefilePathName
Type:String
Description:N/A
toleranceInMeter
Type:Double
Description:N/A
Protected Methods
GetRouteSegmentByFeatureIdCore(String)
Return Value
Parameters
OpenCore()
This protected method is called from the concrete public method Open. The Open method plays an important role, as it is responsible for initializing the RoutingSource. Most methods on the RoutingSource will throw an exception if the state of the RoutingSource is not opened. When the map draws each layer, it will open the RoutingSource as one of its first steps, then after it is finished drawing with that layer it will close it. In this way we are sure to release all resources used by the RoutingSource. This implementation of OpenCore opens the .rtg file and .rtx file.
Return Value
Type:Void
Description:None
Parameters
OnStreamLoading(StreamLoadingEventArgs)
Return Value
Type:Void
Description:None
Parameters
CloseCore()
This method is the concrete wrapper for the abstract method CloseCore. The Close method plays an important role in the life cycle of the RoutingSource. It may be called after drawing to release any memory and other resources that were allocated since the Open method was called. If you override the Core version of this method, it is recommended that you take the following things into account: This method may be called multiple times, so we suggest you write the method so that that a call to a closed RoutingSource is ignored and does not generate an error. We also suggest that in the Close you free all resources that have been opened. Remember that the object will not be destroyed, but will be re-opened possibly in the near future. This implementation of CloseCore closes the .rtg file and .rtx file.
Return Value
Type:Void
Description:None
Parameters
BeginTransactionCore()
Return Value
Type:Void
Description:N/A
Parameters
CommitTransactionCore(RoutingTransactionBuffer)
Return Value
Parameters
RollbackTransactionCore()
Return Value
Type:Void
Description:N/A
Parameters
GetRouteSegmentCountCore()
This protected method is called from the concrete public method GetCount. It does not take into account any transaction activity, as this is the responsibility of the concrete public method GetRouteSegmentCount. This way, as a developer, if you choose to override this method you do not have to consider transactions at all. The implementation of GetRouteSegmentCountCore returns the count from the .rtg file.
Return Value
Parameters
GetRouteSegmentsNearestToCore(BaseShape,FeatureSource,GeographyUnit,Int32)
This method returns a user defined number of Route Segments that are closest to the TargetShape, and it is called in the GetRouteSegmentsNearestTo method, you need to implement it if you define a custome RoutingSource.It is important to note that the TargetShape and the FeatureSource must use the same unit, such as feet or meters. If they do not, then the results will not be predictable or correct.
Return Value
Parameters
unitOfFeatureSource
-
Description:This parameter is the unit of measurement that the TargetShape and the FeatureSource are in, such as feet, meters, etc.
OnCommittingTransaction(RoutingCommittingTransactionEventArgs)
Return Value
Type:Void
Description:N/A
Parameters
OnCommittedTransaction(RoutingCommittedTransactionEventArgs)
Return Value
Type:Void
Description:N/A
Parameters
Finalize()
Return Value
Type:Void
Description:N/A
Parameters
MemberwiseClone()
Return Value
Type:Object
Description:N/A
Parameters
OnBuildingRoutingData(BuildingRoutingDataRtgRoutingSourceEventArgs)
Return Value
Type:Void
Description:N/A
Parameters
OnGeneratingRoutableShapefile(GeneratingRoutableShapeFileRoutingSourceEventArgs)
Return Value
Type:Void
Description:N/A
Parameters
GenerateRoutableShapeFile(ShapeFileFeatureSource,String,OverwriteMode,GeographyUnit,Double)
Return Value
Type:Void
Description:N/A
Parameters
toleranceInMeter
Type:Double
Description:N/A
Public Properties
RtgFilePathName
When you specify the path and file name it should be in the correct format as such; however, the file does not need to actually exist on the file system. This allows us to accept streams supplied by the developer at runtime. If you choose to provide a file that exists then we will attempt to use it. If we cannot find the file then we will raise the SteamLoading event and allow you to supply the stream. For example, you can pass in “C:\NotARealPath\File1.rtg” which does not exist on the file system. When we raise the event for you to supply a stream, we will pass to you the path and file name so that you can differentiate the files.
Return Value
ReadEndPoints
Return Value
CachedIndex
Return Value
GeographyUnit
Return Value
IsOpen
Return Value
AdjunctiveInformation
Return Value
IsEditable
This property is useful to check if a specific RoutingSource accepts editing. If you call BeginTransaction and this property is false, then an exception will be raised. For developers who are creating or extending a RoutingSource, it is expected that you override this virtual method if the new RoutingSource you are creating allows edits.
Return Value
Version
Return Value
IsInTransaction
Return Value
Protected Properties
TransactionBuffer
Return Value
Public Events
BuildingRoutingData
If you wish, you can pass in your own stream to represent the Routing Index file. The stream can come from a variety of places, including isolated storage, a compressed file, or an encrypted stream. When the file is finished with the stream it will dispose of it, so be sure to keep this in mind when passing the stream in. If you do not pass in an alternate stream, the class will attempt to load the file from the file system using the PathFileName property.
Event Arguments:StreamLoadingEventArgs
CommittingTransaction