10.2.5: AGSNALayerDefinition Class Reference
10.2.5
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
AGSNALayerDefinition Class Reference

Description

Instances of this class represent possible inputs such as stops/facilities/incidents/barriers for AGSRouteTaskParameters, AGSServiceAreaTaskParameters, and AGSClosestFacilityTaskParameters.

A layer definition allows you to specify these inputs by-reference. This is useful when you already have them stored in a data layer of a service. In such cases, the application does not need to know the actual details about each input. All it needs to do is set up a layer definition specifiying which inputs should be included in the analysis.

The data layer can be part of the network analysis service itself, or it can belong to another service on any server. The network analysis service will automatically fetch input from the data layer at run-time when the analysis is being performed. You can restrict which inputs are used by specificy SQL queries or Spatial relationships.

Since
1.8
Inheritance diagram for AGSNALayerDefinition:
<AGSCoding>

Instance Methods

(void) - decodeWithJSON:
 
(NSDictionary *) - encodeToJSON
 
(id) - initWithJSON:
 
(id) - initWithLayerName:geometry:spatialRelationship:where:
 
(id) - initWithLayerName:geometry:spatialRelationship:whereClause:
 
(id) - initWithLayerName:where:
 
(id) - initWithLayerName:whereClause:
 
(id) - initWithURL:query:
 

Properties

AGSGeometrygeometry
 
NSString * layerName
 
AGSQueryquery
 
AGSSpatialRelationship spatialRelationship
 
NSURL * URL
 
NSString * where
 
NSString * whereClause
 

Method Documentation

- (void) decodeWithJSON: (NSDictionary *)  json
optionalinherited

Decode object from JSON representation.

Parameters
jsonThe JSON representation of the object to be decoded.
Since
1.0
- (NSDictionary *) encodeToJSON
optionalinherited

Encode and return JSON representation for object.

Returns
JSON representation of object.
Since
1.0
- (id) initWithJSON: (NSDictionary *)  json
optionalinherited

Initialize and return object from JSON representation.

Parameters
jsonThe JSON representation of the object to be created.
Returns
Object decoded from JSON representation.
Since
1.0

Reimplemented in AGSWebMapFeatureCollection.

- (id) initWithLayerName: (NSString *)  layerName
geometry: (AGSGeometry *)  geometry
spatialRelationship: (AGSSpatialRelationship spatialRelationship
where: (NSString *)  where 

Initialize a new AGSNALayerDefinition

Parameters
layerNameThe name of the data layer in the network analyst service to reference.
geometryThe geometry used to select which features should be used as inputs
spatialRelationshipThe spatial relationship to apply to the geometry for selecting features.
whereThe where clause for the query to further restrict which features from the data layer should be used as inputs
Returns
An initialized AGSNALayerDefinition object.
Since
1.8
Deprecated:
Deprecated at 10.2.5. Please use initWithLayerName:geometry:spatialRelationship:whereClause: instead.
- (id) initWithLayerName: (NSString *)  layerName
geometry: (AGSGeometry *)  geometry
spatialRelationship: (AGSSpatialRelationship spatialRelationship
whereClause: (NSString *)  whereClause 

Initialize a new AGSNALayerDefinition

Parameters
layerNameThe name of the data layer in the network analyst service to reference.
geometryThe geometry used to select which features should be used as inputs
spatialRelationshipThe spatial relationship to apply to the geometry for selecting features.
whereClauseThe where clause for the query to further restrict which features from the data layer should be used as inputs
Returns
An initialized AGSNALayerDefinition object.
Since
10.2.5
- (id) initWithLayerName: (NSString *)  layerName
where: (NSString *)  where 

Initialize a new AGSNALayerDefinition.

Parameters
layerNameThe name of the data layer in the network analyst service to reference.
whereThe where clause for the query to restrict which features from the data layer should be used as inputs.
Returns
An initialized AGSNALayerDefinition object.
Since
1.8
Deprecated:
Deprecated at 10.2.5. Please use initWithLayerName:whereClause: instead.
- (id) initWithLayerName: (NSString *)  layerName
whereClause: (NSString *)  whereClause 

Initialize a new AGSNALayerDefinition.

Parameters
layerNameThe name of the data layer in the network analyst service to reference.
whereClauseThe where clause for the query to restrict which features from the data layer should be used as inputs.
Returns
An initialized AGSNALayerDefinition object.
Since
10.2.5
- (id) initWithURL: (NSURL *)  url
query: (AGSQuery *)  query 

Initialize a new AGSNALayerDefinition.

Parameters
urlof a data layer in a map or feature service. The network analysis service retrieves features from this data layer at run-time to use as inputs in the analysis.
queryto restrict which features from the data layer should be used as inputs
Returns
Availability:
This feature is only available with services from ArcGIS Server 10.1 or above
Since
2.3

Property Documentation

- (AGSGeometry*) geometry
readwritenonatomicstrong

The geometry used to select features. The spatialRelationship is applied to this geometry by the network analysis service while selecting which features to use as inputs during the analysis.

See also
- initWithLayerName:geometry:spatialRelationship:where:
Since
1.8
- (NSString*) layerName
readwritenonatomiccopy

The name of the data layer in the network analysis service itself. The service retrieves features from this data layer at run-time to use as stops/barriers/facilities/incidents when the analysis is being performed.

Since
1.8
- (AGSQuery*) query
readnonatomicstrong

Query to restrict which features from the data layer should be retrieved.

Availability:
This feature is only available with services from ArcGIS Server 10.1 or above

Since
2.3
See also
- initWithURL:query:
- (AGSSpatialRelationship) spatialRelationship
readwritenonatomicassign

The spatial relationship to be applied on the input geometry while performing the query. See the Constants Table for a list of valid values. The default spatial relationship is AGSSpatialRelationshipIntersects.

Since
1.8
See also
- initWithLayerName:geometry:spatialRelationship:where:
- (NSURL*) URL
readnonatomiccopy

The URL of a data layer in any map or feature service. The network analysis service retrieves features from this data layer at run-time to use as stops/barriers/facilities/incidents when the analysis is being performed.

Availability:
This feature is only available with services from ArcGIS Server 10.1 or above

Since
2.3
See also
- initWithURL:query:
- (NSString*) where
readwritenonatomiccopy

A where clause for the query. Any legal SQL where clause operating on the fields in the layer is allowed, for example: = "POP2000 > 350000".

Since
1.8
See also
- initWithLayerName:where:
Deprecated:
Deprecated at 10.2.5. Please use AGSNALayerDefinition::whereClause instead.
- (NSString*) whereClause
readwritenonatomiccopy

A where clause for the query. Any legal SQL where clause operating on the fields in the layer is allowed, for example: = "POP2000 > 350000".

Since
10.2.5
See also
- initWithLayerName:where: