Vector Conversion API

Module: mls.vector_conversion. This page documents 19 public functions with exact tool IDs, complete parameters, Parameters fields, and examples.

Back to the Script Tool API Reference

Functions

  • tool_3d_ascii_to_feature_class — Import 3D features from one or more ASCII files stored in XYZ, XYZI, or GENERATE format into a new feature class.
  • feature_class_to_ascii_3d — Export 3D features to an ASCII text file stored in GENERATE or XYZ format.
  • feature_class_to_3d_by_attribute — Create 3D features using height values obtained from the attributes of the input features.
  • json_to_feature_class — Converts feature collections from Esri JSON (.json) or GeoJSON (.geojson) format files into feature classes.
  • feature_class_to_json — Converts features to Esri JSON or GeoJSON format. The fields, geometry, and spatial reference of the features are converted into the corresponding JSON representation and written to a file with the extension .json or .geojson.
  • kml_to_feature_class — Converts KML or KMZ files into feature classes.
  • feature_class_to_kml — Converts a feature class to a KML file.
  • xy_table_to_point — Creates a point feature class based on X, Y, and Z coordinates in the table.
  • xy_table_to_line — Creates a feature class containing geodetic and planar line features based on the start point X coordinate field, start point Y coordinate field, end point X coordinate field, and end point Y coordinate field from a table.
  • points_to_line — Creates line features based on points.
  • feature_class_to_line — Creates a feature class containing lines generated by one of the following methods: converting polygon boundaries to lines, splitting lines, or splitting polygons or lines at the intersection of two features.
  • polygon_to_line — Converts polygon features to line features.
  • feature_class_to_point — Creates a feature class of points generated from representative locations of the input features.
  • feature_class_to_polygon — Creates a feature class containing polygons generated from closed areas defined by input line or polygon features.
  • feature_class_vertices_to_points — Creates a feature class containing points generated from specified vertices or locations of the input features.
  • point_to_raster — Converts point features into a raster dataset.
  • polyline_to_raster — Converts polyline features to a raster dataset.
  • polygon_to_raster — Converts polygon features to a raster dataset.
  • feature_class_to_raster — Converts features into a raster dataset.

tool_3d_ascii_to_feature_class

Import 3D features from one or more ASCII files stored in XYZ, XYZI, or GENERATE format into a new feature class.

  • Exact tool ID:vector_conversion_3d_ascii_to_feature_class
  • Recommended call:mls.vector_conversion.tool_3d_ascii_to_feature_class(...)
  • Required parameters:input_paths, output_path, Parameters

Parameters

Parameter Type Required Default Description
input_paths array Yes — ASCII files or folders containing XYZ, XYZI (with LiDAR intensity), or 3D GENERATE format data. All input files must have the same format. If a folder is specified, the File Suffix parameter becomes mandatory and will process all files with the specified suffix.
output_path string Yes — Output feature class created from the input ASCII coordinate or GENERATE-format data.
Parameters object Yes — 3D ASCII To Feature Class parameters.

Parameters fields

Field Type Required Default Description
fileType integer Yes 0 The ASCII file format to be converted to a feature class. XYZ–Text files containing geometry information stored as XYZ coordinates. XYZI–Text files containing both XYZ coordinates and intensity measurement values. GENERATE–Structured text files in GENERATE format.
wkt string Yes — The coordinate system of the input data. Defaults to "None."
geomType integer Yes 0 The geometry type of the output feature class. Multipoint Feature–Recommended if the input data contains many points and attributes that are not needed for each feature. Point Feature–Each XYZ coordinate will generate a point feature. Polyline Feature–The output will include polyline features. Polygon Feature–The output will include polygon features.
dZfactor number No 1.0 A coefficient by which Z values will be multiplied. This value is typically used to convert Z linear units to match X and Y linear units. The default value is 1, which keeps elevation values unchanged.
dAverageSpacing number No 0.0 Average planar distance between input points.
fileSuffix string No — File suffix used to select files imported from the input folder.
decimalSeparatorType integer No 0 The decimal separator used in the text file to distinguish the integer part of the number from its decimal part. Period–Uses a period as the decimal separator. This is the default setting. Comma–Uses a comma as the decimal separator.
withPostprocessing boolean No True Whether to add the processing result to the project layer list.
reserve integer No 0 Reserved parameter for future function extensions.

