User Tools

Site Tools


thinkgeo.mapsuite.routing.rtgroutingsource

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

  • System.Object
    • ThinkGeo.MapSuite.Routing.RoutingSource
      • ThinkGeo.MapSuite.Routing.RtgRoutingSource

Members Summary

Public Constructors

RtgRoutingSource()

  • This is the class constructor.
Remarks
  • For the most updated Info for this topic, please check it here:http:wiki.thinkgeo.com/wiki/ThinkGeo.MapSuite.Routing.RtgRoutingSource#RtgRoutingSource.28.29
Parameters

RtgRoutingSource(String)

  • This is the class constructor.
Remarks
  • For the most updated Info for this topic, please check it here:http:wiki.thinkgeo.com/wiki/ThinkGeo.MapSuite.Routing.RtgRoutingSource#RtgRoutingSource.28String.29
Parameters
  • rtgFilePathName
    • Type:String
    • Description:This parameter represents the path and file name of the .rtg file. This file stores routing source information.

Protected Constructors

Public Methods

GetRouteSegmentCount()

  • This method returns the count of the number of records in this RoutingSource.
Remarks
  • This method is the concrete wrapper for the virtual method GetRouteSegmentCountCore. It will return whatever is returned by the GetRouteSegmentCountCore method, along with any additions or subtractions made if you are in a transaction and that transaction is configured to be live. To determine what the default implementation of the virtual GetRouteSegmentCountCore method is, please see the documentation for it. The default implementation of GetRouteSegmentCountCore returns 0. We strongly recommend that you provide your own implementation for this method.
Return Value
  • Type:Int32
  • Description:This method returns the count of the number of records in this RoutingSource.
Parameters

Open()

  • This method opens the RoutingSource so that it is initialized and ready to use.
Remarks
  • This method is the concrete wrapper for the abstract method OpenCore. 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. When implementing this method, consider opening files for file-based sources, connecting to databases in the database-based sources and so on. You will get a chance to close these in the Close method of the RoutingSource. As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.
Return Value
  • Type:Void
  • Description:N/A
Parameters

Close()

  • This method closes the RoutingSource and releases any resources it was using.
Remarks
  • 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 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.
Return Value
  • Type:Void
  • Description:N/A
Parameters

GetRouteSegmentByFeatureId(String)

  • This method returns a RouteSegment by providing its ID in the RoutingSource.
Remarks
  • For the most updated Info for this topic, please check it here:http:wiki.thinkgeo.com/wiki/ThinkGeo.MapSuite.Routing.RtgRoutingSource#GetRouteSegmentByFeatureId.28String.29
Return Value
  • Description:A RouteSegment based on a specific ID.
Parameters
  • featureId
    • Type:String
    • Description:This parameter is the feature ID that uniquely identifies it in the RoutingSource.

GetRouteSegmentsNearestTo(BaseShape,FeatureSource,GeographyUnit,Int32)

  • This method returns a user defined number of Route Segments that are closest to the TargetShape.
Remarks
  • This method returns a user defined number of Route Segments that are closest to the TargetShape. 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
  • Type:Collection<RouteSegment>
  • Description:This method returns a user defined number of Route Segments that are closest to the TargetShape.
Parameters
  • targetShape
    • Type:BaseShape
    • Description:This parameter is the shape you want to find Route Segments close to.
  • featureSource
    • Description:This parameter defines the FeatureSource that is used to get information of RouteSegments
  • unitOfFeatureSource
    • Description:This parameter is the unit of measurement that the TargetShape and the FeatureSource are in, such as feet, meters, etc.
  • numberOfItemsToFind
    • Type:Int32
    • Description:This parameter defines how many close Route Segments to find around the TargetShape.

BeginTransaction()

  • This method starts a new transaction if the RoutingSource allows editing
