ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Ayuda
  • Sign Out
ArcGIS Desktop

ArcGIS Online

La plataforma de representación cartográfica para tu organización

ArcGIS Desktop

Un completo SIG profesional

ArcGIS Enterprise

SIG en tu empresa

ArcGIS for Developers

Herramientas para crear aplicaciones basadas en la ubicación

ArcGIS Solutions

Plantillas de aplicaciones y mapas gratuitas para tu sector

ArcGIS Marketplace

Obtén aplicaciones y datos para tu organización.

  • Documentación
  • Soporte
Esri
  • Iniciar sesión
user
  • Mi perfil
  • Cerrar sesión

ArcMap

  • Inicio
  • Introducción
  • Cartografiar
  • Analizar
  • Administrar datos
  • Herramientas
  • Extensiones

FeatureSet

  • Resumen
  • Debate
  • Sintaxis
  • Propiedades
  • Vista general del método
  • Métodos
  • Muestra de código

Resumen

FeatureSet objects are a lightweight representation of a feature class. They are a special data element that contains not only schema, but also the data. The FeatureSet object is also how feature data is sent and received from the server.

Debate

Nota:

If loading a feature class into a new FeatureSet and modifying the FeatureSet with a geoprocessing tool that modifies the input like Calculate Field or an arcpy function like UpdateCursor, the original feature class will also be modified.

Sintaxis

 FeatureSet  ({table})
ParámetroExplicaciónTipo de datos
table

Feature data to be loaded into the FeatureSet object.

String

Propiedades

PropiedadExplicaciónTipo de datos
JSON
(Sólo lectura)

Returns an Esri JSON representation of the geometry as a string.

Sugerencia:

The returned string can be converted to a dictionary using the Python json.loads function.

String

Vista general del método

MétodoExplicación
load (table_path)

Import from a table.

save (table_path)

Export to a table.

Métodos

load (table_path)
ParámetroExplicaciónTipo de datos
table_path

The table to be imported.

String
save (table_path)
ParámetroExplicaciónTipo de datos
table_path

The output table to be created.

String

Muestra de código

FeatureSet example

Load data into a FeatureSet and insert into feature class.

import arcpy

arcpy.env.overwriteOutput = True

arcpy.ImportToolbox("http://flame7/arcgis/services;BufferByVal",
                    "servertools")

# List of coordinates
coordinates = [[-117.196717216, 34.046944853],
               [-117.186226483, 34.046498438],
               [-117.179530271, 34.038016569],
               [-117.187454122, 34.039132605],
               [-117.177744614, 34.056765964],
               [-117.156205131, 34.064466609],
               [-117.145491191, 34.068261129],
               [-117.170825195, 34.073618099],
               [-117.186784501, 34.068149525],
               [-117.158325598, 34.03489167]]

# Create an in_memory feature class to initially contain the coordinate pairs
feature_class = arcpy.CreateFeatureclass_management(
    "in_memory", "tempfc", "POINT")[0]

# Open an insert cursor
with arcpy.da.InsertCursor(feature_class, ["SHAPE@XY"]) as cursor:
    # Iterate through list of coordinates and add to cursor
    for (x, y) in coordinates:
        cursor.insertRow([(x, y)])

# Create a FeatureSet object and load in_memory feature class
feature_set = arcpy.FeatureSet()
feature_set.load(feature_class)

results = arcpy.BufferPoints_servertools(feature_set)

Temas relacionados

  • Trabajar con conjuntos de entidades y conjuntos de registros
  • RecordSet

ArcGIS Desktop

  • Inicio
  • Documentación
  • Soporte

Plataforma ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

Acerca de Esri

  • Quiénes somos
  • Empleo
  • Blog de Esri
  • Conferencia de usuarios
  • Cumbre de desarrolladores
Esri
Díganos su opinión.
Copyright © 2019 Esri. | Privacidad | Legal