Creates a GeoPackage or an SQLite database that contains the ST_Geometry or SpatiaLite spatial type.
Usage
The Output Database Name parameter value will be automatically assigned an extension based on the value of the Spatial Type parameter. If the spatial type parameter value is ST_Geometry or SpatiaLite, the output name will have an .sqlite extension. If the spatial type parameter value is GeoPackage, the output name will have a .gpkg extension.
The location of the SQLite database or GeoPackage that will be created and the name of the file. The .sqlite extension will be automatically assigned if the Spatial Type parameter value is ST_Geometry or SpatiaLite. If the Spatial Type parameter value is GeoPackage or any of the GeoPackage versions, the .gpkg extension will be automatically assigned.
File
Spatial Type
(Optional)
Specifies the spatial type that will be installed with the new SQLite database or the GeoPackage version that will be created.
ST_Geometry—The Esri spatial storage type will be installed. This is the default.
SpatiaLite—SpatiaLite spatial storage type will be installed.
GeoPackage (the latest GeoPackage version supported by ArcGIS)—The latest version of OGC GeoPackage that is supported by ArcGIS will be created.
GeoPackage 1.0—An OGC GeoPackage 1.0 dataset will be created.
GeoPackage 1.1—An OGC GeoPackage 1.1 dataset will be created.
GeoPackage 1.2.1—An OGC GeoPackage 1.2.1 dataset will be created.
GeoPackage 1.3—An OGC GeoPackage 1.3 dataset will be created.
GeoPackage 1.4—An OGC GeoPackage 1.4 dataset will be created.
The location of the SQLite database or GeoPackage that will be created and the name of the file. The .sqlite extension will be automatically assigned if the spatial_type parameter value is ST_GEOMETRY or SPATIALITE. If the spatial_type parameter value is GEOPACKAGE, the .gpkg extension will be automatically assigned.
File
spatial_type
(Optional)
Specifies the spatial type that will be installed with the new SQLite database or the GeoPackage version that will be created.
ST_GEOMETRY—The Esri spatial storage type will be installed. This is the default.
SPATIALITE—SpatiaLite spatial storage type will be installed.
GEOPACKAGE—The latest version of OGC GeoPackage that is supported by ArcGIS will be created.
GEOPACKAGE_1.0—An OGC GeoPackage 1.0 dataset will be created.
GEOPACKAGE_1.1—An OGC GeoPackage 1.1 dataset will be created.
GEOPACKAGE_1.2—An OGC GeoPackage 1.2.1 dataset will be created.
GEOPACKAGE_1.3—An OGC GeoPackage 1.3 dataset will be created.
GEOPACKAGE_1.4—An OGC GeoPackage 1.4 dataset will be created.
String
Code sample
CreateSQLiteDatabase example 1 (Python window)
The following Python window script demonstrates how to use the CreateSQLiteDatabase function in immediate mode to create a GeoPackage.
CreateSQLiteDatabase example 2 (stand-alone script)
The following stand-alone script demonstrates how to use the CreateSQLiteDatabase function to create an SQLite database that contains the ST_Geometry spatial type.
import arcpy
# Run CreateSQLiteDatabase
arcpy.management.CreateSQLiteDatabase('C:/data/example.sqlite', 'ST_GEOMETRY')