|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.networkanalyst.NAODCostMatrixResult
public class NAODCostMatrixResult
Contains an origin-destination cost matrix.
This object is new at ArcGIS 9.3.
The NAODCostMatrixResult object is created by both the NAVRPSolver and NAODCostMatrixSolver objects after a successful Solve operation. This object may be used to access origin-destination cost information associated with the NALocation instances currently populated within the associated VRP/OD NAContext.
Constructor Summary | |
---|---|
NAODCostMatrixResult()
Constructs a NAODCostMatrixResult using ArcGIS Engine. |
|
NAODCostMatrixResult(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. NAODCostMatrixResult theNAODCostMatrixResult = (NAODCostMatrixResult) obj; |
Method Summary | |
---|---|
void |
create(String name,
INAContextHelper nAContextHelper,
boolean isScratch)
Set up for a new analysis. |
void |
emptyAll()
Clear out all existing rows from any previous analysis. |
boolean |
equals(Object o)
Compare this object with another |
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. |
void |
getClassID(GUID[] pClassID)
getClassID |
static String |
getClsid()
getClsid. |
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. |
INAContext |
getNAContext()
The context for the result. |
String |
getName()
The name of the result. |
IName |
getNetworkDatasetName()
The name of the network dataset. |
int |
getOriginCount()
The number of origin locations. |
IPropertySet |
getOutputProperties()
The properties of the output. |
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. |
void |
getSizeMax(_ULARGE_INTEGER[] pcbSize)
getSizeMax |
double |
getValue(int originIndex,
int destinationIndex,
int attributeIndex)
Retrieves the cost value for a given origin and destination. |
int |
hashCode()
the hashcode for this object |
void |
initialize(String name,
INAContext nAContext,
boolean isScratch)
Set up for a new analysis. |
void |
initializeEx(INAContextHelper nAContextHelper)
Provides the result object with a reference to the context. |
boolean |
isAreOriginsIdenticalToDestinations()
Indicates if the origin set is identical to the destination set, i.e. |
void |
isDirty()
isDirty |
boolean |
isHasRankingAttribute()
Indicates if the matrix has an attribute for ranking values. |
boolean |
isHasValidResult()
Indicates if the current result is valid. |
boolean |
isPopulated(int originIndex,
int destinationIndex)
Indicates if the matrix entry for given origin, destination index is populated. |
boolean |
isSaveMatrixOnPersist()
Indicates if the matrix entries are to be saved. |
boolean |
isSymmetric()
Indicates if the matrix has symmetric values. |
void |
load(IStream pstm)
load |
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. |
void |
readExternal(ObjectInput in)
|
void |
save(IStream pstm,
int fClearDirty)
save |
void |
setHasValidResult(boolean pFlag)
Indicates if the current result is valid. |
void |
setSaveMatrixOnPersist(boolean value)
Indicates if the matrix entries are to be saved. |
void |
writeExternal(ObjectOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef |
---|
getJintegraDispatch, release |
Constructor Detail |
---|
public NAODCostMatrixResult() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic NAODCostMatrixResult(Object obj) throws IOException
NAODCostMatrixResult theNAODCostMatrixResult = (NAODCostMatrixResult) obj;
obj
to NAODCostMatrixResult
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problemsMethod Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void initialize(String name, INAContext nAContext, boolean isScratch) throws IOException, AutomationException
This method has been deprecated and should not be used. Instead, use INAResult2.Create to initialize a result object after creating it.
initialize
in interface INAResult
name
- The name (in)nAContext
- A reference to a com.esri.arcgis.networkanalyst.INAContext (in)isScratch
- The isScratch (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPropertySet getOutputProperties() throws IOException, AutomationException
The OutputProperties property returns a PropertySet that may contain information about the results of the network analysis.
The contents of the property set is up to the individual solver. For the solvers that ESRI has released, HasGapsInEdgeCumulativeImpedances returns True if there are impedance values on the junction elements that were traversed. This is important because measures are not generated on the resulting polyline feature class (Route, CFLines, SALines) in this case.
Closest Facility:
HasGapsInEdgeCumulativeImpedances True/False
Route:
HasGapsInEdgeCumulativeImpedances True/False
Service Area:
HasGapsInEdgeCumulativeImpedances True/False
TravelDirection TRAVEL_FROM/TRAVEL_TO
Origin Destination Cost Matrix:
** No TraversalResult generated
getOutputProperties
in interface INAResult
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isHasValidResult() throws IOException, AutomationException
The HasValidResult property denotes if network analysis has been performed and the result object has been populated with valid information.
isHasValidResult
in interface INAResult
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setHasValidResult(boolean pFlag) throws IOException, AutomationException
The HasValidResult property denotes if network analysis has been performed and the result object has been populated with valid information.
setHasValidResult
in interface INAResult
pFlag
- The pFlag (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void emptyAll() throws IOException, AutomationException
Clears the traversal result.
emptyAll
in interface INAResult
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getName() throws IOException, AutomationException
The Name property returns the name of the traversal result that was set during the call to Create.
getName
in interface INAResult
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public INAContext getNAContext() throws IOException, AutomationException
The NAContext returns the context that this traversal result was based upon.
getNAContext
in interface INAResult
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void create(String name, INAContextHelper nAContextHelper, boolean isScratch) throws IOException, AutomationException
The method Create is called by the solver when it creates a new result object.
The isScratch parameter specifies if the result feature classes should be kept in memory (false) or saved on disk (true).
The NAContextHelper object passed in is used to get back to the NAContext. You can maintain a strong reference to the NAContextHelper object within your custom result object, but do not hold onto a strong reference to the NAContext itself as this will create a circular reference.
This method should be called instead of INAResult.Initialize.
create
in interface INAResult2
name
- The name (in)nAContextHelper
- A reference to a com.esri.arcgis.networkanalyst.INAContextHelper (in)isScratch
- The isScratch (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void initializeEx(INAContextHelper nAContextHelper) throws IOException, AutomationException
The InitializeEx method is called after the result object has been deserialized as part of the NAContext being loaded. It is called to pass to the result object a backpointer reference to the NAContext that it's bound to.
The NAContextHelper object passed in is used to get back to the NAContext. You can maintain a strong reference to the NAContextHelper object within your custom result object, but do not hold onto a strong reference to the NAContext itself as this will create a circular reference.
initializeEx
in interface INAResult2
nAContextHelper
- A reference to a com.esri.arcgis.networkanalyst.INAContextHelper (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IName getNetworkDatasetName() throws IOException, AutomationException
Returns the IName interface of the underlying network dataset associated with the matrix object.
getNetworkDatasetName
in interface INAODCostMatrix
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IStringArray getCostAttributeNames() throws IOException, AutomationException
Returns the names of the cost attributes that are present in the matrix object.
getCostAttributeNames
in interface INAODCostMatrix
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getOriginCount() throws IOException, AutomationException
Returns the number of origin locations associated with the matrix object.
getOriginCount
in interface INAODCostMatrix
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getDestinationCount() throws IOException, AutomationException
Returns the number of destination locations associated with the matrix object.
getDestinationCount
in interface INAODCostMatrix
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isAreOriginsIdenticalToDestinations() throws IOException, AutomationException
Returns True if the set of origin locations is identical to the set of destination locations in index sequence.
isAreOriginsIdenticalToDestinations
in interface INAODCostMatrix
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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).
isSymmetric
in interface INAODCostMatrix
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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.
findOriginIndex
in interface INAODCostMatrix
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.public 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.
findDestinationIndex
in interface INAODCostMatrix
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.public double getDefaultValue(int attributeIndex) throws IOException, AutomationException
getDefaultValue
in interface INAODCostMatrix
attributeIndex
- The attributeIndex (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getPopulatedDestinationCount(int originIndex) throws IOException, AutomationException
getPopulatedDestinationCount
in interface INAODCostMatrix
originIndex
- The originIndex (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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.
queryPopulatedDestinationIndices
in interface INAODCostMatrix
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.public boolean isPopulated(int originIndex, int destinationIndex) throws IOException, AutomationException
isPopulated
in interface INAODCostMatrix
originIndex
- The originIndex (in)destinationIndex
- The destinationIndex (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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.
isHasRankingAttribute
in interface INAODCostMatrix
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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.
getRankingAttributeIndex
in interface INAODCostMatrix
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getDestinationIndexByRank(int originIndex, int rank) throws IOException, AutomationException
getDestinationIndexByRank
in interface INAODCostMatrix
originIndex
- The originIndex (in)rank
- The rank (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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.
queryRankedDestinationIndices
in interface INAODCostMatrix
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.public double getValue(int originIndex, int destinationIndex, int attributeIndex) throws IOException, AutomationException
getValue
in interface INAODCostMatrix
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.public 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.
queryValues
in interface INAODCostMatrix
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.public boolean isSaveMatrixOnPersist() throws IOException, AutomationException
When SaveMatrixOnPersist is set to True, any persistance of the NAODCostMatrixResult object will include all of the matrix entries from the most recent solve. This is useful if, for example, you want to persist your OD Cost Matrix results to a Layer File, or to a map document.
isSaveMatrixOnPersist
in interface INAODCostMatrixResult
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSaveMatrixOnPersist(boolean value) throws IOException, AutomationException
When SaveMatrixOnPersist is set to True, any persistance of the NAODCostMatrixResult object will include all of the matrix entries from the most recent solve. This is useful if, for example, you want to persist your OD Cost Matrix results to a Layer File, or to a map document.
setSaveMatrixOnPersist
in interface INAODCostMatrixResult
value
- The value (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void isDirty() throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
isDirty
in interface IPersistStream
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void load(IStream pstm) throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
load
in interface IPersistStream
pstm
- A reference to a com.esri.arcgis.system.IStream (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void save(IStream pstm, int fClearDirty) throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
save
in interface IPersistStream
pstm
- A reference to a com.esri.arcgis.system.IStream (in)fClearDirty
- The fClearDirty (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void getSizeMax(_ULARGE_INTEGER[] pcbSize) throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
getSizeMax
in interface IPersistStream
pcbSize
- A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void getClassID(GUID[] pClassID) throws IOException, AutomationException
IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.
getClassID
in interface IPersist
pClassID
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |