Extract Data and Email Task (Server)

Summary

Extracts the data in the specified layers and area of interest to the selected format and spatial reference, zips the data, and emails it to the specified address. This tool can be used to create a Data Extraction geoprocessing service.

Caution:

This tool is intended primarily for use as a part of a geoprocessing service. When using this tool as a part of a geoprocessing service, copy the tool into a custom toolbox, edit the model, and reconfigure it as necessary. It is important to note that this tool will not work unless you open and edit the model (as described below) before publishing the model as a service.

Usage

  • This tool will not function correctly unless it is edited and the email server is configured. To configure the email server settings, you will have to copy this model to your own custom toolbox before editing the model.

    1. Right-click a copied version of this model and select Edit. ModelBuilder will open and the model will appear similar to the illustration below.
      The Extract Data and Email Task model before editing.
    2. Double-click the Send Email With Zip File Attachment model element to open the tool dialog box.
      1. Enter values for From, Subject, Text, Max File Size, and SMTP Email Server.
      2. Click OK.
    3. You can leave the parameter Layers to Clip and Custom Spatial Reference Folder blank unless you want to provide specific layers or customized spatial reference folder. Leave the parameter to and Sent blank. The parameter Sent is a derived output of Boolean data type, which means it will not show as a parameter when you use the tool. It will set the value automatically when the zip file is sent to the e-mail address you provide.
    4. Save and exit the model.
    5. Run the model tool in ArcMap containing the layers you want to provide to create a result, then publish the result as a geoprocessing service.

  • The Feature Format and Raster Format parameters contain a list of options. These options are set from the Value List filter on the Parameters tab of the model Properties.

  • You can add, modify, or remove the list of formats for either the Feature Format parameter or the Raster Format parameter. You will have to copy this model to your own custom toolbox before making any changes.

    1. Right-click a copied version of this tool and select Properties.
    2. In the properties dialog box that appears, click the Parameters tab.
    3. Find the parameter of interest in the table of parameters. On the right side of the table click Ellipsis to bring up its value list. The set of default formats should be listed.
    4. Add, modify, or remove formats from the list as desired. The string you provide needs to be delimited as: Name of format - Short Name - Extension. The hyphens are required and there must be one space before and after the hyphen.
    5. Click OK to apply the changes and exit.

  • By default, all supported raster formats are in the drop-down list of raster formats.

Parameters

LabelExplanationData Type
Layers to Clip

The layers to be clipped. Layers must be feature or raster; layer files are not supported.

Layer
Area of Interest

One or more polygons by which the layers will be clipped.

Feature Set
Feature Format

Specifies the format of the output features. The format should be specified as follows:

  • Name or format - Short Name - extension (if any)

The hyphens are required and there must be one space before and after the hyphen.

For example:

  • File Geodatabase - GDB - .gdb
  • Shapefile - SHP - .shp
  • Autodesk AutoCAD - DXF_R2007 - .dxf
  • Autodesk AutoCAD - DWG_R2007 - .dwg
  • Bentley Microstation Design (V8) - DGN_V8 - .dgn

The list of short names supported includes DGN_V8, DWG_R14, DWG_R2000, DWG_R2004, DWG_R2005, DWG_R2007, DWG_R2010, DXF_R14, DXF_R2000, DXF_R2004, DXF_R2005, DXF_R2007, and DXF_R2010.

String
Raster Format

Specifies the format of the output raster datasets. The format should be specified as follows:

  • Name of format - Short Name - extension (if any)

The hyphens are required and there must be one space before and after the hyphen.

For example:

  • Esri GRID - GRID
  • File Geodatabase - GDB - .gdb
  • ERDAS IMAGINE - IMG - .img
  • Tagged Image File Format - TIFF - .tif
  • Portable Network Graphics - PNG - .png
  • Graphic Interchange Format - GIF - .gif
  • Joint Photographics Experts Group - JPEG - .jpg
  • Joint Photographics Experts Group - JPEG - .jp2
  • Bitmap - BMP - .bmp

Some of the above raster formats have limitations and not all data can be converted to the format.

String
To

The email address of the recipient.

Caution:

This tool will be able to email to this address if and only if the SMTP server has been configured within this model.

String

Derived Output

LabelExplanationData Type
Send Email Succeeded

A Boolean indicating whether or not the email was sent successfully.

Boolean

arcpy.server.ExtractDataAndEmailTask(Layers_to_Clip, Area_of_Interest, Feature_Format, Raster_Format, To)
NameExplanationData Type
Layers_to_Clip
[Layer,...]

The layers to be clipped. Layers must be feature or raster; layer files are not supported.

Layer
Area_of_Interest

One or more polygons by which the layers will be clipped.

Feature Set
Feature_Format

Specifies the format of the output features. The format should be specified as follows:

  • Name or format - Short Name - extension (if any)

The hyphens are required and there must be one space before and after the hyphen.

For example:

  • File Geodatabase - GDB - .gdb
  • Shapefile - SHP - .shp
  • Autodesk AutoCAD - DXF_R2007 - .dxf
  • Autodesk AutoCAD - DWG_R2007 - .dwg
  • Bentley Microstation Design (V8) - DGN_V8 - .dgn

The list of short names supported includes DGN_V8, DWG_R14, DWG_R2000, DWG_R2004, DWG_R2005, DWG_R2007, DWG_R2010, DXF_R14, DXF_R2000, DXF_R2004, DXF_R2005, DXF_R2007, and DXF_R2010.

String
Raster_Format

Specifies the format of the output raster datasets. The format should be specified as follows:

  • Name of format - Short Name - extension (if any)

The hyphens are required and there must be one space before and after the hyphen.

For example:

  • Esri GRID - GRID
  • File Geodatabase - GDB - .gdb
  • ERDAS IMAGINE - IMG - .img
  • Tagged Image File Format - TIFF - .tif
  • Portable Network Graphics - PNG - .png
  • Graphic Interchange Format - GIF - .gif
  • Joint Photographics Experts Group - JPEG - .jpg
  • Joint Photographics Experts Group - JPEG - .jp2
  • Bitmap - BMP - .bmp
Caution:

Some of the above raster formats have limitations and not all data can be converted to the format. For a list of formats and their limitations, refer to List of supported sensors.

String
To

The email address of the recipient.

Caution:

This tool will be able to email to this address if and only if the SMTP server has been configured within this model.

String

Derived Output

NameExplanationData Type
Sent

A Boolean indicating whether or not the email was sent successfully.

Boolean

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics