ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Aide
  • Sign Out
ArcGIS Desktop

ArcGIS Online

La plateforme cartographique de votre organisation

ArcGIS Desktop

Un SIG professionnel complet

ArcGIS Enterprise

SIG dans votre entreprise

ArcGIS for Developers

Outils de création d'applications de localisation

ArcGIS Solutions

Modèles d'applications et de cartes gratuits pour votre secteur d'activité

ArcGIS Marketplace

Téléchargez des applications et des données pour votre organisation.

  • Documentation
  • Support
Esri
  • Se connecter
user
  • Mon profil
  • Déconnexion

ArcMap

  • Accueil
  • Commencer
  • Carte
  • Analyser
  • Gérer les données
  • Outils
  • Extensions

Array

  • Résumé
  • Syntaxe
  • Propriétés
  • Vue d'ensemble des méthodes
  • Méthodes
  • Exemple de code

Résumé

The array object can contain points and arrays and is used to construct geometry objects.

Syntaxe

 Array  ({items})
ParamètreExplicationType de données
items

Items can include a list, a Point object, or another Array object.

Object

Propriétés

PropriétéExplicationType de données
count
(Lecture seule)

The element count of the array.

Integer

Vue d'ensemble des méthodes

MéthodeExplication
add (value)

Adds a point or array object to the end of the array

append (value)

Appends an object to the array in the last position.

clone (point_object)

Clone the point object.

extend (items)

Extends the array by appending elements.

getObject (index)

Returns the object at the given index position in the array.

insert (index, value)

Adds an object to the array at the specified index.

next ()

Returns the next object at the current index.

remove (index)

Removes the object at the specified index position from the array.

removeAll ()

Removes all values and creates an empty object.

replace (index, value)

Replaces the object at the specified index position in the array.

reset ()

Sets the current enumeration index (used by the next method) back to the first element.

Méthodes

add (value)
ParamètreExplicationType de données
value

Either a point or array object can be appended to the array.

Object
append (value)
ParamètreExplicationType de données
value

Either a point or array object can be appended to the array.

Object
clone (point_object)
ParamètreExplicationType de données
point_object

A point object.

Point
extend (items)
ParamètreExplicationType de données
items

Extends the array by adding strings, integers, or lists.

Object
getObject (index)
ParamètreExplicationType de données
index

The index position of the array.

Integer

Valeur renvoyée

Type de donnéesExplication
Object

The array or point object at the index position.

insert (index, value)
ParamètreExplicationType de données
index

The index position of the array.

Integer
value

Either a point or array object can be inserted into the array.

Object
next ()

Valeur renvoyée

Type de donnéesExplication
Object

The next object at the current index.

remove (index)
ParamètreExplicationType de données
index

The index position that will be removed.

Integer
removeAll ()
replace (index, value)
ParamètreExplicationType de données
index

The index position that will be replaced.

Integer
value

The new point or array object to be added to the array.

Object
reset ()

Exemple de code

Array example

Create a polyline feature class from scratch.

import arcpy

# A list of features and coordinate pairs
feature_info = [[[1, 2], [2, 4], [3, 7]],
                [[6, 8], [5, 7], [7, 2], [9, 5]]]

# A list that will hold each of the Polyline objects
features = []

for feature in feature_info:
    # Create a Polyline object based on the array of points
    # Append to the list of Polyline objects
    features.append(
        arcpy.Polyline(
            arcpy.Array([arcpy.Point(*coords) for coords in feature])))

# Persist a copy of the Polyline objects using CopyFeatures
arcpy.CopyFeatures_management(features, "c:/geometry/polylines.shp")

Rubriques connexes

  • Point
  • PointGeometry
  • Polygon
  • Polyline
  • Multipoint
  • Geometry
  • Lecture des géométries
  • Ecriture des géométries
  • Utilisation d'objets géométrie avec les outils de géotraitement

ArcGIS Desktop

  • Accueil
  • Documentation
  • Support

ArcGIS Platform

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

A propos d'Esri

  • A propos de la société
  • Carrières
  • Blog d’Esri
  • Conférence des utilisateurs
  • Sommet des développeurs
Esri
Donnez-nous votre avis.
Copyright © 2019 Esri. | Confidentialité | Légal