Example

from gvscript import mls

params = mls.vector_conversion.tool_3d_ascii_to_feature_class_parameters()
params.fileType = 0

result = mls.vector_conversion.tool_3d_ascii_to_feature_class(
    Parameters=params,
    input_paths=['D:/data/input.LiData'],
    output_path='D:/data/output',
)
print(result.ok, result.output, result.message)

feature_class_to_ascii_3d

Export 3D features to an ASCII text file stored in GENERATE or XYZ format.

  • Exact tool ID:vector_conversion_feature_class_to_ascii_3d
  • Recommended call:mls.vector_conversion.feature_class_to_ascii_3d(...)
  • Required parameters:input_paths, output_path, Parameters

Parameters

Parameter Type Required Default Description
input_paths array Yes — The 3D point, multipoint, polyline, or polygon feature class to be exported to an ASCII file.
output_path string Yes — The folder where the output file will be written.
Parameters object Yes — Feature Class To ASCII 3D parameters.

Parameters fields

Field Type Required Default Description
outName string No 'ps.txt' The name of the generated ASCII file.
format integer Yes 0 Specifies the format of the ASCII file to be created. GENERATE–Writes the output in GENERATE format. This is the default setting. XYZ–Writes the XYZ information of the input features. A separate file will be created for each line or polygon in the input features.
delimiter integer No 0 Specifies the delimiter used to separate entries in the columns of the text file. Space–Uses spaces to separate field values. This is the default setting. Comma–Uses commas to separate field values. This option is not applicable if the decimal separator is also a comma.
decimalFormat integer Yes 0 Specifies the method for determining the number of significant digits stored in the output file. Automatic–Automatically determines the number of significant digits needed to preserve precision when removing extra trailing zeros. This is the default setting. Fixed–The number of significant digits is defined in the Decimal Places parameter.
digits integer No 3 Specifies the number of decimal places to write in the output file when the Decimal Notation parameter is set to Fixed.
decimalSeparator integer No 0 Specifies the character used to separate the integer part of a number from its decimal part. Period–Uses a period as the decimal separator. This is the default setting. Comma–Uses a comma as the decimal separator.
withPostprocessing boolean No True Whether to add the processing result to the project layer list.
reserve integer No 0 Reserved parameter for future function extensions.

Example

from gvscript import mls

params = mls.vector_conversion.feature_class_to_ascii_3d_parameters()
params.outName = 'ps.txt'

result = mls.vector_conversion.feature_class_to_ascii_3d(
    Parameters=params,
    input_paths=['D:/data/input.LiData'],
    output_path='D:/data/output',
)
print(result.ok, result.output, result.message)

feature_class_to_3d_by_attribute

Create 3D features using height values obtained from the attributes of the input features.

  • Exact tool ID:vector_conversion_feature_class_to_3d_by_attribute
  • Recommended call:mls.vector_conversion.feature_class_to_3d_by_attribute(...)
  • Required parameters:input_paths, output_path, Parameters

Parameters

Parameter Type Required Default Description
input_paths array Yes — The features used to create 3D features.
output_path string Yes — Output 3D feature class whose z-values are derived from the specified height fields.
Parameters object Yes — Feature Class To 3D By Attribute parameters.

Parameters fields

Field Type Required Default Description
heightFieldName string Yes — The field whose values are used to define the height of the generated 3D features.
toHeightFieldName string Yes — An optional second height field for lines. If two height fields are used, the start of each line uses the height from the first field, and the end uses the height from the second field (creating a slope).
withPostprocessing boolean No True Whether to add the processing result to the project layer list.
reserve integer No 0 Reserved parameter for future function extensions.

Example

from gvscript import mls

params = mls.vector_conversion.feature_class_to_3d_by_attribute_parameters()
params.heightFieldName = 'example_name'

