Skip To Content

Generate Product

Description

License:

The use of this resource requires an ArcGIS GIS Server Advanced license and a Production Mapping or Defense Mapping server extension license.

The generateProduct operation automates the process of producing a layout or map based on an existing map product definition.

Request parameters

ParameterDetails
productName

(Required)

The name of the product.

This parameter's value must match one of the product names from https://<topographicProductionServer-url>/products.

productVersion

(Required)

The version of the product to generate.

This parameter's value must match the name of one of the productVersion parameter values from https://<topographicProductionServer-url>/products.

aoiLayer

(Required)

The URL of the layer to use to define the product's area of interest.

aoiFeatureId

(Required)

The object ID of the area of interest feature in the aoiLayer.

Note:

If you specify a custom AOI using the optional customAoi parameter, this parameter is overridden and cannot be used.

customAoi

(Optional)

An array of features to use to define the product's area of interest (AOI). Only one feature is allowed at the current release.

Note:

If you specify a value for this optional parameter, it overrides the required aoiFeatureId parameter.

layerExclusion

(Optional)

A JSON array of layer names to exclude from the product.

Syntax:


[
  "<URL of the layer>",
  "<URL of the layer>",
  "<URL of the layer>"
]

ancillaryLayers

(Optional)

A JSON array of layer URLs to include in the final product.

Syntax:


[
  {
    "layer": "<URL of the layer>",
    "map": "<name of the map in which the layer will be inserted>",
    "layerIndex": "<insertion index of the layer>"
  },
  ...
]

Ancillary layers are added as feature service layers of the final product and don't extract data to the local geodatabase.

Note:

This parameter supports services located in the same portal site as the server object extension (SOE) or services that are publicly available. The featureClass, map, and layerIndex properties in the array are optional. If the dataset is identifiable from the feature service, it is not necessary to provide the featureClass property. The default values are 0 for layerIndex and BaseMap for map.

outputType

(Required)

A string value that specifies the type of output. Acceptable values are aprx, ppkx, pagx, pdf, and tiff. The outputType parameter also includes an optional outputFiles parameter that allows you to specify the kind of files that are included in the output as a JSON array of strings. Supported outputFiles string values are Geodatabase, Raster, ProductTemplate, and Project.

Syntax:


{
  "outputType": "pdf",
  "outputFiles": [
    "Geodatabase",
    "Raster",
    "ProductTemplate",
    "Project"
  ]
}
Note:

By default, the APRX and PAGX output types are exported as ZIP files that include a file geodatabase.

outputSettings

(Optional)

The predefined settings for a PDF or TIFF output type. Allowed inputs can either be the name of a preset file included with the ArcGIS Production Mapping or ArcGIS Defense Mapping Enterprise product files or a JSON data structure that identifies the output settings in one of the formats detailed below.

This parameter was added at Enterprise 11.0.

outputSettings JSON properties

The following tables contain more information about the outputSettings parameter. Each table corresponds to a different output:

PDF properties JSON data structure

PropertyDetails

formatClass

Specifies that the output file type is PDF.

Value: PDFFormat

DoCompressVectorGraphics

Specifies whether vector content streams are compressed. The value for this option should be true unless you need clear text for troubleshooting.

Values: true | false

ImageCompression

The compression scheme used to compress images and raster data in the output file.

Choose from the following:

  • 0—Compression is not applied.
  • 1—Run-length encoded compression, a lossless compression method that works well for images with large areas of the same color.
  • 2—Lossless compression method that works well for most images.
  • 3—Lossless compression method that uses a code table.
  • 4—Lossy compression method that works well for photographic type images.
  • 5—Automatically chooses the best compression type for each image on the page.

Typically, 4 is used for large images with many unique colors, and 2 is used for all other images.

DoEmbedFonts

Specifies whether embeddable fonts should be included in the output file to maintain font consistency across different platforms. Fonts that do not support embedding are not included, regardless of the value set for this property.

Values: true | false

LayersAndAttributes

Specifies whether layers should be included in the output file that can be viewed and managed in supported PDF readers. You can also specify whether attribute data from the features should be included. The range of acceptable values is 0 through 2.

  • 0—No layers are included
  • 1—Only .pdf layers are included
  • 2—Both .pdf layers and feature attributes are included
