Generate Product

URL:
https://<root>/<serviceName>/TopographicProductionServer/generateProduct
Methods:
GET
Required Capability:
Requires an ArcGIS GIS Server Advanced license and a Production Mapping or Defense Mapping server extension license
Version Introduced:
10.9

Description

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)

A string value of the product version name to generate. The product version name must match a name value listed in the products endpoint.

Alternatively, a JSON object with the following properties can be included starting at ArcGIS Enterprise 11.2.

  • extractionDatabase—Overrides the extractionDatabase value at the map product level.
  • operationOverrides—Overrides an operation's parameter values with the value specified in the name-value pairs of parameters. The operation is specified by the id property and the parameter with the name property.
  • excludedOperations—Excludes the specified operations. These operations will not be executed.

The following example shows how to use operationOverrides and excludedOperations. The operationOVerrides property changes the contour_interval parameter value for the contours operation and the excludedOperations property prevents an operation from running.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
	"name": "TRD_4_5",
	"operationOverrides": [
		{
			"id": "26C62049-A11F-4D5B-BC80-00CF3597555C",
			"parameters":
			{
				"name": "contour_interval",
				"value": "100"
			}
		},
	]
	"excludedOperations": [
		"45B62049-A11F-4D5B-BC80-00CF3597555C"
	]
}

aoiLayer

(Required)

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

aoiFeatureId

(Required)

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

customAoi

(Optional)

A featureSet used to define the product's area of interest (AOI). Only one feature is allowed.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
	"geometryType": "esriGeometryPolygon",
	"spatialReference":
	{
		"wkid": 102100,
		"latestWkid": 3857
	},
	"fields":
	[
		{
			"name": "OBJECTID",
			"type": "esriFieldTypeOID",
			"alias": "OBJECTID"
		},
		...
	],
	"features":
	[
		{
			"attributes":
			{
				"OBJECTID": 1,
				...
			},
			"geometry":
			{
				"rings":
				[
					[-8043489.58459999971, 2124251.45230000094],
					[-8043511.36969999969, 2153607.65269999951],
					[-8014101.26469999924, 2153604.59160000086],
					[-8014123.04659999907, 2124254.51069999859],
					[-8043489.58459999971, 2124251.45230000094]
				]
			}
		}
	]
},

layerExclusion

(Optional)

An array of layer names to exclude from the product. Syntax:

Use dark colors for code blocksCopy
1
2
3
4
5
[
  "<URL of the layer>",
  "<URL of the layer>",
  "<URL of the layer>"
]

ancillaryLayers

(Optional)

An array of layer URLs to include in the final product. Syntax:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
[
  {
    "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.

outputType

(Required)

A string value that specifies the output type. Supported values include aprx, ppkx, pagx, pdf, and tiff. Additional files can be formatted using the outputFiles parameter. Use JSON to customize the output type of a file. Supported outputFiles values include Geodatabase, Raster, ProductTemplate, and Project . Syntax:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
{
  "outputType": "pdf",
  "outputFiles": [
    "Geodatabase",
    "Raster",
    "ProductTemplate",
    "Project"
  ]
}

outputName

(Optional)

The name to use for the exported file. If no name is provided, the sheet identifier value is used.

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, the 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 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. Set this value to 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

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 to include an overprint preview in the output file. When this property is set to false, the top colors knock out the colors below and only the topmost color prints. If this property is set to true, the output file shows a simulation of overprinting.

Values: true | false


Learn more about overprinting

DoConvertCharacterMarkerSymbolsToPolygon

If 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

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

Resolution

Specifies the dots per inch '(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 determines the resolution for vectors and impacts the ratio used in the ImageQuality property to resample raster data.

DoClipToGraphicExtent

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

Values: true | false

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

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
  "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 format is 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

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 JSON data structure is an example of the properties and values associated with the outputSettings parameter for a TIFF output.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
{
  "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

Generate a map product output using the generateProduct REST operation.

Request URL and parameters:

Use dark colors for code blocksCopy
1
https://machine.domain.com/server/rest/services/SampleService/TopographicProductionServer/generateProduct
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
productName=MTM50
productVersion=TRD_4_5
aoiLayer=https://machine.domain.com/server/rest/services/AOIService/MapServer/0
aoiFeatureId=120733
layerExclusion=
[
	"https://servermachine.domain.com/server/rest/services/SampleWorldCities/MapServer/1",
	"https://servermachine.domain.com/server/rest/services/SampleWorldCities/MapServer/2",
	"https://servermachine.domain.com/server/rest/services/SampleWorldCities/MapServer/3"
]
outputType=pdf
f=json

JSON Response syntax

The following is the syntax of a response:

Use dark colors for code blocksCopy
1
2
3
4
5
{
  "jobId": "<jobID>",
  "statusURL": "<statusURL>",
  "success": <true | false>
}

JSON Response example

The following is an example of a successful response:

Use dark colors for code blocksCopy
1
2
3
4
5
{
  "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
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.