Skip to content

Commit

Permalink
Merge pull request #4251 from rouault/doc_spelling
Browse files Browse the repository at this point in the history
Doc: fix typos and add a CI check to spot them
  • Loading branch information
rouault authored Sep 16, 2024
2 parents 49ebcf5 + 615b184 commit 1e2c773
Show file tree
Hide file tree
Showing 17 changed files with 1,021 additions and 379 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/doc_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Docs

on:
push:
branches-ignore:
- 'backport**'
- 'dependabot**'
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
docs:
name: Documentation checks

runs-on: ubuntu-latest
strategy:
fail-fast: true
container: ghcr.io/osgeo/proj-docs

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Print versions
shell: bash -l {0}
run: |
python3 --version
sphinx-build --version
python3 -m pip list --not-required --format=columns
- name: Lint .rst files
shell: bash -l {0}
run: |
set -eu
if find . -name '*.rst' | xargs grep -P '\t'; then echo 'Tabs are bad, please use four spaces in .rst files.'; false; fi
if find . -name '*.rst' | xargs grep "\.\.versionadded"; then echo 'Wrong annotation. Should be .. versionadded'; false; fi
if find . -name '*.rst' | xargs grep "\.\.note"; then echo 'Wrong annotation. Should be .. note'; false; fi
if find . -name '*.rst' | xargs grep "\.\.warning"; then echo 'Wrong annotation. Should be .. warning'; false; fi
if find . -name '*.rst' | xargs grep "\.\.codeblock"; then echo 'Wrong annotation. Should be .. codeblock'; false; fi
working-directory: ./docs
- name: Doxygen
shell: bash -l {0}
run: |
make .doxygen_up_to_date
working-directory: ./docs
- name: Spelling
shell: bash -l {0}
run: |
make spelling SPHINXOPTS=-W
working-directory: ./docs
4 changes: 2 additions & 2 deletions docs/source/apps/proj.rst
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ The output will appear as:
.. code-block:: console
#Lambert Conformal Conic
# Conic, Sph&Ell
# lat_1= and lat_2= or lat_0, k_0=
# Conic, Sph&Ell
# lat_1= and lat_2= or lat_0, k_0=
# +proj=lcc +lat_0=35.3333333333333 +lon_0=-119 +lat_1=37.25 +lat_2=36
# +x_0=2000000 +y_0=500000 +ellps=GRS80
#Final Earth figure: ellipsoid
Expand Down
2 changes: 1 addition & 1 deletion docs/source/community/rfc/rfc-3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ This RFC comes with a set of guidelines for handling dependencies for PROJ in
the future. Up until now dependencies hasn't been handled consistently, with
some dependencies not being approved formally by the projects governing body.
Therefore minimum versions of PROJ dependencies is proposed so that at the
acception of this RFC PROJ will have the following external requirements:
approval of this RFC PROJ will have the following external requirements:

* C99 (was C89)
* C++11 (already approved in :ref:`RFC2 <rfc2>`)
Expand Down
7 changes: 7 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,3 +278,10 @@
# Tell Jinja2 templates the build is running on Read the Docs
if os.environ.get("READTHEDOCS", "") == "True":
html_context["READTHEDOCS"] = True

# -- Spelling --------------------------------------------------

# Avoid running git
spelling_ignore_contributor_names = False

spelling_word_list_filename = ["spelling_wordlist.txt"]
26 changes: 13 additions & 13 deletions docs/source/news.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Updates

* Database: add constraint for unicity of CRS and operation names (`#4071 <https://github.com/OSGeo/PROJ/issues/4071>`_)

* Make a few more functions that accept a ``PJ*`` to actually acccept a ``const PJ*`` (`#4074 <https://github.com/OSGeo/PROJ/issues/4074>`_)
* Make a few more functions that accept a ``PJ*`` to actually accept a ``const PJ*`` (`#4074 <https://github.com/OSGeo/PROJ/issues/4074>`_)

* Database: Increase consistency in trigger checks (`#4080 <https://github.com/OSGeo/PROJ/issues/4080>`_)

Expand Down Expand Up @@ -136,7 +136,7 @@ Updates

* ``+proj=gridshift``: enhance to support grids referenced in projected CRS, and with easting_offset/northing_offset corrections (`#4038 <https://github.com/OSGeo/PROJ/issues/4038>`_)

* Tune concatenated operation instanciation, reference CR2005 geoid for Czechia and add (disabled by default) records for Czechia S-JTSK/05 based transformations (`#4044 <https://github.com/OSGeo/PROJ/issues/4044>`_)
* Tune concatenated operation instantiation, reference CR2005 geoid for Czechia and add (disabled by default) records for Czechia S-JTSK/05 based transformations (`#4044 <https://github.com/OSGeo/PROJ/issues/4044>`_)