Remarks
  • This method is used to start a transaction, assuming that the RoutingSource allows editing. There are some additional prerequisites to beginning a transaction, such as ensuring that a transaction is not already in progress. You must also be sure that the RoutingSource has been opened. The Transaction System You start by calling BeginTransaction. This allocates a collection of in-memory change buffers that are used to store changes until you commit the transaction. So, for example, when you call the Add, Delete or Update method, the changes to the RouteSegment are stored in memory only. If for any reason you choose to abandon the transaction, you can call RollbackTransaction at any time and the in-memory buffer will be deleted and the changes will be lost. When you are ready to commit the transaction, you call CommitTransaction and the collections of changes are then passed to the CommitTransactionCore method and the implementer of the specific RoutingSource is responsible for integrating your changes into the underlying RoutingSource.
Return Value
  • Type:Void
  • Description:N/A
Parameters

CommitTransaction()

  • This method will commit the existing transaction to its underlying source of data.
Remarks
  • This method is the concrete wrapper for the virtual method CommitTransactionCore. As this is the concrete version, the real work is done in the Core version of the method. It will commit the existing transaction to its underlying source of data. It will then pass back the results of the commit, including any error(s) received. Lastly, it will free up the internal memory cache of any RoutSegments added, updated or deleted. You will need to ensure that you have started a transaction by calling BeginTransaction.
Return Value
  • Description:The returned decimalDegreesValue of this method is a TransactionResult class, which gives you the status of the transaction you just committed. It includes how many of the updates, adds, and deletes were successful and any errors that were encountered during the committing of the transaction.
Parameters

RollbackTransaction()

  • This method will cancel an existing transaction. It will free up the internal memory cache of any InternalFeatures added, updated or deleted.
Remarks
  • This method will cancel an existing transaction. It will free up the internal memory cache of any RoutingSegments added, updated or deleted. You will need to ensure that you have started a transaction by calling BeginTransaction. The Transaction System You start by calling BeginTransaction. This allocates a collection of in-memory change buffers that are used to store changes until you commit the transaction. So, for example, when you call the Add, Delete or Update method, the changes to the RouteSegment are stored in memory only. If for any reason you choose to abandon the transaction, you can call RollbackTransaction at any time and the in-memory buffer will be deleted and the changes will be lost. When you are ready to commit the transaction, you call CommitTransaction and the collections of changes are then passed to the CommitTransactionCore method and the implementer of the specific RoutingSource is responsible for integrating your changes into the underlying RoutingSource.
Return Value
  • Type:Void
  • Description:N/A
Parameters

AddRouteSegment(RouteSegment)

  • This method adds a new RouteSegment to an existing transaction.
Remarks
  • This method adds a new RouteSegment to an existing transaction. You will need to ensure that you have started a transaction by calling BeginTransaction. The Transaction System You start by calling BeginTransaction. This allocates a collection of in-memory change buffers that are used to store changes until you commit the transaction. So, for example, when you call the Add, Delete or Update method, the changes to the RouteSegment are stored in memory only. If for any reason you choose to abandon the transaction, you can call RollbackTransaction at any time and the in-memory buffer will be deleted and the changes will be lost. When you are ready to commit the transaction, you call CommitTransaction and the collections of changes are then passed to the CommitTransactionCore method and the implementer of the specific RoutingSource is responsible for integrating your changes into the underlying RoutingSource.
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • routeSegment
    • Description:This parameter represents the routeSegment that will be added to the transaction.

UpdateRouteSegment(RouteSegment)

  • This method deletes a RouteSegment from an existing transaction.
Remarks
  • This method update a RouteSegment to an existing transaction. You will need to ensure that you have started a transaction by calling BeginTransaction. The Transaction System You start by calling BeginTransaction. This allocates a collection of in-memory change buffers that are used to store changes until you commit the transaction. So, for example, when you call the Add, Delete or Update method, the changes to the RouteSegment are stored in memory only. If for any reason you choose to abandon the transaction, you can call RollbackTransaction at any time and the in-memory buffer will be deleted and the changes will be lost. When you are ready to commit the transaction, you call CommitTransaction and the collections of changes are then passed to the CommitTransactionCore method and the implementer of the specific RoutingSource is responsible for integrating your changes into the underlying RoutingSource.
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • routeSegment
    • Description:The RouteSegment that will be updated to an existing transaction

DeleteRouteSegment(String)

  • This method deletes a RouteSegment from an existing transaction.
Remarks
  • This method delete a RouteSegment from an existing transaction. You will need to ensure that you have started a transaction by calling BeginTransaction. The Transaction System You start by calling BeginTransaction. This allocates a collection of in-memory change buffers that are used to store changes until you commit the transaction. So, for example, when you call the Add, Delete or Update method, the changes to the RouteSegment are stored in memory only. If for any reason you choose to abandon the transaction, you can call RollbackTransaction at any time and the in-memory buffer will be deleted and the changes will be lost. When you are ready to commit the transaction, you call CommitTransaction and the collections of changes are then passed to the CommitTransactionCore method and the implementer of the specific RoutingSource is responsible for integrating your changes into the underlying RoutingSource.
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • id
    • Type:String
    • Description:This string is the fature Id of the RouteSegment in the RoutingSource you wish to delete.

ToString()

  • N/A
Remarks
  • For the most updated Info for this topic, please check it here:http:wiki.thinkgeo.com/wiki/ThinkGeo.MapSuite.Routing.RtgRoutingSource#ToString.28.29
Return Value
  • Type:String
  • Description:N/A
Parameters

Equals(Object)

  • N/A
Remarks
  • For the most updated Info for this topic, please check it here:http:wiki.thinkgeo.com/wiki/ThinkGeo.MapSuite.Routing.RtgRoutingSource#Equals.28Object.29
Return Value
  • Type:Boolean
  • Description:N/A
Parameters
  • obj
    • Type:Object
    • Description:N/A

GetHashCode()

  • N/A
Remarks
  • For the most updated Info for this topic, please check it here:http:wiki.thinkgeo.com/wiki/ThinkGeo.MapSuite.Routing.RtgRoutingSource#GetHashCode.28.29
Return Value
  • Type:Int32
  • Description:N/A
Parameters

GetType()

  • N/A
Remarks
  • For the most updated Info for this topic, please check it here:http:wiki.thinkgeo.com/wiki/ThinkGeo.MapSuite.Routing.RtgRoutingSource#GetType.28.29
Return Value
  • Type:Type
  • Description:N/A
Parameters

GenerateRoutingData(String,FeatureSource)

  • This method generates routing data to an .rtg file based on a feature source.
Remarks
  • This method is the overloads method. It will use do-not-rebuild mode and an empy string as adjunctiveInformation to call other methods.
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • rtgFilePathName
    • Type:String
    • Description:This parameter is the path and file name of the routing file you want to use.
  • featureSource
    • Description:This parameter is the feature source which gets enough information to generate routing data.

GenerateRoutingData(String,FeatureSource,BuildRoutingDataMode)

  • This method generates routing data to an .rtg file based on a feature source.
Remarks
  • This method is the overloads method. It will use an empy string as adjunctiveInformation to call other methods.
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • rtgFilePathName
    • Type:String
    • Description:This parameter is the path and file name of the routing file you want to use.
  • featureSource
    • Description:This parameter is the feature source which gets enough information to generate routing data.
  • buildRoutingDataMode
    • Description:This parameter represents whether routing data will be rebuilt or not.

GenerateRoutingData(String,FeatureSource,BuildRoutingDataMode,String)

  • This method generates routing data to an .rtg file based on a feature source.
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_FeatureSource.2C_BuildRoutingDataMode.2C_String.29
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • rtgFilePathName
    • Type:String
    • Description:This parameter is the path and file name of the routing file you want to use.
  • featureSource
    • Description:This parameter is the feature source which gets enough information to generate routing data.
  • buildRoutingDataMode
    • Description:This parameter represents whether routing data will be rebuilt or not.
  • adjunctiveInformation
    • Type:String
    • Description:This parameter represents the adjunctive information which will be stored in the .rtg file.

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

  • This method generates routing data to an .rtg file based on a feature source.
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_FeatureSource.2C_BuildRoutingDataMode.2C_GeographyUnit.2C_DistanceUnit.29
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • rtgFilePathName
    • Type:String
    • Description:N/A

GenerateRoutingData(String,String,BuildRoutingDataMode)

  • This method generates routing data to an .rtg file based on a feature source.
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_BuildRoutingDataMode.29
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • sourceShapeFilePathName
    • Type:String
    • Description:N/A
  • routableShapeFilePathName
    • Type:String
    • Description:N/A

GenerateRoutingData(String,String,String,BuildRoutingDataMode)

  • This method generates routing data to an .rtg file based on a feature source.
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.29
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • rtgFilePathName
    • Type:String
    • Description:N/A
  • sourceShapeFilePathName
    • Type:String
    • Description:N/A
  • routableShapeFilePathName
    • Type:String
    • Description:N/A

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

  • This method generates routing data to an .rtg file based on a feature source.
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
  • Type:Void
  • Description:N/A
Parameters
  • rtgFilePathName
    • Type:String
    • Description:N/A
  • sourceShapeFilePathName
    • Type:String
    • Description:N/A
  • routableShapeFilePathName
    • Type:String
    • Description:N/A

GenerateRoutableShapeFile(String,String,OverwriteMode)

  • Create the routable shapefile which can be used to create RTG file directly.
Remarks
  • For the most updated Info for this topic, please check it here:http:wiki.thinkgeo.com/wiki/ThinkGeo.MapSuite.Routing.RtgRoutingSource#GenerateRoutableShapeFile.28String.2C_String.2C_OverwriteMode.29
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • shapefilePathName
    • Type:String
    • Description:The path name of the source shape file.
  • routableShapeFilePathName
    • Type:String
    • Description:The path name of the routable shape file created.
  • overwriteMode
    • Description:The write mode used to specify whether we should overwrite the existed file.

Protected Methods

GetRouteSegmentByFeatureIdCore(String)

  • This method returns a RouteSegment by providing its ID in the RoutingSource.
Remarks
  • For the most updated Info for this topic, please check it here:http:wiki.thinkgeo.com/wiki/ThinkGeo.MapSuite.Routing.RtgRoutingSource#GetRouteSegmentByFeatureIdCore.28String.29
Return Value
  • Description:The RouteSegment based on a specific ID.
Parameters
  • featureId
    • Type:String
    • Description:This parameter is the feature ID which uniquely identifies it in the RoutingSource.

OpenCore()

  • This method opens the RoutingSource so that it is initialized and ready to use.
Remarks
  • 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:N/A
Parameters

OnStreamLoading(StreamLoadingEventArgs)

  • This method allows you to raise the StreamLoading event.
Remarks
  • This method allows you to raise the StreamLoading event. Normally events are not accessible to derived classes, so we exposed a way to raise the event as necessary through this protected method.
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • e
    • Description:This parameter represents the event arguments you want to raise the StreamLoading event with.

CloseCore()

  • This method closes the RoutingSource and releases any resources it was using.
Remarks
  • 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:N/A
Parameters

BeginTransactionCore()

  • N/A
Remarks
  • For the most updated Info for this topic, please check it here:http:wiki.thinkgeo.com/wiki/ThinkGeo.MapSuite.Routing.RtgRoutingSource#BeginTransactionCore.28.29
Return Value
  • Type:Void
  • Description:N/A
Parameters

CommitTransactionCore(RoutingTransactionBuffer)

  • N/A
Remarks
  • For the most updated Info for this topic, please check it here:http:wiki.thinkgeo.com/wiki/ThinkGeo.MapSuite.Routing.RtgRoutingSource#CommitTransactionCore.28RoutingTransactionBuffer.29
Return Value
Parameters

RollbackTransactionCore()

  • N/A
Remarks
  • For the most updated Info for this topic, please check it here:http:wiki.thinkgeo.com/wiki/ThinkGeo.MapSuite.Routing.RtgRoutingSource#RollbackTransactionCore.28.29
Return Value
  • Type:Void
  • Description:N/A
Parameters

