Build Seamlines (Data Management)

Summary

Generate or update seamlines for your mosaic dataset. Seamlines are used to sort overlapping imagery and produce a smoother-looking mosaic.

You can use this tool to do the following:

  • Generate seamlines for all items in the mosaic dataset.
  • Generate seamlines for items selected using a query or by an area of interest.
  • Update existing seamlines if items are added or removed from the mosaic dataset.

Usage

  • The seamlines are generated so that there is one seamline per footprint.

  • You cannot build seamlines for a referenced mosaic dataset.

  • If you plan on color correcting your mosaic dataset, it is recommended that you do so before building seamlines. Color correction is especially important if the Computation Method is set to Radiometry, as color is taken into account when seamlines are built.

  • The Sort Method and Sort Ascending parameters are disabled if Update Existing Seamlines option is checked on.

Syntax

arcpy.management.BuildSeamlines(in_mosaic_dataset, cell_size, {sort_method}, {sort_order}, {order_by_attribute}, {order_by_base_value}, {view_point}, {computation_method}, {blend_width}, {blend_type}, {request_size}, {request_size_type}, {blend_width_units}, {area_of_interest}, {where_clause}, {update_existing}, {min_region_size}, {min_thinness_ratio}, {max_sliver_size})
ParameterExplanationData Type
in_mosaic_dataset

Select the mosaic dataset on which to build seamlines.

Mosaic Layer
cell_size
[cell_size,...]

Generate seamlines for raster datasets that fall within the following range of spatial resolutions.

You can leave this parameter empty and the tool will automatically create seamlines at the appropriate levels.

The units for this parameter are the same as the spatial reference of the input mosaic dataset.

Double
sort_method
(Optional)

Set a rule to determine which raster will be used to generate seamlines when images overlap.

  • NORTH_WEST Select the raster datasets that have center points closest to the northwest corner of the boundary. This is the default.
  • CLOSEST_TO_VIEWPOINT Select raster datasets based on a user-defined location and a nadir location for the raster datasets using the Viewpoint tool.
  • BY_ATTRIBUTE Select raster datasets based on an attribute from the footprint attribute table. Commonly used attributes include acquisition date, cloud cover, or viewing angle.
String
sort_order
(Optional)

Choose whether to sort the rasters in ascending order or descending order.

  • ASCENDING Sort the rasters in ascending order. This is the default.
  • DESCENDING Sort the rasters in descending order.
Boolean
order_by_attribute
(Optional)

Order the raster datasets based on this field when the sort method is BY_ATTRIBUTE. The default attribute is ObjectID.

Field
order_by_base_value
(Optional)

Sort the rasters by their difference between this value and their value in the order_by_attribute parameter.

Variant
view_point
(Optional)

Set the coordinate location to use when sort_method is CLOSEST_TO_VIEWPOINT.

Point
computation_method
(Optional)

Choose how to build seamlines.

  • GEOMETRYGenerate seamlines for overlapping areas based on the intersection of footprints. Areas with no overlapping imagery will merge the footprints. This is the default.
  • RADIOMETRYGenerate seamlines based on the spectral patterns of features within the imagery.
  • COPY_FOOTPRINTGenerate seamlines directly from the footprints.
  • COPY_TO_SIBLINGApply the seamlines from another mosaic dataset. The mosaic datasets have to be in the same group. For example, the extent of the panchromatic band does not always match the extent of the multispectral band. This option makes sure they share the same seamline.
  • EDGE_DETECTIONGenerate seamlines over intersecting areas based on the edges of features in the area.
  • VORONOIGenerate seamlines using the area Voronoi diagram.
  • DISPARITYGenerate seamlines based on the disparity images of stereo pairs. This method can avoid seamlines cutting through buildings.

The Sort Method parameter applies to each computation method.

String
blend_width
(Optional)

Blending (feathering) occurs along a seamline between pixels where there are overlapping rasters. The blend width defines how many pixels will be blended.

If the blend width value is 10, and you use BOTH as the blend type, then 5 pixels will be blended on the inside and outside of the seamline. If the value is 10, and the blend type is INSIDE, then 10 pixels will be blended on the inside of the seamline.

