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 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

ListSpatialReferences

  • Résumé
  • Syntaxe
  • Exemple de code

Résumé

Returns a list of available spatial reference names for use as an argument to the SpatialReference class.

Syntaxe

ListSpatialReferences ({wild_card}, {spatial_reference_type})
ParamètreExplicationType de données
wild_card

Limits the results returned. If a value is not specified, all values are returned. The wildcard is not case sensitive.

SymbolDescriptionExample

*

Represents zero or more characters.

Te* finds Tennessee and Texas.

String
spatial_reference_type

Limits the spatial references listed by type.

  • GCS —Lists only geographic coordinate systems.
  • PCS —Lists only projected coordinate systems.
  • ALL —Lists both projected and geographic coordinate systems. This is the default.

(La valeur par défaut est All)

String

Valeur renvoyée

Type de donnéesExplication
String

A list of spatial references that match the wildcard and spatial reference type. Each item in the list includes qualifying information, separated with forward slashes, to help you limit your search or better understand the purpose of the spatial reference.

For example, 'Projected Coordinate Systems/World/Sinusoidal (world)' might be in the list. You can see from the path that this spatial reference is Sinusoidal, is a projected coordinate system, and is intended to be used at a global extent.

Another example is 'Projected Coordinate Systems/UTM/South America/Corrego Alegre UTM Zone 25S'. This is a UTM spatial reference for a UTM zone in South America.

Exemple de code

ListSpatialReferences example 1

List all geographic spatial references.

import arcpy

# Get the list of spatial references and print it.
srs = arcpy.ListSpatialReferences(spatial_reference_type="GCS")
for sr_name in srs:
    print sr_name
ListSpatialReferences example 2

Print the central meridians and names of UTM zones in New Zealand.

import arcpy

# Get the list of spatial references
srs = arcpy.ListSpatialReferences("*utm/new zealand*")

# Create a SpatialReference object for each one and print the
# central meridian
for sr_string in srs:
    sr_object = arcpy.SpatialReference(sr_string)
    print "{0.centralMeridian}   {0.name}".format(sr_object)

Rubriques connexes

  • ListTransformations

ArcGIS Desktop

  • Accueil
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • 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 © 2021 Esri. | Confidentialité | Légal