* Database: update to EPSG v11.004 (`#4062 <https://github.com/OSGeo/PROJ/issues/4062>`_)

Expand Down Expand Up @@ -293,7 +293,7 @@ Bug fixes

* ESRI WKT: improve roundtrip of name and definition for UPS WGS84 CRS (`#3720 <https://github.com/OSGeo/PROJ/issues/3720>`_)

* CRS instanciation from PROJ.4 string: set 'Unknown based on XXXX ellipsoid' datum name when instanciating from known +a, +rf (`#3727 <https://github.com/OSGeo/PROJ/issues/3727>`_)
* CRS instantiation from PROJ.4 string: set 'Unknown based on XXXX ellipsoid' datum name when instantiating from known +a, +rf (`#3727 <https://github.com/OSGeo/PROJ/issues/3727>`_)

* :program:`cs2cs` / ``proj_create_crs_to_crs()``: fix regression with geocentric CRS (`#3729 <https://github.com/OSGeo/PROJ/issues/3729>`_)

Expand Down Expand Up @@ -329,14 +329,14 @@ Updates
* Added option ``ONLY_BEST=YES`` (`#3535 <https://github.com/OSGeo/PROJ/issues/3535>`_)

When enabled only use the best possible transformation between two CRS's can be
instantiated. If the best possible transfomations can't be instantiated it will
instantiated. If the best possible transformations can't be instantiated it will
fail instead of opting for the next best transformation.

With ``ONLY_BEST=YES`` a transformation will fail if a needed grid is unavailable.

The option can be toggled in ``proj.ini`` and with ``--only-best`` in :program:`cs2cs`.

* Implement 'Similarity transformation' (EPSG:9621) and import related tranformations from EPSG (`#3578 <https://github.com/OSGeo/PROJ/issues/3578>`_)
* Implement 'Similarity transformation' (EPSG:9621) and import related transformations from EPSG (`#3578 <https://github.com/OSGeo/PROJ/issues/3578>`_)

* Optimise transformations between GDA94, GDA2020 and WGS84 (`#3621 <https://github.com/OSGeo/PROJ/issues/3621>`_)

Expand Down Expand Up @@ -437,7 +437,7 @@ Bug fixes

* ProjectedCRS::identify(): Relax trust in id/authority in definition to identify (`#3532 <https://github.com/OSGeo/PROJ/issues/3532>`_)

* Fix instantion of http://www.opengis.net/def/crs/IAU/2015/xxx URNs (`#3569 <https://github.com/OSGeo/PROJ/issues/3569>`_)
* Fix instantiation of http://www.opengis.net/def/crs/IAU/2015/xxx URNs (`#3569 <https://github.com/OSGeo/PROJ/issues/3569>`_)

* Fix :c:func:`proj_normalize_for_visualization()` on a transformation with ``FORCE_OVERb=YES`` (`#3570 <https://github.com/OSGeo/PROJ/issues/3570>`_)

Expand Down Expand Up @@ -578,7 +578,7 @@ Updates

* Make it possible to determine which grid files were actually used during a transformation (`#3180 <https://github.com/OSGeo/PROJ/issues/3180>`_)

* Transformation: no longer do vertical trasnformation when doing compound CRS to 2D CRS / add --3d to cs2cs (`#3119 <https://github.com/OSGeo/PROJ/issues/3119>`_)
* Transformation: no longer do vertical transformation when doing compound CRS to 2D CRS / add --3d to cs2cs (`#3119 <https://github.com/OSGeo/PROJ/issues/3119>`_)

* Deprecate PROJ4 CMake name (`#3094 <https://github.com/OSGeo/PROJ/issues/3094>`_)

Expand Down Expand Up @@ -922,7 +922,7 @@ Bug Fixes
* ortho: remove useless and invalid log trace (`#2777 <https://github.com/OSGeo/PROJ/issues/2777>`_)

* CMake: remove external nlohmann_json from INTERFACE_LINK_LIBRARIES target (`#2781 <https://github.com/OSGeo/PROJ/issues/2781>`_)
* reateOperations(): fix SourceTargetCRSExtentUse::NONE mode (`#2783 <https://github.com/OSGeo/PROJ/issues/2783>`_)
* createOperations(): fix SourceTargetCRSExtentUse::NONE mode (`#2783 <https://github.com/OSGeo/PROJ/issues/2783>`_)

* GeoTIFF grid reading: perf improvements (`#2788 <https://github.com/OSGeo/PROJ/issues/2788>`_)

Expand Down Expand Up @@ -1271,7 +1271,7 @@ Bug fixes

* Avoid core dumps when copying contexts in certain scenarios (`#2324 <https://github.com/OSGeo/PROJ/issues/2324>`_)

* :c:func:`proj_trans()`: reset errno before attemptying a retry with a new
* :c:func:`proj_trans()`: reset errno before attempting a retry with a new
coordinate operation (`#2353 <https://github.com/OSGeo/PROJ/issues/2353>`_)

* PROJJSON schema corrected to allow prime meridians values with
Expand Down Expand Up @@ -1318,7 +1318,7 @@ Bug fixes

* Helmert 2D: do not require a useless +convention= parameter (`#2305 <https://github.com/OSGeo/PROJ/issues/2305>`_)

* Fix a few spelling errors ("vgridshit" vs. "vgridshift") (`#2307 <https://github.com/OSGeo/PROJ/issues/2307>`_)
* Fix a few spelling errors related to "vgridshift" (`#2307 <https://github.com/OSGeo/PROJ/issues/2307>`_)

* Fix ability to identify EPSG:2154 as a candidate for 'RGF93_Lambert_93' (`#2316 <https://github.com/OSGeo/PROJ/issues/2316>`_)

Expand Down Expand Up @@ -1668,7 +1668,7 @@ Updates
WKT2_2018 to WKT2_2019 to reflect the proper name of the standard (`#1585 <https://github.com/OSGeo/PROJ/issues/1585>`_)

* Improvements in transformations from/to WGS 84 (Gxxxx) realizations and
vertical <--> geog transormations (`#1608 <https://github.com/OSGeo/PROJ/issues/1608>`_)
vertical <--> geog transformations (`#1608 <https://github.com/OSGeo/PROJ/issues/1608>`_)

* Update to version 1.50 of the geodesic library (`#1629 <https://github.com/OSGeo/PROJ/issues/1629>`_)

Expand Down Expand Up @@ -2085,7 +2085,7 @@ transformation capabilities to a more complete library supporting coordinate
transformations and coordinate reference systems.

As a foundation for other enhancements, PROJ now includes a C++ implementation
of the modelisation propopsed by the ISO-19111:2019 standard / OGC Abstract
of the modelisation proposed by the ISO-19111:2019 standard / OGC Abstract
Specification Topic 2: "Referencing By Coordinates", for geodetic reference
frames (datums), coordinate reference systems and coordinate operations.
Construction and query of those geodetic objects is available through a new C++
Expand All @@ -2105,7 +2105,7 @@ IOGP EPSG dataset (v9.6.0 release), the IGNF (French national mapping agency)
geodetic registry and the ESRI projection engine database. PROJ is now the
reference software in the "OSGeo C stack" for this CRS and coordinate operation
database, whereas previously this functionality was spread over PROJ, GDAL and
libgeotiff, and used CSV or other adhoc text-based formats.
libgeotiff, and used CSV or other ad hoc text-based formats.

Late-binding coordinate operation capabilities, that takes metadata such as
area of use and accuracy into account, has been added. This can avoid in a
Expand Down
2 changes: 1 addition & 1 deletion docs/source/operations/projections/mod_krovak.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Modified Krovak

proj-string: ``+proj=mod_krovak``

Modified Krovak builts upon traditional :ref:`krovak`, with corrective terms that
Modified Krovak builds upon traditional :ref:`krovak`, with corrective terms that
are better suited when using it with the S-JTSK/05 datum. This method is specific
to the Czech Republic. Due to the corrective terms, this projection method is
no longer strictly conformal.
Expand Down
10 changes: 5 additions & 5 deletions docs/source/operations/projections/omerc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ projections are limiting forms of the Oblique Mercator
::

$ echo 12 55 | proj +proj=merc +ellps=GRS80
1335833.89 7326837.71
1335833.89 7326837.71

$ echo 12 55 | proj +proj=omerc +alpha=90 +ellps=GRS80
1335833.89 7326837.71
1335833.89 7326837.71

$ echo 12 55 | proj +proj=omerc +alpha=0 +R=6400000
766869.97 6209742.96
Expand Down Expand Up @@ -199,11 +199,11 @@ Note for the two-point method no rectification is done,
::

echo 0 0|proj -I +proj=omerc +R=6400000 +lonc=-87 +lat_0=42 +alpha=0
87dW 42dN
87dW 42dN
echo 0 0|proj -I +proj=omerc +R=6400000 +lonc=-87 +lat_0=42 +alpha=0 +no_rot
87dW 0dS
87dW 0dS
echo 0 0|proj -I +proj=omerc +R=6400000 +lon_1=-87 +lat_1=42 +lon_2=-87 +lat_2=43
87dW 0dN
87dW 0dN

Thus, just as was noted above regarding +no_rot, the two-point method
itself is also probably only marginally useful.
Loading

0 comments on commit 1e2c773

Please sign in to comment.