Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/workers
Class: GeographyQueryBase

require(["esri/tasks/geoenrichment/GeographyQueryBase"], function(GeographyQueryBase) { /* code goes here */ });

Description

(Added at v3.12)
(Currently in beta)
Base class for all GeographyQuery objects.

Samples

Search for samples that use this class.

Subclasses

Constructors

NameSummary
new GeographyQueryBase(json?)Creates a new instance of the GeographyQueryBase object.

Properties

NameTypeSummary
countryIDStringTwo-digit country code.
datasetIDStringOptional string that denotes the ID of a dataset associated with a particular country.
featureLimitNumberOptional integer value where you can limit the number of features that are returned from the geographyQuery.
generalizationLevelNumberOptional integer that specifies the level of generalization of the geometries.
outSRSpatialReferenceDetermines spatial reference for output geometry if returnGeometry is set to true.
returnCentroidsBooleanUse this parameter to return all the geometries as points.
returnGeometryBooleanDetermines whether response will also include geometries.
useFuzzySearchBooleanOptional boolean to enable fuzzy search.

Methods

NameReturn typeSummary
toJson()ObjectConverts object to its JSON representation.
Constructor Details

new GeographyQueryBase(json?)

Creates a new instance of the GeographyQueryBase object.
Parameters:
<Object> json Optional JSON object used to set the properties of the object. JSON field names should match either the property names of the class, or the property names used in the REST API.
Property Details

<String> countryID

Two-digit country code. For example: "US".

<String> datasetID

Optional string that denotes the ID of a dataset associated with a particular country.
Sample:
query.datasetID = 'US.Census2010';

<Number> featureLimit

Optional integer value where you can limit the number of features that are returned from the geographyQuery. If null, the server will default to 1000.

<Number> generalizationLevel

Optional integer that specifies the level of generalization of the geometries. A value of 0 returns the most detailed and 6 is most generalized. Some geography layers, like 'countries', do not support returning highly detailed geometries.
Known values: 0|1|2|3|4|5|6
Default value: 0
Determines spatial reference for output geometry if returnGeometry is set to true.

<Boolean> returnCentroids

Use this parameter to return all the geometries as points. For example, you could return all U.S. ZIP Codes as centroids. Only applies if the returnGeometry property is also set to true.
Known values: true | false
Default value: false

<Boolean> returnGeometry

Determines whether response will also include geometries.
Known values: true | false
Default value: false

<Boolean> useFuzzySearch

Optional boolean to enable fuzzy search. See the REST API for details about using fuzzy logic.
Known values: true | false
Default value: false
Method Details

toJson()

Converts object to its JSON representation. Field names in the JSON will match field names used by the REST API.
Return type: Object