Table of Contents

ThinkGeo.MapSuite.Routing.RtgRoutingSource

Note: The page was created before Map Suite 10. Map Suite 10.0 organized many classes into new namespaces and assemblies as well as had a few minor breaks in compatibility. The majority of previously built code should work without modification assuming the new namespaces are added. For guidance on upgrading your existing code, please check out MapSuite 10 Upgrade Guide.

This class represents a RoutingSource based on an .rtg file.

Inheritance Hierarchy

Members Summary

Public Constructors

RtgRoutingSource()

Remarks
Parameters

RtgRoutingSource(String)

Remarks
Parameters

Protected Constructors

Public Methods

GetRouteSegmentCount()

Remarks
Return Value
Parameters

Open()

Remarks
Return Value
Parameters

Close()

Remarks
Return Value
Parameters

GetRouteSegmentByFeatureId(String)

Remarks
Return Value
Parameters

GetRouteSegmentsNearestTo(BaseShape,FeatureSource,GeographyUnit,Int32)

Remarks
Return Value
Parameters

BeginTransaction()

Remarks
Return Value
Parameters

CommitTransaction()

Remarks
Return Value
Parameters

RollbackTransaction()

Remarks
Return Value
Parameters

AddRouteSegment(RouteSegment)

Remarks
Return Value
Parameters

UpdateRouteSegment(RouteSegment)

Remarks
Return Value
Parameters

DeleteRouteSegment(String)

Remarks
Return Value
Parameters

ToString()

Remarks
Return Value
Parameters

Equals(Object)

Remarks
Return Value
Parameters

GetHashCode()

Remarks
Return Value
Parameters

GetType()

Remarks
Return Value
Parameters

GenerateRoutingData(String,FeatureSource)

Remarks
Return Value
Parameters

GenerateRoutingData(String,FeatureSource,BuildRoutingDataMode)

Remarks
Return Value
Parameters

GenerateRoutingData(String,FeatureSource,BuildRoutingDataMode,String)

Remarks
Return Value
Parameters

GenerateRoutingData(String,FeatureSource,BuildRoutingDataMode,GeographyUnit,DistanceUnit)

Remarks
Return Value
Parameters

GenerateRoutingData(String,String,BuildRoutingDataMode)

Remarks
Return Value
Parameters

GenerateRoutingData(String,String,String,BuildRoutingDataMode)

Remarks
Return Value
Parameters

GenerateRoutingData(String,String,String,BuildRoutingDataMode,GeographyUnit,DistanceUnit)

Remarks
Return Value
Parameters

GenerateRoutableShapeFile(String,String,OverwriteMode)

Remarks
Return Value
Parameters

Protected Methods

GetRouteSegmentByFeatureIdCore(String)

Remarks
Return Value
Parameters

OpenCore()

Remarks
Return Value
Parameters

OnStreamLoading(StreamLoadingEventArgs)

Remarks
Return Value
Parameters

CloseCore()

Remarks
Return Value
Parameters

BeginTransactionCore()

Remarks
Return Value
Parameters

CommitTransactionCore(RoutingTransactionBuffer)

Remarks
Return Value
Parameters

RollbackTransactionCore()

Remarks
Return Value
Parameters

GetRouteSegmentCountCore()

Remarks
Return Value
Parameters

GetRouteSegmentsNearestToCore(BaseShape,FeatureSource,GeographyUnit,Int32)

Remarks
Return Value
Parameters

OnCommittingTransaction(RoutingCommittingTransactionEventArgs)

Remarks
Return Value
Parameters

OnCommittedTransaction(RoutingCommittedTransactionEventArgs)

Remarks
Return Value
Parameters

Finalize()

Remarks
Return Value
Parameters

MemberwiseClone()

Remarks
Return Value
Parameters

OnBuildingRoutingData(BuildingRoutingDataRtgRoutingSourceEventArgs)

Remarks
Return Value
Parameters

OnGeneratingRoutableShapefile(GeneratingRoutableShapeFileRoutingSourceEventArgs)

Remarks
Return Value
Parameters

vhQ=(ShapeFileFeatureSource,String,OverwriteMode)

Remarks
Return Value
Parameters

Public Properties

RtgFilePathName

This property returns the path and file name of the routing file you want to use.

Remarks

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

Gets or sets a value indicating whether re

Remarks

For the most updated Info for this topic, please check it here:http://wiki.thinkgeo.com/wiki/ThinkGeo.MapSuite.Routing.RtgRoutingSource#ReadEndPoints

Return Value

CachedIndex

Gets or sets a value indicating whether we should cache the index records to improve the performance.

Remarks

For the most updated Info for this topic, please check it here:http://wiki.thinkgeo.com/wiki/ThinkGeo.MapSuite.Routing.RtgRoutingSource#CachedIndex

Return Value

GeographyUnit

N/A

Remarks

For the most updated Info for this topic, please check it here:http://wiki.thinkgeo.com/wiki/ThinkGeo.MapSuite.Routing.RtgRoutingSource#GenerateRoutingData.28String.2C_String.2C_String.2C_BuildRoutingDataMode.2C_GeographyUnit.2C_DistanceUnit.29

Return Value

IsOpen

N/A

Remarks

For the most updated Info for this topic, please check it here:http://wiki.thinkgeo.com/wiki/ThinkGeo.MapSuite.Routing.RtgRoutingSource#IsOpen

Return Value

AdjunctiveInformation

Gets a value that represents the adjunctive information.

Remarks

When you build the routing data by calling GenerateRoutingData, you can pass in the adjunctive information. For example, you can store the company or project version information in it.

Return Value

IsEditable

This property returns whether the RoutingSource allows edits or is read-only.

Remarks

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

N/A

Remarks

For the most updated Info for this topic, please check it here:http://wiki.thinkgeo.com/wiki/ThinkGeo.MapSuite.Routing.RtgRoutingSource#Version

Return Value

IsInTransaction

This property returns true if the RoutingSource is in a transaction and false if it is not.

Remarks

To enter a transaction, you must first call the BeginTransaction method of the RoutingSource. It is possible that some RoutingSource are read-only and do not allow edits. To end a transaction, you must either call CommitTransaction or RollbackTransaction.

Return Value

Protected Properties

kRQ=

N/A

Remarks

N/A

Return Value

Public Events

BuildingRoutingData This event is called during building of routing data.

Remarks

This event is called during building of routing data. It will be called many times during the build.

Event Arguments:BuildingRoutingDataRtgRoutingSourceEventArgs

GeneratingRoutableShapeFile This event is called during generating the routable shapefile from raw files.

Remarks

For the most updated Info for this topic, please check it here:http://wiki.thinkgeo.com/wiki/ThinkGeo.MapSuite.Routing.RtgRoutingSource#OnGeneratingRoutableShapefile.28GeneratingRoutableShapeFileRoutingSourceEventArgs.29

Event Arguments:GeneratingRoutableShapeFileRoutingSourceEventArgs

StreamLoading This event allows you to pass in your own stream to represent the Routing Index file.

Remarks

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 This event is raised after the CommitTransaction method is called, but before the CommitTransactionCore is called. This allows you access to the TransactionBuffer before the transaction is committed. It also allows you to cancel the pending commit of the transaction.

Remarks

This event is raised before the CommitTransactionCore is called and allows you access to the TransactionBuffer before the transaction is committed. It also allows you to cancel the pending transaction. The TransactionBuffer is the object that stores all of the pending transactions and is accessible through this event to allow you to either add, remove or modify transactions. In the event that you cancel the CommitTransaction method, the transaction remains intact and you will still be editing. This makes it a nice place to possibly check for connectivity before the TransactionCore code is run, which is where the records are actually committed. Calling the RollBackTransaction method is the only way to permanently cancel a pending transaction without committing it.

Event Arguments:RoutingCommittingTransactionEventArgs

CommittedTransaction This event is raised after the CommitTransaction and the CommitTransactionCore are called and allows you access to the TransactionBuffer and the TransactionResults object before CommitTransaction method is returned.

Remarks

This event is raised after the CommitTransactionCore is called and allows you access to the TransactionBuffer and the TransactionResults object before CommitTransaction method is returned. With this event, you can analyse the results of the transaction and do any cleanup code necessary. In the event some of the records did not commit, you can handle those items here. The TransactionResults object is passed out of the CommitTransaction method so you could analyze it then; however, this is the only place where you have access to both the TransactionResults object and the TransactionBuffer object at the same time. These are useful together to try and determine what went wrong and possibly try and re-commit them. At the time of this event you will technically be out of the current transaction.

Event Arguments:RoutingCommittedTransactionEventArgs