Note:

Including attributes for a large number of layers can affect performance and increase the size of your output file.

HasGeoRefInfo

Specifies whether geospatial information from the map frames is included in the output file. When geospatial information is included, you can extract x,y coordinate information from the map frames and perform geographic measurement directly on the map frame in supported PDF readers.

Values: true | false

ImageQuality

Specifies the amount of image resampling for raster imagery. This is a ratio that uses the value specified in the Resolution property to decide the effective resolution of raster content in the output file.

The value for this property specifies the ratio used to resample raster data. A value of 1 is a 1:1 ratio, where raster data is resampled at the same dots per inch (dpi) as the output vector data. A value of 3 is a 1:3 ratio, where raster data is stored at a third of the dpi of the vector dpi specified in the Resolution property, resulting in smaller file sizes. The range of acceptable values is 1 through 5. In many cases, the output file size can be reduced without visibly affecting image quality by specifying a higher value for this parameter.

ImageCompressionQuality

Specifies the amount of compression applied to images in the output file. Lower values result in smaller file sizes and reduced image quality, while higher values result in larger file sizes and higher image quality. This property is only applied when the ImageCompression value is set to 4 or 5. The range of acceptable values is 1 through 100.

Password

Specify a password that must be provided before the output file can be viewed.

DoFullRasterization

Specifies whether all content should be output as an image. For maps or layouts containing vector layers with a high density of vertices, this can drastically reduce the size of the output file. Vector-specific properties are not supported if this property's value is true.

Values: true | false

MasterPassword

Specifies a password that must be provided before edits can be made to the output file or before changes can be made to the permissions on the output file.

DoSimulateOverprint

Specifies whether the output file shows how overlapping areas of ink will appear when printed on a page. When this property is set to false, the colors on top knock out the colors below and only the topmost color prints, without any ink below it. If this property is set to true, the output file shows a simulation of overprinting, indicating how ink above and below would mix on the page when printed.

Values: true | false

Caution:

When you simulate overprinting, vector features are converted to raster images and are not maintained as individual vector layers in the output file. This results in options specific to vector data, such as LayersAndAttributes, being unavailable.

Learn more about overprinting

DoConvertCharacterMarkerSymbolsToPolygon

When you cannot embed fonts due to licensing or file format restrictions, set this value to true to export the marker symbols as polygons, which allows them to be viewed on machines that do not have the fonts installed.

Values: true | false

Note:

This does not apply to text; it only applies to font-based marker symbols.

LanguageCode

Specifies the language of the text in the output layout so a screen reader can interpret it correctly. If multiple languages are included in the output layout, additional post-processing may be required to set the language appropriately for individual text elements.

The value should be in IETF BCP 47 format.

Title

Specifies the title of the output file. This is displayed when the document is opened.

Subject

Specifies a brief overview of what the output file is about.

Author

Specifies the author of the output file. Some accessibility guidelines suggest that this should be the office or group producing the document, not an individual person.

Keywords

Specifies keywords that help with document searches.

IncludeAccessibilityTags

Specifies whether the output is a tagged PDF document, which can be read by screen readers or other assistive technologies.

Values: true | false

Note:

Alt text for layout elements is not included in the output file document unless this option is checked.

Resolution

Specifies the dpi of the vector data in the output layout.

If the DoFullRasterization property value is true, vectors are converted to rasters and stored at the resolution provided in this property.

If the DoFullRasterization property value is false, this value decides the resolution for vectors, which subsequently impacts the ratio used in the ImageQuality property to resample raster data.

DoClipToGraphicExtent

Specifies whether the extent of the output layout is cropped to include only areas with layout elements to help eliminate empty space.

Values: true | false

The following properties are available when PDF is specified as the output type:

The following JSON data structure is an example of the properties and values associated with the outputSettings parameter for a PDF output.


{
  "formatClass": "PDFFormat",
  "properties": {
    "DoCompressVectorGraphics": true,
    "ImageCompression": 5,
    "DoEmbedFonts": false,
    "LayersAndAttributes": 1,
    "HasGeoRefInfo": true,
    "ImageQuality": 5,
    "ImageCompressionQuality": 100,
    "Password": "test",
    "DoFullRasterization": true,
    "MasterPassword": "testediting",
    "DoSimulateOverprint": false,
    "DoConvertCharacterMarkerSymbolsToPolygon": false,
    "LanguageCode": "en-US",
    "Title": "MyTitle",
    "Subject": "MySubject",
    "Author": "JohnDoe",
    "Keywords": "Test GPL",
    "IncludeAccessibilityTags": true,
    "Resolution": 200,
    "DoClipToGraphicExtent": true
  }   
}

