Packagecom.esri.ags.tasks.geoEnrichmentClasses
Classpublic class GeometryStudyArea
InheritanceGeometryStudyArea Inheritance StudyArea Inheritance Object

Since : ArcGIS API 3.5 for Flex

A GeometryStudyArea defines a location in the form a point or an area.

This form of a study area will use the input geometry and options to enrich and return data for the area.

If the geometry is a MapPoint or a Polyline is input as a study area, the service will create a 1-mile ring buffer around the geometry to collect and append enrichment data. You can optionally change the ring buffer size or create drive-time service areas around the geometry by setting the options.

The most common method to determine the center point for a study areas is a set of one or many point locations defined as XY locations. More specifically, one or many input points (latitude and longitude) can be provided to the service to set the study areas that you want to enrich with additional information. You can create a buffer ring or drive-time service area around the points to aggregate data for the study areas.

If the geometry is a Polygon, the study area will directly use the geometry.

View the examples

See also

com.esri.ags.tasks.GeoEnrichmentTask.enrich()
com.esri.ags.tasks.geoEnrichmentClasses.EnrichParametersBase.studyAreas
Live sample - Enriching a location
Live sample - Infographic
Live sample - Compare Infographics
Live sample - InfographicCarousel
Live sample - InfographicsCarousel with custom skins


Public Properties
 PropertyDefined By
 Inheritedattributes : Object
Attributes returned as attributes of features in the results.
StudyArea
 InheritedcomparisonGeographyLevels : Array
An array of comparison levels of geography
StudyArea
  geometry : Geometry
The geometry for this study area.
GeometryStudyArea
 Inheritedoptions : StudyAreaOptions
Optional parameter to specify enrichment behavior.
StudyArea
 InheritedreturnGeometry : Boolean = false
Optional parameter to request the output geometries in the response.
StudyArea
Public Methods
 MethodDefined By
  
GeometryStudyArea(geometry:Geometry = null)
Creates a new GeometryStudyArea object.
GeometryStudyArea
  
toJSON(key:String = null):Object
[override] Convert this GeometryStudyArea to a JSON object.
GeometryStudyArea
Property Detail
geometryproperty
public var geometry:Geometry

The geometry for this study area. Supported geometry types are MapPoint, Polyline and Polygon.

Constructor Detail
GeometryStudyArea()Constructor
public function GeometryStudyArea(geometry:Geometry = null)

Creates a new GeometryStudyArea object.

Parameters
geometry:Geometry (default = null) — The geometry for this study area
Method Detail
toJSON()method
override public function toJSON(key:String = null):Object

Convert this GeometryStudyArea to a JSON object. If you need a JSON formatted string, you can pass this GeometryStudyArea directly to JSONUtil.encode().

Parameters

key:String (default = null) — Unused but required for compatibility with JSON.stringify().

Returns
Object — JSON object

See also

Examples
One point described as map coordinates:
 var studyArea:GeometryStudyArea = new GeometryStudyArea();
 studyArea.geometry = new WebMercatorMapPoint(-117.1956, 34.0572);
 
One point described as map coordinates with attributes:
 var studyArea:GeometryStudyArea = new GeometryStudyArea();
 studyArea.geometry = new WebMercatorMapPoint(-122.435, 37.785);
 studyArea.attributes = { myID : "point1" };
 
One point and and include two comparison levels of geography:
 var studyArea:GeometryStudyArea = new GeometryStudyArea();
 studyArea.geometry = new WebMercatorMapPoint(-122.435, 37.785);
 studyArea.comparisonGeographyLevels = [ new GeographyLevel(null, null, "Admin2"), new GeographyLevel(null, null, "Admin3") ];
 
One-kilometer buffer around an input line feature:
 var studyArea:GeometryStudyArea = new GeometryStudyArea();
 studyArea.geometry = new Polyline([[ new MapPoint(-13048580, 4036370), new MapPoint(-13046151, 4036366) ]], new SpatialReference(102100));
 studyArea.options = new RingBuffer([ 1 ], RingBuffer.KILOMETERS);
 studyArea.returnGeometry = true;
 
Map areas described as polygons:
 var studyArea:GeometryStudyArea = new GeometryStudyArea();
 studyArea.geometry = new Polygon([[ new MapPoint(-117.185412, 34.063170),
                                     new MapPoint(-122.81, 37.81),
                                     new MapPoint(-117.200570, 34.057196),
                                     new MapPoint(-117.185412,34.063170)]],
                                  new SpatialReference(4326));
 studyArea.attributes = { id: 1, name: "optional polygon area name" };
 studyArea.options = new RingBuffer([ 1 ], RingBuffer.KILOMETERS);