result = mls.vector_conversion.feature_class_to_3d_by_attribute(
    Parameters=params,
    input_paths=['D:/data/input.LiData'],
    output_path='D:/data/output',
)
print(result.ok, result.output, result.message)

json_to_feature_class

Converts feature collections from Esri JSON (.json) or GeoJSON (.geojson) format files into feature classes.

  • Exact tool ID:vector_conversion_json_to_feature_class
  • Recommended call:mls.vector_conversion.json_to_feature_class(...)
  • Required parameters:input_paths, output_path, Parameters

Parameters

Parameter Type Required Default Description
input_paths array Yes — The input .json or .geojson file to be converted into a feature class. The file extension will determine the format the tool should use for correct conversion. Use the .json extension for Esri JSON format files and the .geojson extension for GeoJSON format files.
output_path string Yes — Output feature class created from the input JSON or GeoJSON features.
Parameters object Yes — JSON To Feature Class parameters.

Parameters fields

Field Type Required Default Description
vecFields array No — Check to select which fields to export to the Output Feature Class.
withPostprocessing boolean No True Whether to add the processing result to the project layer list.
reserve integer No 0 Reserved parameter for future function extensions.

Example

from gvscript import mls

params = mls.vector_conversion.json_to_feature_class_parameters()
params.vecFields = ['example']

result = mls.vector_conversion.json_to_feature_class(
    Parameters=params,
    input_paths=['D:/data/input.LiData'],
    output_path='D:/data/output',
)
print(result.ok, result.output, result.message)

feature_class_to_json

Converts features to Esri JSON or GeoJSON format. The fields, geometry, and spatial reference of the features are converted into the corresponding JSON representation and written to a file with the extension .json or .geojson.

  • Exact tool ID:vector_conversion_feature_class_to_json
  • Recommended call:mls.vector_conversion.feature_class_to_json(...)
  • Required parameters:input_paths, output_path, Parameters

Parameters

Parameter Type Required Default Description
input_paths array Yes — The features to be converted to JSON format.
output_path string Yes — The .json or .geojson file to be created.
Parameters object Yes — Feature Class To JSON parameters.

Parameters fields

Field Type Required Default Description
vecFields array No — Check to choose which fields to export to the Output JSON.
withPostprocessing boolean No True Whether to add the processing result to the project layer list.
reserve integer No 0 Reserved parameter for future function extensions.

Example

from gvscript import mls

params = mls.vector_conversion.feature_class_to_json_parameters()
params.vecFields = ['example']

result = mls.vector_conversion.feature_class_to_json(
    Parameters=params,
    input_paths=['D:/data/input.LiData'],
    output_path='D:/data/output',
)
print(result.ok, result.output, result.message)

kml_to_feature_class

Converts KML or KMZ files into feature classes.

  • Exact tool ID:vector_conversion_kml_to_feature_class
  • Recommended call:mls.vector_conversion.kml_to_feature_class(...)
  • Required parameters:input_paths, output_path, Parameters

Parameters

Parameter Type Required Default Description
input_paths array Yes — The KML or KMZ file to be converted.
output_path string Yes — Path for the generated feature class.
Parameters object Yes — KML To Feature Class parameters.

Parameters fields

Field Type Required Default Description
vecFields array No — Check the fields to be exported to the output feature class.
withPostprocessing boolean No True Whether to add the processing result to the project layer list.
reserve integer No 0 Reserved parameter for future function extensions.

Example

from gvscript import mls

params = mls.vector_conversion.kml_to_feature_class_parameters()
params.vecFields = ['example']

result = mls.vector_conversion.kml_to_feature_class(
    Parameters=params,
    input_paths=['D:/data/input.LiData'],
    output_path='D:/data/output',
)
print(result.ok, result.output, result.message)

feature_class_to_kml

Converts a feature class to a KML file.

  • Exact tool ID:vector_conversion_feature_class_to_kml
  • Recommended call:mls.vector_conversion.feature_class_to_kml(...)
  • Required parameters:input_paths, output_path, Parameters