TIFF properties JSON data structure

PropertyDetails

formatClass

Specifies that the output file type is a TIFF.

Value: TIFFFormat

ColorMode

Specifies how many bits are used to describe color in a pixel.

  • 0—8-bit Adaptive: 255 possible colors. This option uses an adaptive palette to maintain recognizable hues.
  • 1—8-bit Grayscale: 256 shades of gray. All colors are converted to grayscale.
  • 2—24-bit True Color: 16,777,216 possible colors. This option works well for maximum color fidelity.
  • 3—32-bit with Alpha: 16,777,216 possible colors and an alpha (transparency) channel of 255 values. This option is useful for maps or layouts with transparency.

TIFFImageCompression

The compression scheme used to compress images and raster data in the output file.

  • 0—Compression is not applied.
  • 1—Lossless compression method that works well for images with large areas of the same color.
  • 2—Lossy compression method that works well for photographic type images.
  • 3—Lossless compression method uses a code table.
  • 4—Lossless compression method that works well for most cases.

HasGeoTiffTags

Specifies if GeoTIFF information is added directly to the TIFF file header. This allows the output file to be used as raster data in ArcGIS Pro or other GIS applications.

Values: true | false

Note:

This option is not available for 3D scenes. When exporting a 3D scene, set the GeoReferenceMapFrameName property to the 2D map frame on which you want the GeoTIFF information to be based. With GIS-capable software, you can choose to honor the GeoTIFF information in the export.

ImageCompressionQuality

Specifies the amount of compression applied to images in the output layout. Lower values result in smaller file sizes and reduced image quality, while higher values result in larger file sizes and higher image quality. This property is only applied when the ImageCompression property's value is set to 2 or 4. The range of acceptable values is 1 through 100.

HasTransparentBackground

Specifies whether the output layout is on a transparent page instead of a white page.

Values: true | false

GeoReferenceMapFrameName

Specifies the map frame on which the GeoTIFF information is based.

Resolution

Specifies the dpi of the output layout file.

DoClipToGraphicExtent

Specifies whether the extent of the layout is cropped to include only areas with layout elements to help eliminate blank space.

Values: true | false

The following properties are available when TIFF is specified as the output type.

The following JSON data structure is an example of the properties and values associated with the outputSettings parameter for a TIFF output.


{
  "formatClass": "TIFFFormat",
  "properties": {
    "ColorMode": 3,
    "TIFFImageCompression": 3,
    "HasGeoTiffTags": true,
    "ImageCompressionQuality": 100,
    "HasTransparentBackground": false,
    "GeoReferenceMapFrameName": "Map Frame",
    "Resolution": 400,
    "DoClipToGraphicExtent": false
  }
}

Response properties

The following details are for the properties of a response:

PropertyDetails
jobId

The job identifier.

statusUrl

The URL to query for the status of a running job.

Example usage

The following example URL queries the generateProduct REST operation:

https://machine.domain.com/server/rest/services/SampleService/TopographicProductionServer/generateProduct?productName=MTM50&productVersion=TRD45&areaOfInterestLayer=https%3A%2F%2Fmachine.domain.com%2Fserver%2Frest%2Fservices%2FAOIService%2FMapServer%2F0&areaOfInterestFeatureId=120733&layerExclusion=&outputType=pdf&f=json

JSON Response syntax

The following is the syntax of a response:


{
  "jobId": "<jobID>",
  "statusURL": "<statusURL>",
  "success": <true | false>
}

JSON Response example

The following is an example of a successful response:


{
  "jobId": "0AECA2CE-8690-4EEC-935B-CEA8E403765F",
  "statusUrl": "https://machine.domain.com/server/rest/services/SampleMapService/MapServer/exts/TopographicProductionServer/jobs/job/0AECA2CE-8690-4EEC-935B-CEA8E403765F",
  "success": true
}