サマリー
Creates an SQLite database or 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.
| String |
戻り値
データ タイプ | 説明 |
File | An SQLite database (.sqlite extension) with either ST_Geometry or SpatiaLite geometry type installed. Alternately, a GeoPackage is returned (.gpkg extension). |
コードのサンプル
CreateSQLiteDatabase ST_Geometry example 1
Create an SQLite database.
import arcpy
# Set local variables
sqlite_database_path = 'C:/Data/Counties.sqlite'
# Execute CreateSQLiteDatabase
arcpy.gp.CreateSQLiteDatabase(sqlite_database_path, "ST_GEOMETRY")
CreateSQLiteDatabase GeoPackage example 2
Create a GeoPackage.
import arcpy
# Set local variables
sqlite_database_path = 'C:/Data/Counties.gpkg'
# Execute CreateSQLiteDatabase
arcpy.gp.CreateSQLiteDatabase(sqlite_database_path, "GEOPACKAGE")