Skip to contents

Functions for converting R objects to and from ArcGIS geoprocessing parameter types. These functions handle the serialization and parsing of various data types used in ArcGIS geoprocessing services.

Usage

parse_gp_feature_record_set(json)

as_gp_feature_record_set(x)

parse_gp_record_set(json)

as_record_set(x)

as_gp_raster_layer(x)

gp_linear_unit(distance = integer(0), units = character(0))

as_gp_linear_unit(x)

parse_gp_linear_unit(json)

gp_areal_unit(area = integer(0), units = character(0))

as_gp_areal_unit(x)

parse_gp_areal_unit(json)

as_gp_date(x)

parse_gp_date(json)

as_spatial_reference(x)

parse_spatial_reference(json)

Arguments

json

raw json to parse

x

the object to convert into json

distance

a scalar number of the distance.

units

the unit of the measurement. Must be one of "esriUnknownAreaUnits", "esriSquareInches", "esriSquareFeet", "esriSquareYards", "esriAcres", "esriSquareMiles", "esriSquareMillimeters", "esriSquareCentimeters", "esriSquareDecimeters", "esriSquareMeters", "esriAres", "esriHectares", "esriSquareKilometers", "esriSquareInchesUS", "esriSquareFeetUS", "esriSquareYardsUS", "esriAcresUS", "esriSquareMilesUS".

area

a scalar number of the measurement.

Details

[Experimental]

This package provides support for the following geoprocessing parameter types:

Implemented Types

  • GPFeatureRecordSetLayer: Feature collections with geometry and attributes

  • GPRecordSet: Tabular data without geometry

  • GPRasterDataLayer: Raster datasets from Portal items, Image Servers, or URLs

  • GPLinearUnit: Linear distance measurements with units

  • GPArealUnit: Area measurements with units

  • GPDate: Date/time values in milliseconds since epoch

  • GPSpatialReference: Coordinate reference systems

Not Yet Implemented

The following types are planned for future implementation:

  • GPField: Field definitions with name, type, and properties

  • GPMultiValue: Arrays of values for a single data type

  • GPValueTable: Flexible table-like objects with rows and columns

  • GPComposite: Parameters that accept multiple data types

  • GPEnvelope: Bounding box extents (use as_extent() for GPExtent)

Usage Patterns

Most functions follow a consistent pattern:

  • as_gp_*(): Convert R objects to geoprocessing parameter JSON

  • parse_gp_*(): Parse geoprocessing response JSON to R objects

  • Constructor functions (e.g., gp_linear_unit(), gp_areal_unit()) create typed S7 objects

Examples

# Create a linear unit
distance <- gp_linear_unit(distance = 100, units = "esriMeters")

# Convert spatial data to feature record set
as_gp_feature_record_set(my_sf_data)

# Parse a geoprocessing response
parse_gp_feature_record_set(response_json)

References

API Documentation

See also

Other geoprocessing: arc_form_params(), arc_gp_job, arc_job_status()