nodes: 0, module; 1, function_definition; 2, function_name:measure; 3, parameters; 4, block; 5, identifier:self; 6, identifier:fromGeometry; 7, identifier:toGeometry; 8, identifier:measureOperation; 9, default_parameter; 10, default_parameter; 11, default_parameter; 12, default_parameter; 13, default_parameter; 14, default_parameter; 15, expression_statement; 16, expression_statement; 17, expression_statement; 18, if_statement; 19, if_statement; 20, if_statement; 21, if_statement; 22, if_statement; 23, return_statement; 24, identifier:geometryType; 25, string:"esriGeometryPoint"; 26, identifier:pixelSize; 27, None; 28, identifier:mosaicRule; 29, None; 30, identifier:linearUnit; 31, None; 32, identifier:angularUnit; 33, None; 34, identifier:areaUnit; 35, None; 36, comment:"""
          The measure operation is performed on an image service resource. It
          lets a user measure distance, direction, area, perimeter, and height
          from an image service. The result of this operation includes the name
          of the raster dataset being used, sensor name, and measured values.
  
          The measure operation can be supported by image services from raster
          datasets and mosaic datasets. Spatial reference is required to perform
          basic measurement (distance, area, and so on). Sensor metadata (geodata
          transformation) needs to be present in the data source used by an image
          service to enable height measurement (for example, imagery with RPCs).
          The mosaic dataset or service needs to include DEM to perform 3D measure.
  
          Users can provide arguments to the measure operation as query parameters.
  
          Inputs:
  
          fromGeometry - A geometry that defines the "from" location of the
           measurement. The structure of the geometry is the same as the structure
           of the JSON geometry objects returned by the ArcGIS REST API. In addition
           to the JSON structures, for points, you can specify the geometry with a
           simple comma-separated syntax.
           By default, the geometry is assumed to be in the spatial reference of
           the image service. You can specify a different spatial reference by
           using the JSON structure syntax for geometries.
  
           toGeometry - A geometry that defines the "to" location of the measurement.
           The type of geometry must be the same as fromGeometry. The structure of
           the geometry is the same as the structure of the JSON geometry objects
           returned by the ArcGIS REST API. In addition to the JSON structures, for
           points, you can specify the geometry with a simple comma-separated syntax.
  
           By default, the geometry is assumed to be in the spatial reference of
           the image service. You can specify a different spatial reference by
           using the JSON structure syntax for geometries.
  
          geometryType - The type of geometry specified by the fromGeometry and
           toGeometry parameters. The geometry type can be a point, polygon, or
           envelope. The default geometry type is point.
           Values: esriGeometryPoint | esriGeometryPolygon | esriGeometryEnvelope
  
          measureOperation - Specifies the type of measure being performed.
           Values: esriMensurationPoint | esriMensurationDistanceAndAngle |
           esriMensurationAreaAndPerimeter | esriMensurationHeightFromBaseAndTop |
           esriMensurationHeightFromBaseAndTopShadow |
           esriMensurationHeightFromTopAndTopShadow | esriMensurationCentroid |
           esriMensurationPoint3D | esriMensurationDistanceAndAngle3D |
           esriMensurationAreaAndPerimeter3D | esriMensurationCentroid3D
  
          pixelSize - The pixel level (resolution) being measured. If pixel size
           is not specified, pixelSize will default to the base resolution of the
           image service. The raster at the specified pixel size in the mosaic
           dataset will be used for measurement.
           The structure of the pixelSize parameter is the same as the structure
           of the point object returned by the ArcGIS REST API. In addition to the
           JSON structure, you can specify the pixel size with a simple
           comma-separated syntax.
  
          mosaicRule - Specifies the mosaic rule when defining how individual
           images should be mosaicked. When a mosaic rule is not specified, the
           default mosaic rule of the image service will be used (as advertised
           in the root resource: defaultMosaicMethod, mosaicOperator, sortField,
           sortValue). The first visible image is used by measure.
  
          linearUnit - The linear unit in which height, length, or perimeters
           will be calculated. It can be any of the following esriUnits constant.
           If the unit is not specified, the default is esriMeters. The list of
           valid esriUnits constants include:
           esriInches | esriFeet | esriYards | esriMiles | esriNauticalMiles |
           esriMillimeters | esriCentimeters | esriDecimeters | esriMeters |
           esriKilometers
  
          angularUnit - The angular unit in which directions of line segments
           will be calculated. It can be one of the following esriDirectionUnits
           constants: esriDURadians | esriDUDecimalDegrees
           If the unit is not specified, the default is esriDUDecimalDegrees.
  
          areaUnit - The area unit in which areas of polygons will be calculated.
           It can be any esriAreaUnits constant. If the unit is not specified, the
           default is esriSquareMeters. The list of valid esriAreaUnits constants
           include:
           esriSquareInches | esriSquareFeet | esriSquareYards | esriAcres |
           esriSquareMiles | esriSquareMillimeters | esriSquareCentimeters |
           esriSquareDecimeters | esriSquareMeters | esriAres | esriHectares |
           esriSquareKilometers
          """; 37, assignment; 38, assignment; 39, not_operator; 40, block; 41, not_operator; 42, block; 43, not_operator; 44, block; 45, not_operator; 46, block; 47, not_operator; 48, block; 49, call; 50, identifier:url; 51, binary_operator:self._url + "/measure"; 52, identifier:params; 53, dictionary; 54, comparison_operator:pixelSize is None; 55, expression_statement; 56, comparison_operator:mosaicRule is None; 57, expression_statement; 58, comparison_operator:linearUnit is None; 59, expression_statement; 60, comparison_operator:angularUnit is None; 61, expression_statement; 62, comparison_operator:areaUnit is None; 63, expression_statement; 64, attribute; 65, argument_list; 66, attribute; 67, string:"/measure"; 68, pair; 69, pair; 70, pair; 71, pair; 72, pair; 73, identifier:pixelSize; 74, None; 75, assignment; 76, identifier:mosaicRule; 77, None; 78, assignment; 79, identifier:linearUnit; 80, None; 81, assignment; 82, identifier:angularUnit; 83, None; 84, assignment; 85, identifier:areaUnit; 86, None; 87, assignment; 88, identifier:self; 89, identifier:_get; 90, keyword_argument; 91, keyword_argument; 92, keyword_argument; 93, keyword_argument; 94, keyword_argument; 95, identifier:self; 96, identifier:_url; 97, string:"f"; 98, string:"json"; 99, string:"fromGeometry"; 100, identifier:fromGeometry; 101, string:"toGeometry"; 102, identifier:toGeometry; 103, string:"geometryType"; 104, identifier:geometryType; 105, string:"measureOperation"; 106, identifier:measureOperation; 107, subscript; 108, identifier:pixelSize; 109, subscript; 110, identifier:mosaicRule; 111, subscript; 112, identifier:linearUnit; 113, subscript; 114, identifier:angularUnit; 115, subscript; 116, identifier:areaUnit; 117, identifier:url; 118, identifier:url; 119, identifier:param_dict; 120, identifier:params; 121, identifier:securityHandler; 122, attribute; 123, identifier:proxy_url; 124, attribute; 125, identifier:proxy_port; 126, attribute; 127, identifier:params; 128, string:"pixelSize"; 129, identifier:params; 130, string:"mosaicRule"; 131, identifier:params; 132, string:"linearUnit"; 133, identifier:params; 134, string:"angularUnit"; 135, identifier:params; 136, string:"areaUnit"; 137, identifier:self; 138, identifier:_securityHandler; 139, identifier:self; 140, identifier:_proxy_url; 141, identifier:self; 142, identifier:_proxy_port
