|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface INAODCostMatrix
Provides access to the OD cost matrix object.
This interface is new at ArcGIS 9.3.
The INAODCostMatrix interface provides access to origin-destination cost information associated with a set of NALocation instances.
Method Summary | |
---|---|
int |
findDestinationIndex(INALocation location,
int curbApproach)
Finds the destination corresponding to the given network location. |
int |
findOriginIndex(INALocation location,
int curbApproach)
Finds the origin corresponding to the given network location. |
IStringArray |
getCostAttributeNames()
The names of the network cost attributes. |
double |
getDefaultValue(int attributeIndex)
The value returned for un-populated matrix enteries. |
int |
getDestinationCount()
The number of destination locations. |
int |
getDestinationIndexByRank(int originIndex,
int rank)
For a given origin, retrieves the index of the populated destination for a given rank. |
IName |
getNetworkDatasetName()
The name of the network dataset. |
int |
getOriginCount()
The number of origin locations. |
int |
getPopulatedDestinationCount(int originIndex)
For a given origin, retrieves the number of destinations with populated matrix values. |
int |
getRankingAttributeIndex()
The index of the cost attribute used to rank the populated destinations for each origin. |
double |
getValue(int originIndex,
int destinationIndex,
int attributeIndex)
Retrieves the cost value for a given origin and destination. |
boolean |
isAreOriginsIdenticalToDestinations()
Indicates if the origin set is identical to the destination set, i.e. |
boolean |
isHasRankingAttribute()
Indicates if the matrix has an attribute for ranking values. |
boolean |
isPopulated(int originIndex,
int destinationIndex)
Indicates if the matrix entry for given origin, destination index is populated. |
boolean |
isSymmetric()
Indicates if the matrix has symmetric values. |
void |
queryPopulatedDestinationIndices(int originIndex,
ILongArray[] destinationIndices)
For a given origin, retrieves the indices of populated destinations. |
void |
queryRankedDestinationIndices(int originIndex,
ILongArray[] destinationIndices)
For a given origin, retrieves the indices of the populated destinations in increasing rank. |
void |
queryValues(int originIndex,
int destinationIndex,
IDoubleArray[] values)
Retrieves the cost values of all cost attributes for the given origin and destination. |
Method Detail |
---|
IName getNetworkDatasetName() throws IOException, AutomationException
Returns the IName interface of the underlying network dataset associated with the matrix object.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IStringArray getCostAttributeNames() throws IOException, AutomationException
Returns the names of the cost attributes that are present in the matrix object.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getOriginCount() throws IOException, AutomationException
Returns the number of origin locations associated with the matrix object.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getDestinationCount() throws IOException, AutomationException
Returns the number of destination locations associated with the matrix object.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isAreOriginsIdenticalToDestinations() throws IOException, AutomationException
Returns True if the set of origin locations is identical to the set of destination locations in index sequence.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isSymmetric() throws IOException, AutomationException
Returns True if the INAODCostMatrix.AreOriginsIdenticalToDestinations property returns True and the matrix values are symmetric (i.e., for each cost attribute and each origin-destination pair of locations, the matrix value for traveling from the first location to the second is the same as the value for traveling from the second location to the first).
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int findOriginIndex(INALocation location, int curbApproach) throws IOException, AutomationException
Given a network location and curb approach, this method returns the internal index of a matching origin location. The internal index values range from 0 through INAODCostMatrix.OriginCount - 1. There may be more than one matching origin location, in which case an arbitrary index value is returned.
If a matching origin index cannot be determined, the integer value -1 is returned.
location
- A reference to a com.esri.arcgis.networkanalyst.INALocation (in)curbApproach
- A com.esri.arcgis.networkanalyst.esriNACurbApproachType constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int findDestinationIndex(INALocation location, int curbApproach) throws IOException, AutomationException
Given a network location and curb approach, this method returns the internal index of a matching destination location. The internal index values range from 0 through INAODCostMatrix.DestinationCount - 1. There may be more than one matching destination location, in which case an arbitrary index value is returned.
If a matching destination index cannot be determined, the integer value -1 is returned.
location
- A reference to a com.esri.arcgis.networkanalyst.INALocation (in)curbApproach
- A com.esri.arcgis.networkanalyst.esriNACurbApproachType constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.double getDefaultValue(int attributeIndex) throws IOException, AutomationException
attributeIndex
- The attributeIndex (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getPopulatedDestinationCount(int originIndex) throws IOException, AutomationException
originIndex
- The originIndex (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void queryPopulatedDestinationIndices(int originIndex, ILongArray[] destinationIndices) throws IOException, AutomationException
For a given origin (passed in by index), QueryPopulatedDestinationIndices retrieves the indices of the populated destinations in an ILongArray. "Populated destinations" are the destinations for which a valid network path from the specified origin to the specified destination has been determined.
An origin's index can be retrieved via the FindOriginIndex method.
originIndex
- The originIndex (in)destinationIndices
- A reference to a com.esri.arcgis.system.ILongArray (in/out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isPopulated(int originIndex, int destinationIndex) throws IOException, AutomationException
originIndex
- The originIndex (in)destinationIndex
- The destinationIndex (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isHasRankingAttribute() throws IOException, AutomationException
This returns True if the populated destinations for each origin are ranked by their values for some cost attributes. For example, the destinations may be ranked in increasing travel time away from the origin.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getRankingAttributeIndex() throws IOException, AutomationException
If the matrix has a ranking attribute then this returns the index of the cost attribute used to rank the populated destinations for each origin.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getDestinationIndexByRank(int originIndex, int rank) throws IOException, AutomationException
originIndex
- The originIndex (in)rank
- The rank (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void queryRankedDestinationIndices(int originIndex, ILongArray[] destinationIndices) throws IOException, AutomationException
For a given origin (passed in by index), QueryRankedDestinationIndices retrieves the indices of the populated destinations in increasing rank as an ILongArray. "Populated destinations" are the destinations for which a valid network path from the specified origin to the specified destination has been determined. The destinations are ranked increasingly from least to greatest total cost of the network path from the origin to the destination.
An origin's index can be retrieved via the FindOriginIndex method.
originIndex
- The originIndex (in)destinationIndices
- A reference to a com.esri.arcgis.system.ILongArray (in/out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.double getValue(int originIndex, int destinationIndex, int attributeIndex) throws IOException, AutomationException
originIndex
- The originIndex (in)destinationIndex
- The destinationIndex (in)attributeIndex
- The attributeIndex (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void queryValues(int originIndex, int destinationIndex, IDoubleArray[] values) throws IOException, AutomationException
QueryValues populates an IDoubleArray with the values of all associated cost attributes for a given origin and destination. Each value is the total accumulated cost of travel along the network dataset from the origin to the destination for a specific cost attribute.
originIndex
- The originIndex (in)destinationIndex
- The destinationIndex (in)values
- A reference to a com.esri.arcgis.system.IDoubleArray (in/out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |