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

ListSpatialReferences

  • Resumen
  • Sintaxis
  • Muestra de código

Resumen

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

Sintaxis

ListSpatialReferences ({wild_card}, {spatial_reference_type})
ParámetroExplicaciónTipo de datos
wild_card

Limits the spatial references listed by a simple wildcard check. The check is not case sensitive.

For example, arcpy.ListSpatialReferences("*Eckert*") would list Eckert I, Eckert II, and so forth.

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.

(El valor predeterminado es All)

String

Valor de retorno

Tipo de datosExplicación
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.

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

Muestra de código

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)

Temas relacionados

  • ListTransformations

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