Parameters

Parameter Type Required Default Description
input_paths array Yes — The feature class to be converted to KML.
output_path string Yes — The KML file to be created. > Note: Outputting a .kmz file is a compressed KML file using ZIP compression, and it is viewed and handled in the same way as a KML file.
Parameters object Yes — Feature Class To KML parameters.

Parameters fields

Field Type Required Default Description
vecFields array No — Check the fields to be included in the output KML.
withPostprocessing boolean No True Whether to add the processing result to the project layer list.
reserve integer No 0 Reserved parameter for future function extensions.

Example

from gvscript import mls

params = mls.vector_conversion.feature_class_to_kml_parameters()
params.vecFields = ['example']

result = mls.vector_conversion.feature_class_to_kml(
    Parameters=params,
    input_paths=['D:/data/input.LiData'],
    output_path='D:/data/output',
)
print(result.ok, result.output, result.message)

xy_table_to_point

Creates a point feature class based on X, Y, and Z coordinates in the table.

  • Exact tool ID:vector_conversion_xy_table_to_point
  • Recommended call:mls.vector_conversion.xy_table_to_point(...)
  • Required parameters:input_paths, output_path, Parameters

Parameters

Parameter Type Required Default Description
input_paths array Yes — The table defining the locations of the point features (containing X and Y coordinates).
output_path string Yes — The feature class that will contain the output point features.
Parameters object Yes — XY Table To Point parameters.

Parameters fields

Field Type Required Default Description
wkt string Yes — The coordinate system for the X and Y coordinates. This will be the coordinate system for the output feature class.
FieldX string Yes — The field in the input table containing the X coordinates (or longitude).
FieldY string Yes — The field in the input table containing the Y coordinates (or latitude).
FieldZ string No — The field in the input table containing the Z coordinates.
withPostprocessing boolean No True Whether to add the processing result to the project layer list.
reserve integer No 0 Reserved parameter for future function extensions.

Example

from gvscript import mls

params = mls.vector_conversion.xy_table_to_point_parameters()
params.wkt = 'example'

result = mls.vector_conversion.xy_table_to_point(
    Parameters=params,
    input_paths=['D:/data/input.LiData'],
    output_path='D:/data/output',
)
print(result.ok, result.output, result.message)

xy_table_to_line

Creates a feature class containing geodetic and planar line features based on the start point X coordinate field, start point Y coordinate field, end point X coordinate field, and end point Y coordinate field from a table.

  • Exact tool ID:vector_conversion_xy_table_to_line
  • Recommended call:mls.vector_conversion.xy_table_to_line(...)
  • Required parameters:input_paths, output_path, Parameters

Parameters

Parameter Type Required Default Description
input_paths array Yes — The input table. This can be a text file, CSV file, or feature class.
output_path string Yes — The output feature class containing the geodetic and planar lines.
Parameters object Yes — XY Table To Line parameters.

Parameters fields

Field Type Required Default Description
wkt string Yes — The spatial reference for the output feature class.
FieldXFrom string Yes — The numeric field in the input table that contains the start point X coordinate (or longitude) of the line, located in the coordinate system specified by the Spatial Reference parameter.
FieldYFrom string Yes — The numeric field in the input table that contains the start point Y coordinate (or latitude) of the line, located in the coordinate system specified by the Spatial Reference parameter.
FieldXEnd string Yes — The numeric field in the input table that contains the end point X coordinate (or longitude) of the line, located in the coordinate system specified by the Spatial Reference parameter.
FieldYEnd string Yes — The numeric field in the input table that contains the end point Y coordinate (or latitude) of the line, located in the coordinate system specified by the Spatial Reference parameter.
lineType integer No 0 Type of line geometry to create.
idField string No — A field in the input table. This field and its values will be included in the output and can be used to link output features with records in the input table.
bAttributes boolean No False Whether to add the remaining input fields to the output feature class.
withPostprocessing boolean No True Whether to add the processing result to the project layer list.
reserve integer No 0 Reserved parameter for future function extensions.

Example

from gvscript import mls

params = mls.vector_conversion.xy_table_to_line_parameters()
params.wkt = 'example'

result = mls.vector_conversion.xy_table_to_line(
    Parameters=params,
    input_paths=['D:/data/input.LiData'],
    output_path='D:/data/output',
)
print(result.ok, result.output, result.message)

points_to_line

Creates line features based on points.

  • Exact tool ID:vector_conversion_points_to_line
  • Recommended call:mls.vector_conversion.points_to_line(...)
  • Required parameters:input_paths, output_path, Parameters

Parameters

Parameter Type Required Default Description
input_paths array Yes — Point features to be converted into lines.
output_path string Yes — Line feature class created from the input points.
Parameters object Yes — Points To Line parameters.

Parameters fields

Field Type Required Default Description
lineField string Yes — Field used to group points into line features.
sortField string No — Field used to order points along each line.
closeLine boolean No False Whether the output line features should be closed.
withPostprocessing boolean No True Whether to add the processing result to the project layer list.
reserve integer No 0 Reserved parameter for future function extensions.

Example

from gvscript import mls

params = mls.vector_conversion.points_to_line_parameters()
params.lineField = 'example'

result = mls.vector_conversion.points_to_line(
    Parameters=params,
    input_paths=['D:/data/input.LiData'],
    output_path='D:/data/output',
)
print(result.ok, result.output, result.message)

feature_class_to_line

Creates a feature class containing lines generated by one of the following methods: converting polygon boundaries to lines, splitting lines, or splitting polygons or lines at the intersection of two features.

  • Exact tool ID:vector_conversion_feature_class_to_line
  • Recommended call:mls.vector_conversion.feature_class_to_line(...)
  • Required parameters:input_paths, output_path, Parameters

Parameters

Parameter Type Required Default Description
input_paths array Yes — The input features can be lines, polygons, or both.
output_path string Yes — Output line feature class created from input line or polygon boundaries and split at intersections.
Parameters object Yes — Feature Class To Line parameters.

Parameters fields

Field Type Required Default Description
bPreseveAttributes boolean No True Specifies whether to retain or discard the attributes of the input features in the output feature class. Checked - Retain input attributes in the output features. This is the default setting. Unchecked - Discard input attributes in the output features.
dXYTolerance number No 0.0 Minimum distance separating feature coordinates, and the distance coordinates can move in x, y, or both directions during spatial computation. Use the input spatial reference XY tolerance unless there is a specific reason to override it.
withPostprocessing boolean No True Whether to add the processing result to the project layer list.
reserve integer No 0 Reserved parameter for future function extensions.

Example

from gvscript import mls

params = mls.vector_conversion.feature_class_to_line_parameters()
params.bPreseveAttributes = True

result = mls.vector_conversion.feature_class_to_line(
    Parameters=params,
    input_paths=['D:/data/input.LiData'],
    output_path='D:/data/output',
)
print(result.ok, result.output, result.message)

polygon_to_line

Converts polygon features to line features.

  • Exact tool ID:vector_conversion_polygon_to_line
  • Recommended call:mls.vector_conversion.polygon_to_line(...)
  • Required parameters:input_paths, output_path, Parameters

Parameters

Parameter Type Required Default Description
input_paths array Yes — The input features must be polygons.
output_path string Yes — Output line feature class containing polygon boundaries, with optional neighboring polygon information.
Parameters object Yes — Polygon To Line parameters.

Parameters fields

Field Type Required Default Description
bIdentifyNeighboringInfo boolean No True Whether to identify and store polygon neighboring information.
withPostprocessing boolean No True Whether to add the processing result to the project layer list.
reserve integer No 0 Reserved parameter for future function extensions.

Example

from gvscript import mls

params = mls.vector_conversion.polygon_to_line_parameters()
params.bIdentifyNeighboringInfo = True

result = mls.vector_conversion.polygon_to_line(
    Parameters=params,
    input_paths=['D:/data/input.LiData'],
    output_path='D:/data/output',
)
print(result.ok, result.output, result.message)

feature_class_to_point

Creates a feature class of points generated from representative locations of the input features.

  • Exact tool ID:vector_conversion_feature_class_to_point
  • Recommended call:mls.vector_conversion.feature_class_to_point(...)
  • Required parameters:input_paths, output_path, Parameters

Parameters

Parameter Type Required Default Description
input_paths array Yes — Input features can be points, multipoints, lines, or polygons.
output_path string Yes — Output point feature class created from input feature centroids, label points, or interior points.
Parameters object Yes — Feature Class To Point parameters.

Parameters fields

Field Type Required Default Description
bInside boolean No False Whether generated point features must be inside the input features.
withPostprocessing boolean No True Whether to add the processing result to the project layer list.
reserve integer No 0 Reserved parameter for future function extensions.

Example

from gvscript import mls

params = mls.vector_conversion.feature_class_to_point_parameters()
params.bInside = False

result = mls.vector_conversion.feature_class_to_point(
    Parameters=params,
    input_paths=['D:/data/input.LiData'],
    output_path='D:/data/output',
)
print(result.ok, result.output, result.message)

feature_class_to_polygon

Creates a feature class containing polygons generated from closed areas defined by input line or polygon features.

  • Exact tool ID:vector_conversion_feature_class_to_polygon
  • Recommended call:mls.vector_conversion.feature_class_to_polygon(...)
  • Required parameters:input_paths, output_path, Parameters

Parameters

Parameter Type Required Default Description
input_paths array Yes — Input features can be lines, polygons, or a combination of both.
output_path string Yes — Output polygon feature class created from input lines, polygons, or label features.
Parameters object Yes — Feature Class To Polygon parameters.

Parameters fields

Field Type Required Default Description
labelFeatures string No — Optional input point features that contain attributes to be transferred to the output polygon features.
bPreseveAttributes boolean No True Specifies whether to retain or ignore input feature attributes in the output feature class. Checked - Retains input attributes in the output features (if annotation features are present, the output features will contain only the attributes of the annotation features). This is the default setting. Unchecked - Retains the input attribute fields in the output features, but the field values will be empty.
dXYTolerance number No 0.0 Minimum distance separating feature coordinates, and the distance coordinates can move in x, y, or both directions during spatial computation. Use the input spatial reference XY tolerance unless there is a specific reason to override it.
withPostprocessing boolean No True Whether to add the processing result to the project layer list.
reserve integer No 0 Reserved parameter for future function extensions.

Example

from gvscript import mls

params = mls.vector_conversion.feature_class_to_polygon_parameters()
params.labelFeatures = 'example'

result = mls.vector_conversion.feature_class_to_polygon(
    Parameters=params,
    input_paths=['D:/data/input.LiData'],
    output_path='D:/data/output',
)
print(result.ok, result.output, result.message)

feature_class_vertices_to_points

Creates a feature class containing points generated from specified vertices or locations of the input features.

  • Exact tool ID:vector_conversion_feature_class_vertices_to_points
  • Recommended call:mls.vector_conversion.feature_class_vertices_to_points(...)
  • Required parameters:input_paths, output_path, Parameters

Parameters

Parameter Type Required Default Description
input_paths array Yes — ASCII files or folders containing data in XYZ, XYZI (with LiDAR intensity), or 3D GENERATE format. All input files must be in the same format. If a folder is specified, the File Suffix parameter becomes mandatory and will process all files with the specified suffix and extension.
output_path string Yes — The resulting feature class to be created.
Parameters object Yes — Feature Class Vertices To Points parameters.

Parameters fields

Field Type Required Default Description
nPointType integer No 0 Point type: 0 all vertices, 1 midpoint, 2 start point, 3 end point, 4 start and end points, and 5 dangling point.
withPostprocessing boolean No True Whether to add the processing result to the project layer list.
reserve integer No 0 Reserved parameter for future function extensions.

Example

from gvscript import mls

params = mls.vector_conversion.feature_class_vertices_to_points_parameters()
params.nPointType = 0

result = mls.vector_conversion.feature_class_vertices_to_points(
    Parameters=params,
    input_paths=['D:/data/input.LiData'],
    output_path='D:/data/output',
)
print(result.ok, result.output, result.message)

point_to_raster

Converts point features into a raster dataset.

  • Exact tool ID:vector_conversion_point_to_raster
  • Recommended call:mls.vector_conversion.point_to_raster(...)
  • Required parameters:input_paths, output_path, Parameters

Parameters

Parameter Type Required Default Description
input_paths array Yes — The point or multipoint feature dataset to be converted to a raster. For a current-project layer or table, first resolve it with project_resolve_loaded_data and use the returned path/source, not id. For external data, use the external path directly.
output_path string Yes — Output raster dataset that will be created by the conversion tool.
Parameters object Yes — Point To Raster parameters.

Parameters fields

Field Type Required Default Description
field string Yes — The field used to assign values to the output raster. This can be any field from the attribute table of the input feature dataset. If field is required and the user did not provide it, ask the user for field. Do not choose a default field.
dCellSize number No 0.0 The size of the cells in the output raster.
dNodataValue number No -9999.0 The value used to specify the location of invalid areas in the raster.
nCellAssignmentType integer No 1 Determines how to assign values to cells when multiple features fall within a single cell. Most frequent–If multiple features are in a cell, the feature with the most common attribute in the Value Field is assigned to the cell. If there are multiple features with the same number of common attributes, the feature with the lowest FID is used. Sum–The sum of the attributes of all points in the cell (not applicable to string data). Mean–The average of the attributes of all points in the cell (not applicable to string data). Standard Deviation–The standard deviation of the attributes of all points in the cell. If fewer than two points are in the cell, NoData is assigned to the cell (not applicable to string data). Maximum–The maximum attribute value of all points in the cell (not applicable to string data). Minimum–The minimum attribute value of all points in the cell (not applicable to string data). Range–The range of attribute values of all points in the cell (not applicable to string data). Count–The number of points in the cell.
priorityFieldName string Yes — Used to determine if one feature should take precedence over others with the same attribute. This field is only used with the Most frequent cell assignment type option.
withPostprocessing boolean No True Whether to add the processing result to the project layer list.
reserve integer No 0 Reserved parameter for future function extensions.

Example

from gvscript import mls

params = mls.vector_conversion.point_to_raster_parameters()
params.field = 'example'

result = mls.vector_conversion.point_to_raster(
    Parameters=params,
    input_paths=['D:/data/input.LiData'],
    output_path='D:/data/output',
)
print(result.ok, result.output, result.message)

polyline_to_raster

Converts polyline features to a raster dataset.

  • Exact tool ID:vector_conversion_polyline_to_raster
  • Recommended call:mls.vector_conversion.polyline_to_raster(...)
  • Required parameters:input_paths, output_path, Parameters

Parameters

Parameter Type Required Default Description
input_paths array Yes — The polyline feature dataset to be converted to a raster. For a current-project layer or table, first resolve it with project_resolve_loaded_data and use the returned path/source, not id. For external data, use the external path directly.
output_path string Yes — Output raster dataset that will be created by the conversion tool.
Parameters object Yes — Polyline To Raster parameters.

Parameters fields

Field Type Required Default Description
field string Yes — The field used to assign values to the output raster. It can be any numeric field from the attribute table of the input feature dataset. If field is required and the user did not provide it, ask the user for field. Do not choose a default field.
dCellSize number No 0.0 The cell size of the output raster being created.
dNodataValue number No -9999.0 The value used to specify invalid areas in the raster.
nCellAssignmentType integer No 1 Determines the method for assigning values to cells when multiple features fall within a cell. Maximum Length —The feature with the maximum length overlapping the cell determines the value assigned to the cell. Maximum Combined Length —If multiple features in the cell have the same value, their combined length is calculated. The feature with the maximum combined length determines the value assigned to the cell.
priorityFieldName string No — This field determines which feature should take precedence over others in the cell. When used, regardless of the Cell Assignment Type chosen, the feature with the highest positive priority value is selected for conversion.
withPostprocessing boolean No True Whether to add the processing result to the project layer list.
reserve integer No 0 Reserved parameter for future function extensions.

Example

from gvscript import mls

params = mls.vector_conversion.polyline_to_raster_parameters()
params.field = 'example'

result = mls.vector_conversion.polyline_to_raster(
    Parameters=params,
    input_paths=['D:/data/input.LiData'],
    output_path='D:/data/output',
)
print(result.ok, result.output, result.message)

polygon_to_raster

Converts polygon features to a raster dataset.

  • Exact tool ID:vector_conversion_polygon_to_raster
  • Recommended call:mls.vector_conversion.polygon_to_raster(...)
  • Required parameters:input_paths, output_path, Parameters

Parameters

Parameter Type Required Default Description
input_paths array Yes — The polygon feature dataset to be converted to a raster. For a current-project layer or table, first resolve it with project_resolve_loaded_data and use the returned path/source, not id. For external data, use the external path directly.
output_path string Yes — Output raster dataset that will be created by the conversion tool.
Parameters object Yes — Polygon To Raster parameters.

Parameters fields

Field Type Required Default Description
field string Yes — The field used to assign values to the output raster. It can be any numeric field from the attribute table of the input feature dataset. If field is required and the user did not provide it, ask the user for field. Do not choose a default field.
dCellSize number No 0.0 The cell size of the output raster being created.
dNodataValue number No -9999.0 The value used to specify invalid areas in the raster.
nCellAssignmentType integer No 1 Determines the method for assigning values to cells when multiple features fall within a cell. Cell Center —The attributes of the feature overlapping the cell center determine the value assigned to the cell. Maximum Area —The feature with the largest area within the cell determines the value assigned to the cell. Maximum Combined Area —If multiple features in a cell have the same value, their combined area is calculated. The feature with the largest combined area determines the value assigned to the cell.
priorityFieldName string No — This field determines which feature should take precedence over others in the cell. When used, regardless of the Cell Assignment Type chosen, the feature with the highest positive priority value is selected for conversion.
withPostprocessing boolean No True Whether to add the processing result to the project layer list.
reserve integer No 0 Reserved parameter for future function extensions.

Example

from gvscript import mls

params = mls.vector_conversion.polygon_to_raster_parameters()
params.field = 'example'

result = mls.vector_conversion.polygon_to_raster(
    Parameters=params,
    input_paths=['D:/data/input.LiData'],
    output_path='D:/data/output',
)
print(result.ok, result.output, result.message)

feature_class_to_raster

Converts features into a raster dataset.

  • Exact tool ID:vector_conversion_feature_class_to_raster
  • Recommended call:mls.vector_conversion.feature_class_to_raster(...)
  • Required parameters:input_paths, output_path, Parameters

Parameters

Parameter Type Required Default Description
input_paths array Yes — The input feature dataset to be converted to a raster dataset. For a current-project layer or table, first resolve it with project_resolve_loaded_data and use the returned path/source, not id. For external data, use the external path directly.
output_path string Yes — The output raster dataset to be created.
Parameters object Yes — Feature Class To Raster parameters.

Parameters fields

Field Type Required Default Description
field string Yes — The field used to assign values to the output raster. It can be any numeric field from the attribute table of the input feature dataset. If field is required and the user did not provide it, ask the user for field. Do not choose a default field.
dCellSize number No 0.0 The cell size of the output raster being created.
dNodataValue number No -9999.0 The value used to specify the location of invalid areas in the raster.
withPostprocessing boolean No True Whether to add the processing result to the project layer list.
reserve integer No 0 Reserved parameter for future function extensions.

Example

from gvscript import mls

params = mls.vector_conversion.feature_class_to_raster_parameters()
params.field = 'example'

result = mls.vector_conversion.feature_class_to_raster(
    Parameters=params,
    input_paths=['D:/data/input.LiData'],
    output_path='D:/data/output',
)
print(result.ok, result.output, result.message)

results matching ""

    No results matching ""