|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.networkanalyst.NALocatorLocationFieldsAgent
public class NALocatorLocationFieldsAgent
Defines the network location fields to be used by a locator.
The NALocatorLocationFieldsAgent object uses existing source ID, OID and position information to find network locations. This is much faster than the spatial searching that the NALocatorFeatureAgent uses.
When you solve a network analysis problem, you can export, for example, the stops with this information. If your network locations are not changing often (e.g., your restaurants don't move around), then using network location fields and this locator agent is the most efficient way to store and restore network locations.
Constructor Summary | |
---|---|
NALocatorLocationFieldsAgent()
Constructs a NALocatorLocationFieldsAgent using ArcGIS Engine. |
|
NALocatorLocationFieldsAgent(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. NALocatorLocationFieldsAgent theNALocatorLocationFieldsAgent = (NALocatorLocationFieldsAgent) 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 |
getLocationRangesFieldName()
The NALocationRanges field name. |
String |
getName()
The name of the locator agent. |
String |
getOIDFieldName()
The OID field name. |
String |
getPositionFieldName()
The position field name. |
String |
getSideFieldName()
The side field name. |
void |
getSizeMax(_ULARGE_INTEGER[] pcbSize)
getSizeMax |
String |
getSourceIDFieldName()
The source ID field name. |
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. |
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 |
setLocationRangesFieldName(String fieldName)
The NALocationRanges field name. |
void |
setOIDFieldName(String fieldName)
The OID field name. |
void |
setPositionFieldName(String fieldName)
The position field name. |
void |
setSideFieldName(String fieldName)
The side field name. |
void |
setSourceIDFieldName(String fieldName)
The source ID field name. |
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 NALocatorLocationFieldsAgent() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic NALocatorLocationFieldsAgent(Object obj) throws IOException
NALocatorLocationFieldsAgent theNALocatorLocationFieldsAgent = (NALocatorLocationFieldsAgent) obj;
obj
to NALocatorLocationFieldsAgent
.
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 setSourceIDFieldName(String fieldName) throws IOException, AutomationException
SourceIDFieldName specifies the field which contains the Source ID values. Each feature class added to a network dataset gets assinged a unique Source ID.
setSourceIDFieldName
in interface INALocatorLocationFieldsAgent
fieldName
- The fieldName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getSourceIDFieldName() throws IOException, AutomationException
SourceIDFieldName specifies the field which contains the Source ID values. Each feature class added to a network dataset gets assinged a unique Source ID.
getSourceIDFieldName
in interface INALocatorLocationFieldsAgent
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setOIDFieldName(String fieldName) throws IOException, AutomationException
OIDFieldName specifies the field which contains the OID values.
setOIDFieldName
in interface INALocatorLocationFieldsAgent
fieldName
- The fieldName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getOIDFieldName() throws IOException, AutomationException
OIDFieldName specifies the field which contains the OID values.
getOIDFieldName
in interface INALocatorLocationFieldsAgent
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setPositionFieldName(String fieldName) throws IOException, AutomationException
PositionFieldName specifies the field which contains the position values. Position values range from 0.0 to 1.0 along the feature.
setPositionFieldName
in interface INALocatorLocationFieldsAgent
fieldName
- The fieldName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getPositionFieldName() throws IOException, AutomationException
PositionFieldName specifies the field which contains the position values. Position values range from 0.0 to 1.0 along the feature.
getPositionFieldName
in interface INALocatorLocationFieldsAgent
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSideFieldName(String fieldName) throws IOException, AutomationException
SideFieldName specifies the field which contains the side of street values.
setSideFieldName
in interface INALocatorLocationFieldsAgent
fieldName
- The fieldName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getSideFieldName() throws IOException, AutomationException
SideFieldName specifies the field which contains the side of street values.
getSideFieldName
in interface INALocatorLocationFieldsAgent
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setLocationRangesFieldName(String fieldName) throws IOException, AutomationException
LocationRangesFieldName specifies the name of the field which contains the location ranges BLOB field. You need to call the Bind method after setting this property before using the locator agent.
setLocationRangesFieldName
in interface INALocatorLocationFieldsAgent2
fieldName
- The fieldName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getLocationRangesFieldName() throws IOException, AutomationException
LocationRangesFieldName specifies the name of the field which contains the location ranges BLOB field. You need to call the Bind method after setting this property before using the locator agent.
getLocationRangesFieldName
in interface INALocatorLocationFieldsAgent2
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 |