GetRouteSegmentCountCore()

  • This method returns the count of the number of records in this RoutingSource.
Remarks
  • 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
  • Type:Int32
  • Description:This method returns the count of the number of records in this RoutingSource.
Parameters

GetRouteSegmentsNearestToCore(BaseShape,FeatureSource,GeographyUnit,Int32)

  • This method returns a user defined number of Route Segments that are closest to the TargetShape.
Remarks
  • 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
  • Type:Collection<RouteSegment>
  • Description:This method returns a user defined number of Route Segments that are closest to the TargetShape.
Parameters
  • targetShape
    • Type:BaseShape
    • Description:This parameter is the shape you want to find Route Segments close to.
  • featureSource
    • Description:This parameter defines the FeatureSource that is used to get information of RouteSegments
  • unitOfFeatureSource
    • Description:This parameter is the unit of measurement that the TargetShape and the FeatureSource are in, such as feet, meters, etc.
  • numberOfItemsToFind
    • Type:Int32
    • Description:This parameter defines how many close Route Segments to find around the TargetShape.

OnCommittingTransaction(RoutingCommittingTransactionEventArgs)

  • This method allows you to raise the CommittingTransaction event from a derived class.
Remarks
  • You can call this method from a derived class to enable it to raise the CommittingTransaction event. This may be useful if you plan to extend the RoutingSource and you need access to the event. Details on the event: 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 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.
Return Value
  • Type:Void
  • Description:N/A
Parameters

OnCommittedTransaction(RoutingCommittedTransactionEventArgs)

  • This method allows you to raise the CommittedTransaction event from a derived class.
Remarks
  • You can call this method from a derived class to enable it to raise the CommittedTransaction event. This may be useful if you plan to extend the RoutingSource and you need access to the event. Details on the event: 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 analyze the results of the transaction and do any cleanup code necessary. In the event some of the records did not commit, you can handle these 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.
Return Value
  • Type:Void
  • Description:N/A
Parameters

Finalize()

  • N/A
Remarks
  • For the most updated Info for this topic, please check it here:http:wiki.thinkgeo.com/wiki/ThinkGeo.MapSuite.Routing.RtgRoutingSource#Finalize.28.29
Return Value
  • Type:Void
  • Description:N/A
Parameters

MemberwiseClone()

  • N/A
Remarks
  • For the most updated Info for this topic, please check it here:http:wiki.thinkgeo.com/wiki/ThinkGeo.MapSuite.Routing.RtgRoutingSource#MemberwiseClone.28.29
Return Value
  • Type:Object
  • Description:N/A
Parameters

OnBuildingRoutingData(BuildingRoutingDataRtgRoutingSourceEventArgs)

  • This method allows you to raise the BuildingRoutingData event from a derived class.
Remarks
  • For the most updated Info for this topic, please check it here:http:wiki.thinkgeo.com/wiki/ThinkGeo.MapSuite.Routing.RtgRoutingSource#OnBuildingRoutingData.28BuildingRoutingDataRtgRoutingSourceEventArgs.29
Return Value
  • Type:Void
  • Description:N/A
Parameters

OnGeneratingRoutableShapefile(GeneratingRoutableShapeFileRoutingSourceEventArgs)

  • This method allows you to raise the GeneratingRoutableShapeFile event from a derived class.
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
Return Value
  • Type:Void
  • Description:N/A
Parameters

vhQ=(ShapeFileFeatureSource,String,OverwriteMode)

  • N/A
Remarks
  • N/A
Return Value
  • Type:Void
  • Description:N/A
Parameters
  • routableShapeFilePathName
    • Type:String
    • Description:N/A

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
  • Type:String

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
  • Type:Boolean

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
  • Type:Boolean

GeographyUnit

N/A

Remarks
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
  • Type:Boolean

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
  • Type:String

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
  • Type:Boolean

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
  • Type:Int32

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
  • Type:Boolean

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

thinkgeo.mapsuite.routing.rtgroutingsource.txt · Last modified: 2017/03/16 21:59 (external edit)