Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix file formatting for better output rendering
  • Loading branch information
DelazJ authored and nyalldawson committed Jul 21, 2020
1 parent 5c83cd0 commit 140425b
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 38 deletions.
8 changes: 4 additions & 4 deletions python/core/auto_generated/expression/qgsexpression.sip.in
Expand Up @@ -31,7 +31,7 @@ Usage:
# examine the result

Three Value Logic
=================
-----------------

Similarly to SQL, this class supports three-value logic: true/false/unknown.
Unknown value may be a result of operations with missing data (NULL). Please note
Expand All @@ -42,13 +42,13 @@ There is no special (three-value) 'boolean' type: true/false is represented as
1/0 integer, unknown value is represented the same way as NULL values: NULL QVariant.

Performance
===========
-----------

For better performance with many evaluations you may first call prepare(fields) function
to find out indices of columns and then repeatedly call evaluate(feature).

Type conversion
===============
---------------

Operators and functions that expect arguments to be of a particular
type automatically convert the arguments to that type, e.g. sin('2.1') will convert
Expand All @@ -59,7 +59,7 @@ Comparison operators do numeric comparison in case both operators are numeric (i
or they can be converted to numeric types.

Implicit sharing
================
----------------

This class is implicitly shared, copying has a very low overhead.
It is normally preferable to call `QgsExpression( otherExpression )` instead of
Expand Down
24 changes: 13 additions & 11 deletions python/core/auto_generated/qgscoordinatereferencesystem.sip.in
Expand Up @@ -29,9 +29,9 @@ allows lookups of CRS and seamless conversions between the various definitions.

Most commonly one comes across two types of coordinate systems:

# Geographic coordinate systems: based on a geodetic datum, normally with coordinates being
- Geographic coordinate systems: based on a geodetic datum, normally with coordinates being
latitude/longitude in degrees. The most common one is World Geodetic System 84 (WGS84).
# Projected coordinate systems: based on a geodetic datum with coordinates projected to a plane,
- Projected coordinate systems: based on a geodetic datum with coordinates projected to a plane,
typically using meters or feet as units. Common projected coordinate systems are Universal
Transverse Mercator or Albers Equal Area.

Expand Down Expand Up @@ -63,11 +63,11 @@ This will produce the following output:
CRS PROJ text: +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 [output trimmed]

CRS Definition Formats
======================
----------------------

This section gives an overview of various supported CRS definition formats:

# Authority and Code: Also referred to as OGC WMS format within QGIS as they have been widely
- Authority and Code: Also referred to as OGC WMS format within QGIS as they have been widely
used in OGC standards. These are encoded as `<auth>:<code>`, for example `EPSG:4326` refers
to WGS84 system. EPSG is the most commonly used authority that covers a wide range
of coordinate systems around the world.
Expand All @@ -84,7 +84,8 @@ on different machines or user profiles.
.. seealso:: :py:func:`authid`

.. seealso:: :py:func:`createFromOgcWmsCrs`
# PROJ string: This is a string consisting of a series of key/value pairs in the following

- PROJ string: This is a string consisting of a series of key/value pairs in the following
format: `+param1=value1 +param2=value2 [...]`. This is the format natively used by the
underlying proj library. For example, the definition of WGS84 looks like this:

Expand All @@ -97,7 +98,8 @@ on different machines or user profiles.
.. seealso:: :py:func:`toProj`

.. seealso:: :py:func:`createFromProj`
# Well-known text (WKT): Defined by Open Geospatial Consortium (OGC), this is another common

- Well-known text (WKT): Defined by Open Geospatial Consortium (OGC), this is another common
format to define CRS. For WGS84 the OGC WKT definition is the following:

.. code-block::
Expand All @@ -117,7 +119,7 @@ on different machines or user profiles.
.. seealso:: :py:func:`createFromWkt`

CRS Database and Custom CRS
===========================
---------------------------

The database of CRS shipped with QGIS is stored in a SQLite database (see :py:func:`QgsApplication.srsDatabaseFilePath()`)
and it is based on the data files maintained by GDAL project (a variety of .csv and .wkt files).
Expand All @@ -134,7 +136,7 @@ The local CRS databases should never be accessed directly with SQLite functions,
you should use QgsCoordinateReferenceSystem API for CRS lookups and for managements of custom CRS.

Validation
==========
----------

In some cases (most prominently when loading a map layer), QGIS will try to ensure
that the given map layer CRS is valid using :py:func:`~validate` call. If not, a custom
Expand All @@ -144,8 +146,8 @@ If validation fails or no validation function is set, the default CRS is assigne
(WGS84). QGIS application registers its validation function that will act according
to user's settings (either show CRS selector dialog or use project/custom CRS).

Object Construction and Copying {#crs_construct_and_copy}
===============================
Object Construction and Copying
-------------------------------

The easiest way of creating CRS instances is to use QgsCoordinateReferenceSystem(const QString&)
constructor that automatically recognizes definition format from the given string.
Expand All @@ -158,7 +160,7 @@ unnecessary database lookups. If the CRS database is modified, then it is necess
Since QGIS 2.16 QgsCoordinateReferenceSystem objects are implicitly shared.

Caveats
=======
-------

There are two different flavors of WKT: one is defined by OGC, the other is the standard
used by ESRI. They look very similar, but they are not the same. QGIS is able to consume
Expand Down
12 changes: 4 additions & 8 deletions src/core/expression/qgsexpression.h
Expand Up @@ -62,8 +62,7 @@ The expressions try to follow both syntax and semantics of SQL expressions.
# examine the result
\endcode
Three Value Logic
=================
\section value_logic Three Value Logic
Similarly to SQL, this class supports three-value logic: true/false/unknown.
Unknown value may be a result of operations with missing data (NULL). Please note
Expand All @@ -73,14 +72,12 @@ that NULL is different value than zero or an empty string. For example
There is no special (three-value) 'boolean' type: true/false is represented as
1/0 integer, unknown value is represented the same way as NULL values: NULL QVariant.
Performance
===========
\section performance Performance
For better performance with many evaluations you may first call prepare(fields) function
to find out indices of columns and then repeatedly call evaluate(feature).
Type conversion
===============
\section type_conversion Type conversion
Operators and functions that expect arguments to be of a particular
type automatically convert the arguments to that type, e.g. sin('2.1') will convert
Expand All @@ -90,8 +87,7 @@ If implicit or explicit conversion is invalid, the evaluation returns an error.
Comparison operators do numeric comparison in case both operators are numeric (int/double)
or they can be converted to numeric types.
Implicit sharing
================
\section implicit_sharing Implicit sharing
This class is implicitly shared, copying has a very low overhead.
It is normally preferable to call `QgsExpression( otherExpression )` instead of
Expand Down
27 changes: 12 additions & 15 deletions src/core/qgscoordinatereferencesystem.h
Expand Up @@ -75,9 +75,9 @@ typedef void ( *CUSTOM_CRS_VALIDATION )( QgsCoordinateReferenceSystem & ) SIP_SK
*
* Most commonly one comes across two types of coordinate systems:
*
* # Geographic coordinate systems: based on a geodetic datum, normally with coordinates being
* - Geographic coordinate systems: based on a geodetic datum, normally with coordinates being
* latitude/longitude in degrees. The most common one is World Geodetic System 84 (WGS84).
* # Projected coordinate systems: based on a geodetic datum with coordinates projected to a plane,
* - Projected coordinate systems: based on a geodetic datum with coordinates projected to a plane,
* typically using meters or feet as units. Common projected coordinate systems are Universal
* Transverse Mercator or Albers Equal Area.
*
Expand Down Expand Up @@ -108,12 +108,11 @@ typedef void ( *CUSTOM_CRS_VALIDATION )( QgsCoordinateReferenceSystem & ) SIP_SK
* CRS PROJ text: +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 [output trimmed]
* \endcode
*
* CRS Definition Formats
* ======================
* \section crs_def_frmats CRS Definition Formats
*
* This section gives an overview of various supported CRS definition formats:
*
* # Authority and Code: Also referred to as OGC WMS format within QGIS as they have been widely
* - Authority and Code: Also referred to as OGC WMS format within QGIS as they have been widely
* used in OGC standards. These are encoded as `<auth>:<code>`, for example `EPSG:4326` refers
* to WGS84 system. EPSG is the most commonly used authority that covers a wide range
* of coordinate systems around the world.
Expand All @@ -128,7 +127,8 @@ typedef void ( *CUSTOM_CRS_VALIDATION )( QgsCoordinateReferenceSystem & ) SIP_SK
*
* \see authid()
* \see createFromOgcWmsCrs()
* # PROJ string: This is a string consisting of a series of key/value pairs in the following
*
* - PROJ string: This is a string consisting of a series of key/value pairs in the following
* format: `+param1=value1 +param2=value2 [...]`. This is the format natively used by the
* underlying proj library. For example, the definition of WGS84 looks like this:
*
Expand All @@ -138,7 +138,8 @@ typedef void ( *CUSTOM_CRS_VALIDATION )( QgsCoordinateReferenceSystem & ) SIP_SK
*
* \see toProj()
* \see createFromProj()
* # Well-known text (WKT): Defined by Open Geospatial Consortium (OGC), this is another common
*
* - Well-known text (WKT): Defined by Open Geospatial Consortium (OGC), this is another common
* format to define CRS. For WGS84 the OGC WKT definition is the following:
*
* \code
Expand All @@ -154,8 +155,7 @@ typedef void ( *CUSTOM_CRS_VALIDATION )( QgsCoordinateReferenceSystem & ) SIP_SK
* \see toWkt()
* \see createFromWkt()
*
* CRS Database and Custom CRS
* ===========================
* \section crs_db_and_custom CRS Database and Custom CRS
*
* The database of CRS shipped with QGIS is stored in a SQLite database (see QgsApplication::srsDatabaseFilePath())
* and it is based on the data files maintained by GDAL project (a variety of .csv and .wkt files).
Expand All @@ -171,8 +171,7 @@ typedef void ( *CUSTOM_CRS_VALIDATION )( QgsCoordinateReferenceSystem & ) SIP_SK
* The local CRS databases should never be accessed directly with SQLite functions, instead
* you should use QgsCoordinateReferenceSystem API for CRS lookups and for managements of custom CRS.
*
* Validation
* ==========
* \section validation Validation
*
* In some cases (most prominently when loading a map layer), QGIS will try to ensure
* that the given map layer CRS is valid using validate() call. If not, a custom
Expand All @@ -182,8 +181,7 @@ typedef void ( *CUSTOM_CRS_VALIDATION )( QgsCoordinateReferenceSystem & ) SIP_SK
* (WGS84). QGIS application registers its validation function that will act according
* to user's settings (either show CRS selector dialog or use project/custom CRS).
*
* Object Construction and Copying {#crs_construct_and_copy}
* ===============================
* \section crs_construct_and_copy Object Construction and Copying
*
* The easiest way of creating CRS instances is to use QgsCoordinateReferenceSystem(const QString&)
* constructor that automatically recognizes definition format from the given string.
Expand All @@ -195,8 +193,7 @@ typedef void ( *CUSTOM_CRS_VALIDATION )( QgsCoordinateReferenceSystem & ) SIP_SK
*
* Since QGIS 2.16 QgsCoordinateReferenceSystem objects are implicitly shared.
*
* Caveats
* =======
* \section caveats Caveats
*
* There are two different flavors of WKT: one is defined by OGC, the other is the standard
* used by ESRI. They look very similar, but they are not the same. QGIS is able to consume
Expand Down

0 comments on commit 140425b

Please sign in to comment.