code: def measure(self,fromGeometry,toGeometry,measureOperation,
                  geometryType="esriGeometryPoint",pixelSize=None,mosaicRule=None,
                  linearUnit=None,angularUnit=None,areaUnit=None):
          """
          The measure operation is performed on an image service resource. It
          lets a user measure distance, direction, area, perimeter, and height
          from an image service. The result of this operation includes the name
          of the raster dataset being used, sensor name, and measured values.
  
          The measure operation can be supported by image services from raster
          datasets and mosaic datasets. Spatial reference is required to perform
          basic measurement (distance, area, and so on). Sensor metadata (geodata
          transformation) needs to be present in the data source used by an image
          service to enable height measurement (for example, imagery with RPCs).
          The mosaic dataset or service needs to include DEM to perform 3D measure.
  
          Users can provide arguments to the measure operation as query parameters.
  
          Inputs:
  
          fromGeometry - A geometry that defines the "from" location of the
           measurement. The structure of the geometry is the same as the structure
           of the JSON geometry objects returned by the ArcGIS REST API. In addition
           to the JSON structures, for points, you can specify the geometry with a
           simple comma-separated syntax.
           By default, the geometry is assumed to be in the spatial reference of
           the image service. You can specify a different spatial reference by
           using the JSON structure syntax for geometries.
  
           toGeometry - A geometry that defines the "to" location of the measurement.
           The type of geometry must be the same as fromGeometry. The structure of
           the geometry is the same as the structure of the JSON geometry objects
           returned by the ArcGIS REST API. In addition to the JSON structures, for
           points, you can specify the geometry with a simple comma-separated syntax.
  
           By default, the geometry is assumed to be in the spatial reference of
           the image service. You can specify a different spatial reference by
           using the JSON structure syntax for geometries.
  
          geometryType - The type of geometry specified by the fromGeometry and
           toGeometry parameters. The geometry type can be a point, polygon, or
           envelope. The default geometry type is point.
           Values: esriGeometryPoint | esriGeometryPolygon | esriGeometryEnvelope
  
          measureOperation - Specifies the type of measure being performed.
           Values: esriMensurationPoint | esriMensurationDistanceAndAngle |
           esriMensurationAreaAndPerimeter | esriMensurationHeightFromBaseAndTop |
           esriMensurationHeightFromBaseAndTopShadow |
           esriMensurationHeightFromTopAndTopShadow | esriMensurationCentroid |
           esriMensurationPoint3D | esriMensurationDistanceAndAngle3D |
           esriMensurationAreaAndPerimeter3D | esriMensurationCentroid3D
  
          pixelSize - The pixel level (resolution) being measured. If pixel size
           is not specified, pixelSize will default to the base resolution of the
           image service. The raster at the specified pixel size in the mosaic
           dataset will be used for measurement.
           The structure of the pixelSize parameter is the same as the structure
           of the point object returned by the ArcGIS REST API. In addition to the
           JSON structure, you can specify the pixel size with a simple
           comma-separated syntax.
  
          mosaicRule - Specifies the mosaic rule when defining how individual
           images should be mosaicked. When a mosaic rule is not specified, the
           default mosaic rule of the image service will be used (as advertised
           in the root resource: defaultMosaicMethod, mosaicOperator, sortField,
           sortValue). The first visible image is used by measure.
  
          linearUnit - The linear unit in which height, length, or perimeters
           will be calculated. It can be any of the following esriUnits constant.
           If the unit is not specified, the default is esriMeters. The list of
           valid esriUnits constants include:
           esriInches | esriFeet | esriYards | esriMiles | esriNauticalMiles |
           esriMillimeters | esriCentimeters | esriDecimeters | esriMeters |
           esriKilometers
  
          angularUnit - The angular unit in which directions of line segments
           will be calculated. It can be one of the following esriDirectionUnits
           constants: esriDURadians | esriDUDecimalDegrees
           If the unit is not specified, the default is esriDUDecimalDegrees.
  
          areaUnit - The area unit in which areas of polygons will be calculated.
           It can be any esriAreaUnits constant. If the unit is not specified, the
           default is esriSquareMeters. The list of valid esriAreaUnits constants
           include:
           esriSquareInches | esriSquareFeet | esriSquareYards | esriAcres |
           esriSquareMiles | esriSquareMillimeters | esriSquareCentimeters |
           esriSquareDecimeters | esriSquareMeters | esriAres | esriHectares |
           esriSquareKilometers
          """
  
          url = self._url + "/measure"
          params = {
              "f" : "json",
              "fromGeometry" : fromGeometry,
              "toGeometry": toGeometry,
              "geometryType": geometryType,
              "measureOperation": measureOperation
              }
  
          if not pixelSize is None:
              params["pixelSize"] = pixelSize
          if not mosaicRule is None:
              params["mosaicRule"] = mosaicRule
          if not linearUnit is None:
              params["linearUnit"] = linearUnit
          if not angularUnit is None:
              params["angularUnit"] = angularUnit
          if not areaUnit is None:
              params["areaUnit"] = areaUnit
  
          return self._get(url=url,
                           param_dict=params,
                           securityHandler=self._securityHandler,
                           proxy_url=self._proxy_url,
                           proxy_port=self._proxy_port)