Double
blend_type
(Optional)

Determine how to blend one image into another, over the seamlines. Options are to blend inside the seamlines, outside the seamlines, or both inside and outside.

  • BOTH Blend using pixels on either side of the seamlines. For example, if the Blend Width is 10 pixels, then five pixels will be blended on the inside and outside of the seamline. This is the default.
  • INSIDEBlend inside of the seamline.
  • OUTSIDEBlend outside of the seamline.
String
request_size
(Optional)

Specify the number of columns and rows for resampling. The maximum value is 5,000. Increase or decrease this value based on the complexity of your raster data. Greater image resolution provides more detail in the raster dataset but also increases the processing time.

Long
request_size_type
(Optional)

Set the units for the Request Size.

  • PIXELSModify the request size based on the pixel size.This is the default option and resamples the closest image based on the raster pixel size.
  • PIXELSIZE_FACTORModify the request size by specifying a scaling factor. This option resamples the closest image by multiplying the raster pixel size (from cell size level table) with the pixel size factor.
String
blend_width_units
(Optional)

Specify the unit of measurement for blend width.

  • PIXELSMeasure using the number of pixels. This is the default.
  • GROUND_UNITSMeasure using the same units as the mosaic dataset.
String
area_of_interest
(Optional)

Build seamlines on all the rasters that intersect this polygon. To select an area of interest, use an input feature class.

Feature Set
where_clause
(Optional)

SQL expression to build seamlines on specific raster datasets within the mosaic dataset.

SQL Expression
update_existing
(Optional)

Update seamlines that are affected by the addition or deletion of the mosaic dataset items.

  • IGNORE_EXISTINGRegenerates seamlines for all items and ignores existing seamlines, if any. This is the default.
  • UPDATE_EXISTINGOnly update items without seamlines. If any new items overlap with the previously created seamlines, the existing seamlines may be affected.

This parameter is ignored if seamlines do not exist.

Boolean
min_region_size
(Optional)

Specify the minimum region size, in pixel units. Any polygons smaller than this specified threshold will be removed in the seamline result. The default is 100 pixels.

This parameter value should be smaller than the sliver area, which is (max_sliver_size) * (max_sliver_size).

Long
min_thinness_ratio
(Optional)

Define how thin a polygon can be, before it is considered a sliver. This is based on a scale from 0 to 1.0, where a value of 0.0 represents a polygon that is almost a straight line, and a value of 1.0 represents a polygon that is a circle.

Slivers are removed when building seamlines.

Double
max_sliver_size
(Optional)

Specify the maximum size a polygon can be to still be considered a sliver. This parameter is specified in pixels and is based on the request_size, not the spatial resolution of the source raster. Any polygon that is less than the square of this value is considered a sliver. Any regions that are less than (max_sliver_size)2 are considered slivers.

Slivers are removed when building seamlines.

Long

Derived Output

NameExplanationData Type
out_mosaic_dataset

The updated mosaic dataset.

Mosaic Layer

Code sample

BuildSeamlines example 1 (Python window)

This is a Python sample for BuildSeamlines.

import arcpy
arcpy.BuildSeamlines_management("c:/data/Seamlines.gdb/md", "40",
                                "NORTH_WEST", "#", "#", "#", "#",
                                "RADIOMETRY", "5", "INSIDE", "#", 
                                "#", "GROUND_UNITS")
BuildSeamlines example 2 (stand-alone script)

This is a Python script sample for BuildSeamlines.

# Build seamlines using the  NORTH_WEST sort method

import arcpy
arcpy.env.workspace = "C:/Workspace"

mdname = "Seamlines.gdb/md"
cellsize = "40"
sortmethod = "NORTH_WEST"
sortorder = "#"
orderattribute = "#"
orderbase = "#"
viewpnt = "#"
computemethod = "RADIOMETRY"
blendwidth = "5"
blendtype = "INSIDE"
requestsize = "#"

arcpy.BuildSeamlines_management(
    mdname, cellsize, sortmethod, sortorder, orderattribute, 
    orderbase, viewpnt, computemethod, blendwidth, blendtype, 
    requestsize)

Licensing information

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

Related topics