ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • ArcGIS Pro
  • ArcMap
ArcGIS Desktop

ArcGIS Online

专为贵组织打造的制图平台

ArcGIS Desktop

全面的专业性 GIS

ArcGIS Enterprise

面向企业的 GIS

ArcGIS for Developers

用于构建位置感知应用程序的工具

ArcGIS Solutions

适用于行业的免费模板地图和应用程序

ArcGIS Marketplace

获取适用于组织的应用程序和数据

  • ArcGIS Pro
  • ArcMap
Esri
English
  • English
  • Deutsch
  • Español
  • Français
  • 日本語
  • Русский
  • 简体中文
  • 登录
user
  • 我的个人资料
  • 登出

ArcMap

  • 主页
  • 入门
  • 地图
  • 分析
  • 管理数据
  • 工具
  • 扩展模块
  • 管理数据
  • 管理地理数据库
  • 在地理数据库中使用 SQL
  • 将 ST_Geometry 与 SQL 搭配使用
  • ST_Geometry 函数引用
  • 返回顶部
  • ST_Geometry 存储类型
  • SQL 和 Esri ST_Geometry
  • ST_Geometry 类型的 SQL 实现差异
  • 加载 SQLite ST_Geometry 库
  • 几何验证
  • 空间索引

    • 空间索引和 ST_Geometry
    • 何时将空间索引和 ST_Geometry 一起使用?
    • R 树索引
    • 空间格网索引
    • 选择空间索引格网大小的指南
    • 有关使用空间格网索引的提示

    对现有地理数据库要素类使用 SQL

    • 利用 ST_Geometry 增强 ArcGIS 的功能
    • 对包含 ST_Geometry 列的表执行空间 SQL 查询
    • 针对包含 ST_Geometry 列的表应用空间视图
    • 对现有要素类使用 SQL

    使用 SQL 创建空间表

    • 有关创建用于 ArcGIS 的空间表规则
    • 创建包含 ST_Geometry 列的表
    • 注册 ST_Geometry 列
    • 取消注册 ST_Geometry 列
    • 使用 SQL 创建空间参考
    • 向包含 ST_Geometry 列的表中插入要素
    • 使用 SQL 为包含 ST_Geometry 列的表创建空间索引
    • 更新 ST_Geometry 空间列中的值
    • 从 ST_Geometry 空间列中删除值
    • 将表或视图注册到地理数据库
    • 工作流:使用 SQL 创建表并将表注册到地理数据库

    ST_Geometry 函数引用

    • 与 ST_Geometry 配合使用的 SQL 函数
    • 几何属性
    • ST_Geometry 的构造函数
    • 空间存取器函数
    • 空间关系
    • 空间关系函数
    • 空间运算
    • 空间运算函数
    • 参数圆、参数椭圆和参数楔形
    • ST_Aggr_ConvexHull
    • ST_Aggr_Intersection
    • ST_Aggr_Union
    • ST_Area
    • ST_AsBinary
    • ST_AsText
    • ST_Boundary
    • ST_Buffer
    • ST_Centroid
    • ST_Contains
    • ST_ConvexHull
    • ST_CoordDim
    • ST_Crosses
    • ST_Curve
    • ST_Difference
    • ST_Dimension
    • ST_Disjoint
    • ST_Distance
    • ST_EndPoint
    • ST_Entity
    • ST_Envelope
    • ST_EnvIntersects
    • ST_Equals
    • ST_Equalsrs
    • ST_ExteriorRing
    • ST_GeomCollection
    • ST_GeomCollFromWKB
    • ST_Geometry
    • ST_GeometryN
    • ST_GeometryType
    • ST_GeomFromText
    • ST_GeomFromWKB
    • ST_GeoSize
    • ST_InteriorRingN
    • ST_Intersection
    • ST_Intersects
    • ST_Is3d
    • ST_IsClosed
    • ST_IsEmpty
    • ST_IsMeasured
    • ST_IsRing
    • ST_IsSimple
    • ST_Length
    • ST_LineFromText
    • ST_LineFromWKB
    • ST_LineString
    • ST_M
    • ST_MaxM
    • ST_MaxX
    • ST_MaxY
    • ST_MaxZ
    • ST_MinM
    • ST_MinX
    • ST_MinY
    • ST_MinZ
    • ST_MLineFromText
    • ST_MLineFromWKB
    • ST_MPointFromText
    • ST_MPointFromWKB
    • ST_MPolyFromText
    • ST_MPolyFromWKB
    • ST_MultiCurve
    • ST_MultiLineString
    • ST_MultiPoint
    • ST_MultiPolygon
    • ST_MultiSurface
    • ST_NumGeometries
    • ST_NumInteriorRing
    • ST_NumPoints
    • ST_OrderingEquals
    • ST_Overlaps
    • ST_Point
    • ST_PointFromText
    • ST_PointFromWKB
    • ST_PointN
    • ST_PointOnSurface
    • ST_PolyFromText
    • ST_PolyFromWKB
    • ST_Polygon
    • ST_Relate
    • ST_SRID
    • ST_StartPoint
    • ST_Surface
    • ST_SymmetricDiff
    • ST_Touches
    • ST_Transform
    • ST_Union
    • ST_Within
    • ST_X
    • ST_Y
    • ST_Z

    ST_Intersects

    此 ArcGIS 10.5 文档已 存档,并且不再对其进行更新。 其中的内容和链接可能已过期。 请参阅最新文档。
    • 定义
    • 语法
    • 返回类型
    • 示例

    定义

    如果两个几何的交集不生成空集,则 ST_Intersects 返回 1(Oracle 和 SQLite)或 t (PostgreSQL);否则返回 0(Oracle 和 SQLite)或 f (PostgreSQL)。

    语法

    Oracle 和 PostgreSQL

    sde.st_intersects (geometry1 sde.st_geometry, geometry2 sde.st_geometry)

    SQLite

    st_intersects (geometry1 geometryblob, geometry2 geometryblob)

    返回类型

    布尔型

    示例

    消防局局长想要获得在危险废弃物场地的某一半径范围内的敏感区域的列表。

    敏感区域存储在 sensitive_areas 表中。定义为 polygon 的 shape 列存储每个敏感区域的轮廓。

    危险场地存储在 hazardous_sites 表中。定义为 point 的 site 列存储表示每个危险场地的地理中心的位置。

    SELECT 查询在每个危险场地周围创建缓冲半径区,并返回与危险场地缓冲区相交的敏感区域列表。

    Oracle

    --Create and populate tables.
    CREATE TABLE sensitive_areas (
     id integer,
     shape sde.st_geometry
    ); 
    
    CREATE TABLE hazardous_sites (
     id integer,
     site sde.st_geometry
    );
    
    INSERT INTO sensitive_areas VALUES (
     1,
     sde.st_geometry ('polygon ((20 30, 30 30, 30 40, 20 40, 20 30))', 4326)
    );
    
    INSERT INTO sensitive_areas VALUES (
     2,
     sde.st_geometry ('polygon ((30 30, 30 50, 50 50, 50 30, 30 30))', 4326)
    );
    
    INSERT INTO sensitive_areas VALUES (
     3,
     sde.st_geometry ('polygon ((40 40, 40 60, 60 60, 60 40, 40 40))', 4326)
    );
    
    INSERT INTO hazardous_sites VALUES (
     4,
     sde.st_geometry ('point (60 60)', 4326)
    );
    
    INSERT INTO hazardous_sites VALUES (
     5,
     sde.st_geometry ('point (30 30)', 4326)
    );
    
    --Create a buffer around the hazardous sites, then find the hazardous site buffers that intersect sensitive areas.
    SELECT sa.id SA_ID, hs.id HS_ID
     FROM SENSITIVE_AREAS sa, HAZARDOUS_SITES hs
     WHERE sde.st_intersects (sde.st_buffer (hs.site, .1), sa.shape) = 1
     ORDER BY sa.id;
    
    SA_ID      HS_ID
    
        1          5
        2          5
        3          4
    

    PostgreSQL

    --Create and populate tables.
    CREATE TABLE sensitive_areas (
     id serial,
     shape sde.st_geometry
    ); 
    
    CREATE TABLE hazardous_sites (
     id serial,
     site sde.st_geometry
    );
    
    INSERT INTO sensitive_areas (shape) VALUES (
     sde.st_geometry ('polygon ((20 30, 30 30, 30 40, 20 40, 20 30))', 4326)
    );
    
    INSERT INTO sensitive_areas (shape) VALUES (
     sde.st_geometry ('polygon ((30 30, 30 50, 50 50, 50 30, 30 30))', 4326)
    );
    
    INSERT INTO sensitive_areas (shape) VALUES (
     sde.st_geometry ('polygon ((40 40, 40 60, 60 60, 60 40, 40 40))', 4326)
    );
    
    INSERT INTO hazardous_sites (site) VALUES (
     sde.st_geometry ('point (60 60)', 4326)
    );
    
    INSERT INTO hazardous_sites (site) VALUES (
     sde.st_geometry ('point (30 30)', 4326)
    );
    
    --Create a buffer around the hazardous sites, then find the hazardous site buffers that intersect sensitive areas.
    SELECT sa.id AS sid, hs.id AS hid
     FROM sensitive_areas sa, hazardous_sites hs
     WHERE sde.st_intersects (sde.st_buffer (hs.site, .1), sa.shape) = 't'
     ORDER BY sa.id;
    
    sid     hid
    
      1       2
      2       2
      3       1
    

    SQLite

    --Create and populate tables.
    CREATE TABLE sensitive_areas (
     id integer primary key autoincrement not null
    ); 
    
    SELECT AddGeometryColumn (
     NULL,
     'sensitive_areas',
     'shape',
     4326,
     'polygon',
     'xy',
     'null'
    );
    
    CREATE TABLE hazardous_sites (
     id integer primary key autoincrement not null
    );
    
    SELECT AddGeometryColumn (
     NULL,
     'hazardous_sites',
     'site',
     4326,
     'point',
     'xy',
     'null'
    );
    
    INSERT INTO sensitive_areas (shape) VALUES (
     st_geometry ('polygon ((20 30, 30 30, 30 40, 20 40, 20 30))', 4326)
    );
    
    INSERT INTO sensitive_areas (shape) VALUES (
     st_geometry ('polygon ((30 30, 30 50, 50 50, 50 30, 30 30))', 4326)
    );
    
    INSERT INTO sensitive_areas (shape) VALUES (
     st_geometry ('polygon ((40 40, 40 60, 60 60, 60 40, 40 40))', 4326)
    );
    
    INSERT INTO hazardous_sites (site) VALUES (
     st_geometry ('point (60 60)', 4326)
    );
    
    INSERT INTO hazardous_sites (site) VALUES (
     st_geometry ('point (30 30)', 4326)
    );
    
    --Create a buffer around the hazardous sites, then find the hazardous site buffers that intersect sensitive areas.
    SELECT sa.id AS "sid", hs.id AS "hid"
     FROM sensitive_areas sa, hazardous_sites hs
     WHERE st_intersects (st_buffer (hs.site, .1), sa.shape) = 1
     ORDER BY sa.id;
    
    sid     hid
    
      1       2
      2       2
      3       1
    

    相关主题

    • 加载 SQLite ST_Geometry 库

    ArcGIS Desktop

    • 主页
    • ArcGIS Pro
    • ArcMap
    • 文档
    • 支持

    ArcGIS

    • ArcGIS Online
    • ArcGIS Desktop
    • ArcGIS Enterprise
    • ArcGIS Platform
    • ArcGIS Developer
    • ArcGIS Solutions
    • ArcGIS Marketplace

    关于 Esri

    • 关于我们
    • 招贤纳士
    • Esri 博客
    • 用户大会
    • 开发者峰会
    Esri
    Copyright © 2018 Esri. | 隐私政策 | | 法律声明