|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.networkanalyst.NALocatorFeatureAgent
public class NALocatorFeatureAgent
Finds network feature locations for analysis.
The NALocatorFeatureAgent object performs spatial searches on features to find network locations.
Constructor Summary | |
---|---|
NALocatorFeatureAgent()
Constructs a NALocatorFeatureAgent using ArcGIS Engine. |
|
NALocatorFeatureAgent(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. NALocatorFeatureAgent theNALocatorFeatureAgent = (NALocatorFeatureAgent) obj; |
Method Summary | |
---|---|
void |
assign(IClone src)
Assigns the properties of src to the receiver. |
void |
bind(INetworkDataset pNetworkDataset,
IGPMessages pGPMessages)
Re-associate the locator with the given network dataset and its schema. |
void |
deserialize(IXMLSerializeData data)
Deserializes an object from XML. |
boolean |
equals(Object o)
Compare this object with another |
IClone |
esri_clone()
Clones the receiver and assigns the result to *clone. |
void |
getClassID(GUID[] pClassID)
getClassID |
static String |
getClsid()
getClsid. |
String |
getFullWhereClause()
The full where clause including the subtype predicate in the UseSubtype case. |
String |
getName()
The name of the locator agent. |
void |
getSizeMax(_ULARGE_INTEGER[] pcbSize)
getSizeMax |
int |
getSnapType()
The method of snapping used. |
String |
getSourceName()
The network source name. |
int |
getSubtypeCode()
The subtype to be used to locate features. |
String |
getWhereClause()
The where clause to filter candidate locations not including the subtype predicate in the UseSubtype case. |
int |
hashCode()
the hashcode for this object |
void |
isDirty()
isDirty |
boolean |
isEqual(IClone other)
Indicates if the receiver and other have the same properties. |
boolean |
isIdentical(IClone other)
Indicates if the receiver and other are the same object. |
boolean |
isUseSubtype()
Indicates if subtypes should be used to locate features. |
void |
load(IStream pstm)
load |
void |
queryGeometry(INALocation location,
IGeometry[] geometry)
The geometry for the given network location. |
void |
queryLocationByPoint(IPoint point,
double tolerance,
INALocation[] location,
IPoint[] outPoint,
double[] distanceFromPoint)
Find a network location from a point. |
void |
queryLocationByPointEx(IPoint point,
double tolerance,
int curbApproach,
INALocation[] location,
IPoint[] outPoint,
double[] distanceFromPoint)
Find a network location from a point and curb approach. |
void |
queryLocationByRow(IRow row,
double tolerance,
INALocation[] location,
double[] distanceFromPoint)
Find a network location from a row. |
void |
queryLocationByRowEx(IRow row,
double tolerance,
int curbApproach,
INALocation[] location,
double[] distanceFromRow)
Find a network location from a row and curb approach. |
void |
queryLocationRangesByGeometry(IGeometry geometry,
INALocationRanges[] locationRanges)
Find network location ranges from a geometry. |
void |
queryLocationRangesByRow(IRow row,
INALocationRanges[] locationRanges)
Find network location ranges from a row. |
void |
queryPoint(INALocation location,
IPoint[] point)
The point for the given network location. |
void |
readExternal(ObjectInput in)
|
void |
save(IStream pstm,
int fClearDirty)
save |
void |
serialize(IXMLSerializeData data)
Serializes an object to XML. |
void |
setSnapType(int pHitPartType)
The method of snapping used. |
void |
setSourceName(String sourceName)
The network source name. |
void |
setSubtypeCode(int subtypeCode)
The subtype to be used to locate features. |
void |
setUseSubtype(boolean useSubtype)
Indicates if subtypes should be used to locate features. |
void |
setWhereClause(String whereClause)
The where clause to filter candidate locations not including the subtype predicate in the UseSubtype case. |
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 NALocatorFeatureAgent() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic NALocatorFeatureAgent(Object obj) throws IOException
NALocatorFeatureAgent theNALocatorFeatureAgent = (NALocatorFeatureAgent) obj;
obj
to NALocatorFeatureAgent
.
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 setSourceName(String sourceName) throws IOException, AutomationException
The SourceName is the feature class name to be searched.
setSourceName
in interface INALocatorFeatureAgent
sourceName
- The sourceName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getSourceName() throws IOException, AutomationException
The SourceName is the feature class name to be searched.
getSourceName
in interface INALocatorFeatureAgent
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSnapType(int pHitPartType) throws IOException, AutomationException
The SnapType property determines where along the feature the location will be found. You can snap to endpoints or vertices (junctions) or anywhere along the line (edges).
setSnapType
in interface INALocatorFeatureAgent
pHitPartType
- A com.esri.arcgis.geometry.esriGeometryHitPartType constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getSnapType() throws IOException, AutomationException
The SnapType property determines where along the feature the location will be found. You can snap to endpoints or vertices (junctions) or anywhere along the line (edges).
getSnapType
in interface INALocatorFeatureAgent
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setUseSubtype(boolean useSubtype) throws IOException, AutomationException
Setting the UseSubtype property to true allows you to snap only to features of a specific subtype. It is used in conjunction with the SubtypeCode property which specifies which subtype to snap to.
setUseSubtype
in interface INALocatorFeatureAgent
useSubtype
- The useSubtype (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isUseSubtype() throws IOException, AutomationException
Setting the UseSubtype property to true allows you to snap only to features of a specific subtype. It is used in conjunction with the SubtypeCode property which specifies which subtype to snap to.
isUseSubtype
in interface INALocatorFeatureAgent
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSubtypeCode(int subtypeCode) throws IOException, AutomationException
The SubtypeCode property determines which subtype to snap to when the associated property UseSubtype is true.
setSubtypeCode
in interface INALocatorFeatureAgent
subtypeCode
- The subtypeCode (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getSubtypeCode() throws IOException, AutomationException
The SubtypeCode property determines which subtype to snap to when the associated property UseSubtype is true.
getSubtypeCode
in interface INALocatorFeatureAgent
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setWhereClause(String whereClause) throws IOException, AutomationException
The WhereClause specifies the user-defined portion of the where clause on the spatial filter that is used to constrain the features searched within the source feature class when finding the closest network location.
This is useful if you don't want to locate on features that may be restricted or otherwise undesirable to search on. For example, if you are using StreetMap network data, streets with a Speed of 1 are considered restricted. Thus, you may want to specify a where clause of "SPEED > 1" to ensure there streets are not considered when finding network locations.
setWhereClause
in interface INALocatorFeatureAgent2
whereClause
- The whereClause (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getWhereClause() throws IOException, AutomationException
The WhereClause specifies the user-defined portion of the where clause on the spatial filter that is used to constrain the features searched within the source feature class when finding the closest network location.
This is useful if you don't want to locate on features that may be restricted or otherwise undesirable to search on. For example, if you are using StreetMap network data, streets with a Speed of 1 are considered restricted. Thus, you may want to specify a where clause of "SPEED > 1" to ensure there streets are not considered when finding network locations.
getWhereClause
in interface INALocatorFeatureAgent2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getFullWhereClause() throws IOException, AutomationException
The FullWhereClause returns the where clause on the spatial filter that is used to constrain the features searched within the source feature class when finding the closest network location.
It is a concatenation of the WhereClause property and the subtype constraint set by the UseSubtype and SubytpeCode properties.
getFullWhereClause
in interface INALocatorFeatureAgent2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getName() throws IOException, AutomationException
The Name of the locator agent.
getName
in interface INALocatorAgent
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void queryLocationByPoint(IPoint point, double tolerance, INALocation[] location, IPoint[] outPoint, double[] distanceFromPoint) throws IOException, AutomationException
QueryLocationByPoint searches for network locations based upon an input point. The corresponding NALocation, the point where the location was found, and the distance from the input point to the source feature found are all returned.
When the NALocatorFeatureAgent is used, the distance returned is from the point to the feature, not from the point to the actual network location on the feature. It is important to know the distance to the feature as a whole because this is the feature on which you want to locate the endpoint/midpoint. If you need to determine the distance from the input point to the actual network location point, use IProximityOperator::ReturnDistance between the input point and the output point.
The NALocatorLocationFieldsAgent should not be used with this method.
queryLocationByPoint
in interface INALocatorAgent
point
- A reference to a com.esri.arcgis.geometry.IPoint (in)tolerance
- The tolerance (in)location
- A reference to a com.esri.arcgis.networkanalyst.INALocation (in/out: use single element array)outPoint
- A reference to a com.esri.arcgis.geometry.IPoint (in/out: use single element array)distanceFromPoint
- The distanceFromPoint (in/out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void queryLocationByRow(IRow row, double tolerance, INALocation[] location, double[] distanceFromPoint) throws IOException, AutomationException
QueryLocationByRow searches for network locations based upon the inbound Row. The result is returned as an INALocation.
For a NALocatorFeatureAgent, if the row is a feature, QueryLocationByRow uses the feature geometry to populate the INALocation.
For a NALocatorLocationFieldsAgent, QueryLocationByRow uses the field names specified on INALocatorLocationFieldsAgent to populate the INALocation.
queryLocationByRow
in interface INALocatorAgent
row
- A reference to a com.esri.arcgis.geodatabase.IRow (in)tolerance
- The tolerance (in)location
- A reference to a com.esri.arcgis.networkanalyst.INALocation (in/out: use single element array)distanceFromPoint
- The distanceFromPoint (in/out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void queryPoint(INALocation location, IPoint[] point) throws IOException, AutomationException
The result of calling QueryLocationByPoint or QueryLocationByRow is an INALocation. Use QueryPoint to get the Point that represents this location.
queryPoint
in interface INALocatorAgent
location
- A reference to a com.esri.arcgis.networkanalyst.INALocation (in)point
- A reference to a com.esri.arcgis.geometry.IPoint (in/out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void bind(INetworkDataset pNetworkDataset, IGPMessages pGPMessages) throws IOException, AutomationException
Bind re-associates the NALocator with a network dataset. This method must be called before calling any of the Query functions.
bind
in interface INALocatorAgent
pNetworkDataset
- A reference to a com.esri.arcgis.geodatabase.INetworkDataset (in)pGPMessages
- A reference to a com.esri.arcgis.geodatabase.IGPMessages (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void queryGeometry(INALocation location, IGeometry[] geometry) throws IOException, AutomationException
QueryGeometry is used to get the source feature geometry of the network location. For example, if a network location is referencing a position along a line feature, the line feature's Polyline geometry will be returned by this method.
The INALocation must already be located, in which case INALocation::IsLocated returns true.
When QueryGeometry is called from a NALocatorFeatureAgent class, the INALocation::SourceID must match the SourceID of the NALocatorFeatureAgent.
queryGeometry
in interface INALocatorAgent2
location
- A reference to a com.esri.arcgis.networkanalyst.INALocation (in)geometry
- A reference to a com.esri.arcgis.geometry.IGeometry (in/out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void queryLocationRangesByGeometry(IGeometry geometry, INALocationRanges[] locationRanges) throws IOException, AutomationException
QueryLocationRangesByGeometry determines the set of junctions and edge ranges that intersect the input geometry and returns this information by populating the referenced INALocationRanges parameter.
The NALocatorLocationFieldsAgent should not be used with this method.
queryLocationRangesByGeometry
in interface INALocatorAgent3
geometry
- A reference to a com.esri.arcgis.geometry.IGeometry (in)locationRanges
- A reference to a com.esri.arcgis.networkanalyst.INALocationRanges (in/out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void queryLocationRangesByRow(IRow row, INALocationRanges[] locationRanges) throws IOException, AutomationException
QueryLocationRangesByRow searches for location ranges based upon the inbound Row. The result is returned as an INALocationRanges.
For a NALocatorFeatureAgent, if the row is a feature, QueryLocationRangesByRow uses the feature geometry to populate the INALocation.
For a NALocatorLocationFieldsAgent, QueryLocationRangesByRow uses the field name specified on INALocatorLocationFieldsAgent2.LocationRangesFieldName to populate the INALocation.
queryLocationRangesByRow
in interface INALocatorAgent3
row
- A reference to a com.esri.arcgis.geodatabase.IRow (in)locationRanges
- A reference to a com.esri.arcgis.networkanalyst.INALocationRanges (in/out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void queryLocationByPointEx(IPoint point, double tolerance, int curbApproach, INALocation[] location, IPoint[] outPoint, double[] distanceFromPoint) throws IOException, AutomationException
QueryLocationByPointEx extends QueryLocationByPoint by adding a CurbApproach parameter.
If, in the INALocator calling this agent, ExcludeRestrictedElements is set to true and CacheRestrictedElements has been called, then there is the possibility that a network edge is only traversable in one direction. In that case, the CurbApproach setting could render a location as unreachable. For example, if the along direction on an edge is restricted, and the location being queried would place the returned NALocation on the left side of the edge, then it is not possible to reach the stop with a vehicle requiring a CurbApproach of left side. QueryLocationByPointEx, in the above example, would switch the side of edge of the returned NALocation to right side, thereby allowing the NALocation to be reachable by vehicles with a CurbApproach requirement of left side.
queryLocationByPointEx
in interface INALocatorAgent3
point
- A reference to a com.esri.arcgis.geometry.IPoint (in)tolerance
- The tolerance (in)curbApproach
- A com.esri.arcgis.networkanalyst.esriNACurbApproachType constant (in)location
- A reference to a com.esri.arcgis.networkanalyst.INALocation (in/out: use single element array)outPoint
- A reference to a com.esri.arcgis.geometry.IPoint (in/out: use single element array)distanceFromPoint
- The distanceFromPoint (in/out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void queryLocationByRowEx(IRow row, double tolerance, int curbApproach, INALocation[] location, double[] distanceFromRow) throws IOException, AutomationException
QueryLocationByRowEx extends QueryLocationByRow by adding a CurbApproach parameter.
If, in the INALocator calling this agent, ExcludeRestrictedElements is set to true and CacheRestrictedElements has been called, then there is the possibility that a network edge is only traversable in one direction. In that case, the CurbApproach setting could render a location as unreachable. For example, if the along direction on an edge is restricted, and the location being queried would place the returned NALocation on the left side of the edge, then it is not possible to reach the stop with a vehicle requiring a CurbApproach of left side. QueryLocationByRowEx, in the above example, would switch the side of edge of the returned NALocation to right side, thereby allowing the NALocation to be reachable by vehicles with a CurbApproach requirement of left side.
queryLocationByRowEx
in interface INALocatorAgent3
row
- A reference to a com.esri.arcgis.geodatabase.IRow (in)tolerance
- The tolerance (in)curbApproach
- A com.esri.arcgis.networkanalyst.esriNACurbApproachType constant (in)location
- A reference to a com.esri.arcgis.networkanalyst.INALocation (in/out: use single element array)distanceFromRow
- The distanceFromRow (in/out: use single element array)
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 IClone esri_clone() throws IOException, AutomationException
esri_clone
in interface IClone
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void assign(IClone src) throws IOException, AutomationException
assign
in interface IClone
src
- A reference to a com.esri.arcgis.system.IClone (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isEqual(IClone other) throws IOException, AutomationException
IsEqual returns True if the receiver and the source have the same properties. Note, this does not imply that the receiver and the source reference the same object.
isEqual
in interface IClone
other
- A reference to a com.esri.arcgis.system.IClone (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isIdentical(IClone other) throws IOException, AutomationException
IsIdentical returns true if the receiver and the source reference the same object.
isIdentical
in interface IClone
other
- A reference to a com.esri.arcgis.system.IClone (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void serialize(IXMLSerializeData data) throws IOException, AutomationException
serialize
in interface IXMLSerialize
data
- A reference to a com.esri.arcgis.system.IXMLSerializeData (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void deserialize(IXMLSerializeData data) throws IOException, AutomationException
deserialize
in interface IXMLSerialize
data
- A reference to a com.esri.arcgis.system.IXMLSerializeData (in)
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 |