ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • 帮助
  • Sign Out
ArcGIS Desktop

ArcGIS Online

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

ArcGIS Desktop

全面的专业性 GIS

ArcGIS Enterprise

面向企业的 GIS

ArcGIS for Developers

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

ArcGIS Solutions

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

ArcGIS Marketplace

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

  • 文档
  • 支持
Esri
  • 登录
user
  • 我的个人资料
  • 登出

帮助

  • 主页
  • 入门
  • 制图
  • 分析
  • 管理数据
  • 工具
  • 更多...

CreateSQLiteDatabase

  • 摘要
  • 语法
  • 代码示例

摘要

创建 SQLite 数据库或 GeoPackage。

语法

CreateSQLiteDatabase (sqlite_database_path, {spatial_type})
参数说明数据类型
sqlite_database_path

Location of the SQLite database to be created and the name of the SQLite database file. You must include the .sqlite extension in the database file name if creating a SQLite database that uses a spatial type of ST_Geometry or SpatiaLite. When creating a GeoPackage, a .gpkg extension is required.

String
spatial_type

The geometry type to install with the new SQLite database. You can use only one geometry type in SQLite databases.

  • ST_GEOMETRY —Esri's spatial storage type. This is the default.
  • SPATIALITE —SpatiaLite spatial storage type.
  • GEOPACKAGE — OGC GeoPackage dataset.
String

返回值

数据类型说明
File

安装 ST_Geometry 或 SpatiaLite 几何类型的 SQLite 数据库(扩展名为 .sqlite)。此外,将返回 GeoPackage(.gpkg 扩展名)。

代码示例

CreateSQLiteDatabase ST_Geometry 示例 1

创建 SQLite 数据库。

import arcpy

# Set local variables
sqlite_database_path = 'C:/Data/Counties.sqlite'

# Execute CreateSQLiteDatabase
arcpy.gp.CreateSQLiteDatabase(sqlite_database_path, "ST_GEOMETRY")
CreateSQLiteDatabase GeoPackage 示例 2

创建 GeoPackage。

import arcpy

# Set local variables
sqlite_database_path = 'C:/Data/Counties.gpkg'

# Execute CreateSQLiteDatabase
arcpy.gp.CreateSQLiteDatabase(sqlite_database_path, "GEOPACKAGE")

ArcGIS Desktop

  • 主页
  • 文档
  • 支持

ArcGIS 平台

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

关于 Esri

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