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

Point

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

Resumen

The point object is used frequently with cursors. Point features return a single point object instead of an array of point objects. All other feature types—polygon, polyline, and multipoint—return an array of point objects or an array containing multiple arrays of point objects if the feature has multiple parts.

Debate

A Point is not a geometry class, but is commonly used to construct geometry. In the example below, a Point is used to create a PointGeometry object.

point = arcpy.Point(25282, 43770)
ptGeometry = arcpy.PointGeometry(point)

Sintaxis

 Point ({X}, {Y}, {Z}, {M}, {ID})
ParámetroExplicaciónTipo de datos
X

The X coordinate of the point.

(El valor predeterminado es 0.0)

Double
Y

The Y coordinate of the point.

(El valor predeterminado es 0.0)

Double
Z

The Z coordinate of the point.

(El valor predeterminado es None)

Double
M

The M value of the point.

(El valor predeterminado es None)

Double
ID

The shape ID of the point.

(El valor predeterminado es 0)

Integer

Propiedades

PropiedadExplicaciónTipo de datos
ID
(Lectura y escritura)

An integer used to uniquely identify the point.

Integer
M
(Lectura y escritura)

The measure value of the point.

Double
X
(Lectura y escritura)

The horizontal coordinate of the point.

Double
Y
(Lectura y escritura)

The vertical coordinate of the point.

Double
Z
(Lectura y escritura)

The elevation value of the point.

Double

Vista general del método

MétodoExplicación
clone (point_object)

Clone the point object.

contains (second_geometry, {relation})

Indicates if the base geometry contains the comparison geometry.

contains is the opposite of within.

Only True relationships are shown in this illustration.

Possible contains relationships
crosses (second_geometry)

Indicates if the two geometries intersect in a geometry of a lesser shape type.

Two polylines cross if they share only points in common, at least one of which is not an endpoint. A polyline and an polygon cross if they share a polyline or a point (for vertical line) in common on the interior of the polygon which is not equivalent to the entire polyline.

Only True relationships are shown in this illustration.

Possible crosses relationships
disjoint (second_geometry)

Indicates if the base and comparison geometries share no points in common.

Two geometries intersect if disjoint returns False.

Only True relationships are shown in this illustration.

Possible disjoint relationships
equals (second_geometry)

Indicates if the base and comparison geometries are of the same shape type and define the same set of points in the plane. This is a 2D comparison only; M and Z values are ignored.

Only True relationships are shown in this illustration.

Possible equals relationships
overlaps (second_geometry)

Indicates if the intersection of the two geometries has the same shape type as one of the input geometries and is not equivalent to either of the input geometries.

Only True relationships are shown in this illustration.

Possible overlaps relationships
touches (second_geometry)

Indicates if the boundaries of the geometries intersect.

Two geometries touch when the intersection of the geometries is not empty, but the intersection of their interiors is empty. For example, a point touches a polyline only if the point is coincident with one of the polyline end points.

Only True relationships are shown in this illustration.

Possible touches relationships
within (second_geometry, {relation})

Indicates if the base geometry is within the comparison geometry.

within is the opposite operator of contains.

Only True relationships are shown in this illustration.

Possible within relationships

The base geometry is within the comparison geometry if the base geometry is the intersection of the geometries and the intersection of their interiors is not empty. within is a Clementini operator, except in the case of an empty base geometry.

Métodos

clone (point_object)
ParámetroExplicaciónTipo de datos
point_object

A point object.

Point
contains (second_geometry, {relation})
ParámetroExplicaciónTipo de datos
second_geometry

A second geometry.

Object
relation

The spatial relationship type.

  • BOUNDARY — Relationship has no restrictions for interiors or boundaries.
  • CLEMENTINI — Interiors of geometries must intersect. Specifying CLEMENTINI is equivalent to specifying None. This is the default.
  • PROPER — Boundaries of geometries must not intersect.

(El valor predeterminado es None)

String

Valor de retorno

Tipo de datosExplicación
Boolean

A return Boolean value of True indicates this geometry contains the second geometry.

crosses (second_geometry)
ParámetroExplicaciónTipo de datos
second_geometry

A second geometry.

Object

Valor de retorno

Tipo de datosExplicación
Boolean

A return Boolean value of True indicates the two geometries intersect in a geometry of a lesser shape type.

disjoint (second_geometry)
ParámetroExplicaciónTipo de datos
second_geometry

A second geometry.

Object

Valor de retorno

Tipo de datosExplicación
Boolean

A return Boolean value of True indicates that the two geometries share no points in common.

equals (second_geometry)
ParámetroExplicaciónTipo de datos
second_geometry

A second geometry.

Object

Valor de retorno

Tipo de datosExplicación
Boolean

A return Boolean value of True indicates that the two geometries are of the same shape type and define the same set of points in the plane.

overlaps (second_geometry)
ParámetroExplicaciónTipo de datos
second_geometry

A second geometry.

Object

Valor de retorno

Tipo de datosExplicación
Boolean

A return Boolean value of True indicates the intersection of the two geometries has the same dimension as one of the input geometries.

touches (second_geometry)
ParámetroExplicaciónTipo de datos
second_geometry

A second geometry.

Object

Valor de retorno

Tipo de datosExplicación
Boolean

A return Boolean value of True indicates the boundaries of the geometries intersect.

within (second_geometry, {relation})
ParámetroExplicaciónTipo de datos
second_geometry

A second geometry.

Object
relation

The spatial relationship type.

  • BOUNDARY — Relationship has no restrictions for interiors or boundaries.
  • CLEMENTINI — Interiors of geometries must intersect. Specifying CLEMENTINI is equivalent to specifying None. This is the default.
  • PROPER — Boundaries of geometries must not intersect.

(El valor predeterminado es None)

String

Valor de retorno

Tipo de datosExplicación
Boolean

A return Boolean value of True indicates this geometry is contained within the second geometry.

Muestra de código

Point example

Create Point object and display its properties.

import arcpy

# Create point object
point = arcpy.Point(2000, 2500)

# Print point properties
print("Point properties:")
print(" ID: {0}".format(point.ID))
print(" X:  {0}".format(point.X))
print(" Y:  {0}".format(point.Y))
Point example 2

Examine point objects in polygon array object, returned from geometry object.

import arcpy

# Create cursor to retrieve Hawaii shape
feature_class = "c:/data/Hawaii.shp"
cursor = arcpy.da.SearchCursor(feature_class, ["SHAPE@"])

for row in cursor:
    # Get the geometry object from the shape field
    print("Number of Hawaiian islands: {0}".format(row[0].partCount))

    # GetPart returns an array of point objects for each part.
    for island in row[0].getPart():
        print("Vertices in island: {0}".format(island.count))
        for point in island:
            print("X: {0}, Y: {1})".format(point.X, point.Y))

Temas relacionados

  • PointGeometry
  • Polygon
  • Polyline
  • Multipoint
  • Geometry
  • Array
  • Leer geometrías
  • Escribir geometrías
  • Utilizar objetos de geometría con herramientas de geoprocesamiento

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