Skip to content

Commit

Permalink
Use SpatiaLite right spelling when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
DelazJ committed Jul 6, 2017
1 parent 0c96792 commit 6fab688
Show file tree
Hide file tree
Showing 44 changed files with 112 additions and 112 deletions.
2 changes: 1 addition & 1 deletion INSTALL
Expand Up @@ -1245,7 +1245,7 @@ osgEarth), try bypassing ccache.
=========================================================

Download William Kyngesburye's excellent GDAL Complete package that includes
PROJ, GEOS, GDAL, SQLite3, Spatialite, and image libraries, as frameworks.
PROJ, GEOS, GDAL, SQLite3, SpatiaLite, and image libraries, as frameworks.
There are also GSL and FreeType frameworks.

http://www.kyngchaos.com/software/frameworks
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -42,7 +42,7 @@ modified.
* PostgreSQL/PostGIS
* GRASS
* GeoPackage
* Spatialite
* SpatiaLite
* [Other OGR supported formats](http://www.gdal.org/ogr_formats.html)
* MSSQL
* Oracle
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindSpatiaLite.cmake
Expand Up @@ -31,7 +31,7 @@ IF (APPLE)
SET (CMAKE_FIND_FRAMEWORK_save ${CMAKE_FIND_FRAMEWORK} CACHE STRING "" FORCE)
SET (CMAKE_FIND_FRAMEWORK "ONLY" CACHE STRING "" FORCE)
FIND_PATH(SPATIALITE_INCLUDE_DIR SQLite3/spatialite.h)
# if no spatialite header, we don't want sqlite find below to succeed
# if no SpatiaLite header, we don't want SQLite find below to succeed
IF (SPATIALITE_INCLUDE_DIR)
FIND_LIBRARY(SPATIALITE_LIBRARY SQLite3)
# FIND_PATH doesn't add "Headers" for a framework
Expand Down
2 changes: 1 addition & 1 deletion python/analysis/openstreetmap/qgsosmdatabase.sip
Expand Up @@ -41,7 +41,7 @@ class QgsOSMDatabase

void setFileName( const QString &dbFileName );
%Docstring
Setter for the spatialite database.
Setter for the SpatiaLite database.
%End
QString filename() const;
%Docstring
Expand Down
32 changes: 16 additions & 16 deletions python/core/qgsvectorlayer.sip
Expand Up @@ -25,10 +25,10 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator, QgsFeatureSin
The QgsVectorLayer is instantiated by specifying the name of a data provider,
such as postgres or wfs, and url defining the specific data set to connect to.
The vector layer constructor in turn instantiates a QgsVectorDataProvider subclass
corresponding to the provider type, and passes it the url. The data provider
corresponding to the provider type, and passes it the url. The data provider
connects to the data source.

The QgsVectorLayer provides a common interface to the different data types. It also
The QgsVectorLayer provides a common interface to the different data types. It also
manages editing transactions.

Sample usage of the QgsVectorLayer class:
Expand All @@ -45,8 +45,8 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator, QgsFeatureSin
\subsection memory Memory data providerType (memory)

The memory data provider is used to construct in memory data, for example scratch
data or data generated from spatial operations such as contouring. There is no
inherent persistent storage of the data. The data source uri is constructed. The
data or data generated from spatial operations such as contouring. There is no
inherent persistent storage of the data. The data source uri is constructed. The
url specifies the geometry type ("point", "linestring", "polygon",
"multipoint","multilinestring","multipolygon"), optionally followed by url parameters
as follows:
Expand All @@ -59,35 +59,35 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator, QgsFeatureSin
Specifies that the layer will be constructed with a spatial index

- field=name:type(length,precision)
Defines an attribute of the layer. Multiple field parameters can be added
to the data provider definition. type is one of "integer", "double", "string".
Defines an attribute of the layer. Multiple field parameters can be added
to the data provider definition. type is one of "integer", "double", "string".

An example url is "Point?crs=epsg:4326&field=id:integer&field=name:string(20)&index=yes"

\subsection ogr OGR data provider (ogr)

Accesses data using the OGR drivers (http://www.gdal.org/ogr/ogr_formats.html). The url
is the OGR connection string. A wide variety of data formats can be accessed using this
is the OGR connection string. A wide variety of data formats can be accessed using this
driver, including file based formats used by many GIS systems, database formats, and
web services. Some of these formats are also supported by custom data providers listed
web services. Some of these formats are also supported by custom data providers listed
below.

\subsection spatialite Spatialite data provider (spatialite)
\subsection spatialite SpatiaLite data provider (spatialite)

Access data in a spatialite database. The url defines the connection parameters, table,
geometry column, and other attributes. The url can be constructed using the
Access data in a SpatiaLite database. The url defines the connection parameters, table,
geometry column, and other attributes. The url can be constructed using the
QgsDataSourceUri class.

\subsection postgres Postgresql data provider (postgres)
\subsection postgres PostgreSQL data provider (postgres)

Connects to a postgresql database. The url defines the connection parameters, table,
geometry column, and other attributes. The url can be constructed using the
Connects to a postgresql database. The url defines the connection parameters, table,
geometry column, and other attributes. The url can be constructed using the
QgsDataSourceUri class.

\subsection mssql Microsoft SQL server data provider (mssql)

Connects to a Microsoft SQL server database. The url defines the connection parameters, table,
geometry column, and other attributes. The url can be constructed using the
Connects to a Microsoft SQL server database. The url defines the connection parameters, table,
geometry column, and other attributes. The url can be constructed using the
QgsDataSourceUri class.

\subsection wfs WFS (web feature service) data provider (wfs)
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/db_manager/db_plugins/spatialite/connector.py
Expand Up @@ -82,7 +82,7 @@ def isValidDatabase(self, path):
return isValid

def _checkSpatial(self):
""" check if it's a valid spatialite db """
""" check if it's a valid SpatiaLite db """
self.has_spatial = self._checkGeometryColumnsTable()
return self.has_spatial

Expand Down Expand Up @@ -118,7 +118,7 @@ def getInfo(self):
return c.fetchone()

def getSpatialInfo(self):
""" returns tuple about spatialite support:
""" returns tuple about SpatiaLite support:
- lib version
- geos version
- proj version
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/db_manager/db_plugins/spatialite/plugin.py
Expand Up @@ -90,7 +90,7 @@ def addConnection(self, conn_name, uri):
def addConnectionActionSlot(self, item, action, parent, index):
QApplication.restoreOverrideCursor()
try:
filename, selected_filter = QFileDialog.getOpenFileName(parent, "Choose Sqlite/Spatialite file")
filename, selected_filter = QFileDialog.getOpenFileName(parent, "Choose SQLite/SpatiaLite file")
if not filename:
return
finally:
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/db_manager/dlg_sql_layer_window.py
Expand Up @@ -80,7 +80,7 @@ def __init__(self, iface, layer, parent=None):
self.dbplugin = dbplugin
self.db = db
self.filter = ""
self.allowMultiColumnPk = isinstance(db, PGDatabase) # at the moment only PostgreSQL allows a primary key to span multiple columns, spatialite doesn't
self.allowMultiColumnPk = isinstance(db, PGDatabase) # at the moment only PostgreSQL allows a primary key to span multiple columns, SpatiaLite doesn't
self.aliasSubQuery = isinstance(db, PGDatabase) # only PostgreSQL requires subqueries to be aliases
self.setupUi(self)
self.setWindowTitle(
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/db_manager/dlg_sql_window.py
Expand Up @@ -58,7 +58,7 @@ def __init__(self, iface, db, parent=None):
self.iface = iface
self.db = db
self.filter = ""
self.allowMultiColumnPk = isinstance(db, PGDatabase) # at the moment only PostgreSQL allows a primary key to span multiple columns, spatialite doesn't
self.allowMultiColumnPk = isinstance(db, PGDatabase) # at the moment only PostgreSQL allows a primary key to span multiple columns, SpatiaLite doesn't
self.aliasSubQuery = isinstance(db, PGDatabase) # only PostgreSQL requires subqueries to be aliases
self.setupUi(self)
self.setWindowTitle(
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/processing/algs/help/qgis.yaml
Expand Up @@ -253,7 +253,7 @@ qgis:hypsometriccurves: >
This algorithm computes hypsometric curves for an input Digital Elevation Model. Curves are produced as table files in an output folder specified by the user.

qgis:importintospatialite: >
This algorithm imports a vector layer into a Spatialite database, creating a new table.
This algorithm imports a vector layer into a SpatiaLite database, creating a new table.

qgis:importintopostgis: >
This algorithm imports a vector layer into a PostGIS database, creating a new table.
Expand Down Expand Up @@ -405,7 +405,7 @@ qgis:polygonstolines: >
This algorithm takes a polygon layer and creates a line layer, with lines representing the rings of the polygons in the input layer.

qgis:spatialiteexecutesql: >
This algorithm performs a SQL database query on a Spatialite database.
This algorithm performs a SQL database query on a SpatiaLite database.

qgis:postgisexecutesql: >
This algorithm performs a SQL database query on a PostGIS database connected to QGIS.
Expand Down
Expand Up @@ -53,7 +53,7 @@ def name(self):
return 'spatialiteexecutesql'

def displayName(self):
return self.tr('Spatialite execute SQL')
return self.tr('SpatiaLite execute SQL')

def processAlgorithm(self, parameters, context, feedback):
database = self.parameterAsVectorLayer(parameters, self.DATABASE, context)
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/processing/gui/DestinationSelectionPanel.py
Expand Up @@ -129,7 +129,7 @@ def selectOutput(self):
if isinstance(self.parameter, QgsProcessingParameterFeatureSink) \
and self.alg.provider().supportsNonFileBasedOutput():
actionSaveToSpatialite = QAction(
self.tr('Save to Spatialite table...'), self.btnSelect)
self.tr('Save to SpatiaLite table...'), self.btnSelect)
actionSaveToSpatialite.triggered.connect(self.saveToSpatialite)
popupMenu.addAction(actionSaveToSpatialite)
actionSaveToPostGIS = QAction(
Expand Down Expand Up @@ -194,7 +194,7 @@ def saveToSpatialite(self):
path = ProcessingConfig.getSetting(ProcessingConfig.OUTPUT_FOLDER)

fileDialog = QgsEncodingFileDialog(
self, self.tr('Save Spatialite'), path, fileFilter, self.encoding)
self, self.tr('Save SpatiaLite'), path, fileFilter, self.encoding)
fileDialog.setFileMode(QFileDialog.AnyFile)
fileDialog.setAcceptMode(QFileDialog.AcceptSave)
fileDialog.setOption(QFileDialog.DontConfirmOverwrite, True)
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/processing/tools/spatialite.py
Expand Up @@ -63,14 +63,14 @@ def con_info(self):
return str(self.dbname)

def init_spatialite(self):
# Get spatialite version
# Get SpatiaLite version
c = self.con.cursor()
try:
self._exec_sql(c, u'SELECT spatialite_version()')
rep = c.fetchall()
v = [int(x) if x.isdigit() else x for x in re.findall("\d+|[a-zA-Z]+", rep[0][0])]

# Add spatialite support
# Add SpatiaLite support
if v >= [4, 1, 0]:
# 4.1 and above
sql = "SELECT initspatialmetadata(1)"
Expand Down
8 changes: 4 additions & 4 deletions python/utils.py
Expand Up @@ -590,7 +590,7 @@ def startServerPlugin(packageName):


def spatialite_connect(*args, **kwargs):
"""returns a dbapi2.Connection to a spatialite db
"""returns a dbapi2.Connection to a SpatiaLite db
either using pyspatialite if it is present
or using the "mod_spatialite" extension (python3)"""
try:
Expand All @@ -601,11 +601,11 @@ def spatialite_connect(*args, **kwargs):
con.enable_load_extension(True)
cur = con.cursor()
libs = [
# Spatialite >= 4.2 and Sqlite >= 3.7.17, should work on all platforms
# SpatiaLite >= 4.2 and Sqlite >= 3.7.17, should work on all platforms
("mod_spatialite", "sqlite3_modspatialite_init"),
# Spatialite >= 4.2 and Sqlite < 3.7.17 (Travis)
# SpatiaLite >= 4.2 and Sqlite < 3.7.17 (Travis)
("mod_spatialite.so", "sqlite3_modspatialite_init"),
# Spatialite < 4.2 (linux)
# SpatiaLite < 4.2 (linux)
("libspatialite.so", "sqlite3_extension_init")
]
found = False
Expand Down
2 changes: 1 addition & 1 deletion resources/context_help/QgsVectorLayerSaveAsDialog
Expand Up @@ -7,7 +7,7 @@
<li>At <label>Save as</label> you can enter a destination files name or select one using the <label>Browse</label> button.
<li>In the <label>Encoding</label> list you can define in which encoding the data should be saved.
<li>Using the <label>CRS</label> you can select a CRS into which the data about to be saved should be reprojected.
<li>OGR also has various options for the different formats it supports. Use the <label>datasource</label> creation field to set the datasource options and the <label>layer</label> creation options. Enter one options per line (e.g. <code>SPATIALITE=yes</code> in the <label>datasource</label> to create a spatialite database using the SQLite driver).
<li>OGR also has various options for the different formats it supports. Use the <label>datasource</label> creation field to set the datasource options and the <label>layer</label> creation options. Enter one options per line (e.g. <code>SpatiaLite=yes</code> in the <label>datasource</label> to create a SpatiaLite database using the SQLite driver).
</ul>

See <a href="http://gdal.org/ogr_formats.html">OGR Vector formats</a> for a list of supported formats and the available options.
4 changes: 2 additions & 2 deletions src/analysis/openstreetmap/qgsosmdatabase.h
Expand Up @@ -56,7 +56,7 @@ class ANALYSIS_EXPORT QgsOSMDatabase
//! QgsOSMDatabase cannot be copied.
QgsOSMDatabase &operator=( const QgsOSMDatabase &rh ) = delete;

//! Setter for the spatialite database.
//! Setter for the SpatiaLite database.
void setFileName( const QString &dbFileName ) { mDbFileName = dbFileName; }
QString filename() const { return mDbFileName; }
bool isOpen() const;
Expand Down Expand Up @@ -89,7 +89,7 @@ class ANALYSIS_EXPORT QgsOSMDatabase

QgsPolyline wayPoints( QgsOSMId id ) const;

// export to spatialite
// export to SpatiaLite

enum ExportType { Point, Polyline, Polygon };
bool exportSpatiaLite( ExportType type, const QString &tableName,
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgisapp.h
Expand Up @@ -1136,7 +1136,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
void newVectorLayer();
//! Create a new memory layer
void newMemoryLayer();
//! Create a new empty spatialite layer
//! Create a new empty SpatiaLite layer
void newSpatialiteLayer();
//! Create a new empty GeoPackage layer
void newGeoPackageLayer();
Expand Down
6 changes: 3 additions & 3 deletions src/app/qgsnewspatialitelayerdialog.cpp
@@ -1,6 +1,6 @@
/***************************************************************************
qgsnewspatialitelayerdialog.cpp
Creates a new Spatialite layer. This dialog borrows heavily from
Creates a new SpatiaLite layer. This dialog borrows heavily from
qgsnewvectorlayerdialog.cpp
-------------------
begin : 2010-03-18
Expand Down Expand Up @@ -189,7 +189,7 @@ void QgsNewSpatialiteLayerDialog::on_mRemoveAttributeButton_clicked()

void QgsNewSpatialiteLayerDialog::on_pbnFindSRID_clicked()
{
// first get list of supported SRID from the selected Spatialite database
// first get list of supported SRID from the selected SpatiaLite database
// to build filter for projection selector
sqlite3 *db = nullptr;
bool status = true;
Expand Down Expand Up @@ -278,7 +278,7 @@ bool QgsNewSpatialiteLayerDialog::createDb()
bool loaded = myLib->load();
if ( loaded )
{
QgsDebugMsg( "spatialite provider loaded" );
QgsDebugMsg( "SpatiaLite provider loaded" );

typedef bool ( *createDbProc )( const QString &, QString & );
createDbProc createDbPtr = ( createDbProc ) cast_to_fptr( myLib->resolve( "createDb" ) );
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsconnectionpool.h
Expand Up @@ -49,7 +49,7 @@
* - having handleConnectionExpired() slot that calls onConnectionExpired()
* - having startExpirationTimer(), stopExpirationTimer() slots to start/stop the expiration timer
*
* For an example on how to use the template class, have a look at the implementation in postgres/spatialite providers.
* For an example on how to use the template class, have a look at the implementation in Postgres/SpatiaLite providers.
* \note not available in Python bindings
*/
template <typename T>
Expand Down
18 changes: 9 additions & 9 deletions src/core/qgsofflineediting.cpp
Expand Up @@ -68,10 +68,10 @@ QgsOfflineEditing::QgsOfflineEditing()
* returns offline project file path
*
* Workflow:
* - copy layers to spatialite
* - create spatialite db at offlineDataPath
* - copy layers to SpatiaLite
* - create SpatiaLite db at offlineDataPath
* - create table for each layer
* - add new spatialite layer
* - add new SpatiaLite layer
* - copy features
* - save as offline project
* - mark offline layers
Expand All @@ -91,7 +91,7 @@ bool QgsOfflineEditing::convertToOfflineProject( const QString &offlineDataPath,
int rc = QgsSLConnect::sqlite3_open( dbPath.toUtf8().constData(), &db );
if ( rc != SQLITE_OK )
{
showWarning( tr( "Could not open the spatialite database" ) );
showWarning( tr( "Could not open the SpatiaLite database" ) );
}
else
{
Expand Down Expand Up @@ -152,7 +152,7 @@ bool QgsOfflineEditing::convertToOfflineProject( const QString &offlineDataPath,
}
}

// restore join info on new spatialite layer
// restore join info on new SpatiaLite layer
QMap<QString, QgsVectorJoinList >::ConstIterator it;
for ( it = joinInfoBuffer.constBegin(); it != joinInfoBuffer.constEnd(); ++it )
{
Expand Down Expand Up @@ -650,7 +650,7 @@ QgsVectorLayer *QgsOfflineEditing::copyVectorLayer( QgsVectorLayer *layer, sqlit
{
remoteFeatureIds << f.id();

// NOTE: Spatialite provider ignores position of geometry column
// NOTE: SpatiaLite provider ignores position of geometry column
// fill gap in QgsAttributeMap if geometry column is not last (WORKAROUND)
int column = 0;
QgsAttributes attrs = f.attributes();
Expand Down Expand Up @@ -774,7 +774,7 @@ void QgsOfflineEditing::applyFeaturesAdded( QgsVectorLayer *offlineLayer, QgsVec
int newAttrsCount = remoteLayer->fields().count();
for ( QgsFeatureList::iterator it = features.begin(); it != features.end(); ++it )
{
// NOTE: Spatialite provider ignores position of geometry column
// NOTE: SpatiaLite provider ignores position of geometry column
// restore gap in QgsAttributeMap if geometry column is not last (WORKAROUND)
QMap<int, int> attrLookup = attributeLookup( offlineLayer, remoteLayer );
QgsAttributes newAttrs( newAttrsCount );
Expand Down Expand Up @@ -1010,8 +1010,8 @@ sqlite3 *QgsOfflineEditing::openLoggingDb()
int rc = sqlite3_open( absoluteDbPath.toUtf8().constData(), &db );
if ( rc != SQLITE_OK )
{
QgsDebugMsg( "Could not open the spatialite logging database" );
showWarning( tr( "Could not open the spatialite logging database" ) );
QgsDebugMsg( "Could not open the SpatiaLite logging database" );
showWarning( tr( "Could not open the SpatiaLite logging database" ) );
sqlite3_close( db );
db = nullptr;
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsslconnect.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
qgsslconnect.cpp - thin wrapper class to connect to spatialite databases
qgsslconnect.cpp - thin wrapper class to connect to SpatiaLite databases
----------------------
begin : May 2015
copyright : (C) 2015 by Jürgen fischer
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsslconnect.h
@@ -1,5 +1,5 @@
/***************************************************************************
qgsslconnect.h - thin wrapper class to connect to spatialite databases
qgsslconnect.h - thin wrapper class to connect to SpatiaLite databases
----------------------
begin : May 2015
copyright : (C) 2015 by Jürgen fischer
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgssqliteexpressioncompiler.h
Expand Up @@ -27,7 +27,7 @@
* \class QgsSQLiteExpressionCompiler
* \brief Expression compiler for translation to SQlite SQL WHERE clauses.
*
* This class is designed to be used by spatialite and OGR providers.
* This class is designed to be used by SpatiaLite and OGR providers.
* \since QGIS 2.16
* \note Not part of stable API, may change in future versions of QGIS
* \note Not available in Python bindings
Expand Down

0 comments on commit 6fab688

Please sign in to comment.