Skip to content

Commit

Permalink
Add a scripts/fix_typos.sh script and correct reported errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Dec 12, 2016
1 parent e47afa4 commit ab7e98b
Show file tree
Hide file tree
Showing 45 changed files with 131 additions and 76 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ if(PROJ4_TESTS)
endif(PROJ4_TESTS)
include(Proj4Test)

# Put the libaries and binaries that get built into directories at the
# Put the libraries and binaries that get built into directories at the
# top of the build tree rather than in hard-to-find leaf
# directories. This simplifies manual testing and the use of the build
# tree rather than installed Boost libraries.
Expand Down
22 changes: 11 additions & 11 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@

* src/cs2cs.c: Support -I when there is no +to projection.

* src/PJ_ob_tran.c: Propogate ctx into sub-projection (#225).
* src/PJ_ob_tran.c: Propagate ctx into sub-projection (#225).

2013-10-03 Frank Warmerdam <[email protected]>

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

* src/geodesic.{c,h}: sync relative to GeographicLib 1.31. (#216)

* src/pj_fileapi.c, etc: Implement a virtual file api accessable
* src/pj_fileapi.c, etc: Implement a virtual file api accessible
through the context for init file and grid shift file access.

* src/mk_cheby.c: reformat, add braces to avoid warnings.
Expand Down Expand Up @@ -415,7 +415,7 @@

2012-02-08 Frank Warmerdam <[email protected]>

* src/pj_apply_gridshift.c: Ensure that one amoung many points
* src/pj_apply_gridshift.c: Ensure that one among many points
falling outside the grid areas will not cause the remainder to not
be datum shifted in a way that is hard to diagnose. (#45)

Expand Down Expand Up @@ -564,7 +564,7 @@

2011-01-11 Frank Warmerdam <[email protected]>

* src/PJ_goode.c: fix propogation of es and ctx to sub-projections.
* src/PJ_goode.c: fix propagation of es and ctx to sub-projections.

2010-10-19 Frank Warmerdam <[email protected]>

Expand Down Expand Up @@ -739,7 +739,7 @@
* src/PJ_gstmerc.c: Correction of a bug in inv() function :
the projected origin coordinates where descaled.

* nad/testIGNF: Add a comment on the mandatory existance of the world grid
* nad/testIGNF: Add a comment on the mandatory existence of the world grid
in order to make the test.

* ChangeLog: this comments
Expand Down Expand Up @@ -934,7 +934,7 @@
* src/projects.h: Ensure that WIN32 is defined on win32 systems.

* src/pj_open_lib.c: support drive letter prefixes on absolute
paths. Support either \ or / as a dir delimeter on windows (bug 1499)
paths. Support either \ or / as a dir delimiter on windows (bug 1499)

2007-03-07 Frank Warmerdam <[email protected]>

Expand Down Expand Up @@ -1067,7 +1067,7 @@ Rel. 4.5.0 2006-04-21

2006-01-12 Frank Warmerdam <[email protected]>

* geocent.c: Make global variables static. Amoung other things
* geocent.c: Make global variables static. Among other things
this avoids conflicts for apps that link in geotrans.

2005-12-04 Frank Warmerdam <[email protected]>
Expand Down Expand Up @@ -1466,7 +1466,7 @@ Rel. 4.4.4 2001/09/15

See http://bugzilla.remotesensing.org/show_bug.cgi?id=17

* nad/epsg: commited new updates with fixed units for us state plane
* nad/epsg: committed new updates with fixed units for us state plane
zones in feet, as reported by Marc-Andre.

2001-08-23 Frank Warmerdam <[email protected]>
Expand Down Expand Up @@ -1707,7 +1707,7 @@ Rel. 4.3.2 94/10/30 Base-line
Thanks to: Alejo Hausner ([email protected])

95/9/10
Some minor file/internal name changes to facilitate xport to primative
Some minor file/internal name changes to facilitate xport to primitive
systems. Documented entries unchanged.

Rel. 4.3.1 94/2/16 Base-line
Expand Down Expand Up @@ -1794,7 +1794,7 @@ Rel. 4.2.2 93/9/30 Base-line
DOS distribution.

93/11/28
Added "Final" figure line to begining of -V option ouput. Allows
Added "Final" figure line to beginning of -V option output. Allows
user to see results of +ellps and +R_V, etc. arguments. "Feature,"
not an error. Mod to proj.c.

Expand Down Expand Up @@ -1893,7 +1893,7 @@ Rel. 4.1.3 93/4/15 Base-line
93/8/19
Minor general corrections.
Added nadcon conversion procedures and nad2nad program.
Projects.h modified to reflect nadcon prototypes and stuctures.
Projects.h modified to reflect nadcon prototypes and structures.
pj_open_lib extracted from pj_init and made global for use in nad_init.

93/8/25
Expand Down
2 changes: 1 addition & 1 deletion docs/plot/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def meridian(lon, lat_min, lat_max):

def parallel(lat, lon_min, lon_max):
'''
Calculate parallell coordinates.
Calculate parallel coordinates.
'''
coords = np.zeros((N_POINTS, 2))
coords[:, 0] = np.linspace(lon_min, lon_max, N_POINTS)
Expand Down
2 changes: 1 addition & 1 deletion docs/source/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ default numeric locale by setting the LC_NUMERIC environment variable to C.
.. note::

NOTE: Per ticket #49, in PROJ 4.7.0 and later pj_init() operates with locale
overriden to "C" to avoid most locale specific processing for applications
overridden to "C" to avoid most locale specific processing for applications
using the API. Command line tools may still have issues.

Changing Ellipsoid / Why can't I convert from WGS84 to Google Earth / Virtual Globe Mercator?
Expand Down
4 changes: 2 additions & 2 deletions docs/source/geodesic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Thaddeus Vincenty's method, April 1975

For a very good procedure to calculate inter point distances see:

http://www.ngs.noaa.gov/PC_PROD/Inv_Fwd/ (Fortan code, DOS executables, and an online app)
http://www.ngs.noaa.gov/PC_PROD/Inv_Fwd/ (Fortran code, DOS executables, and an online app)

and algorithm details published in: `Vincenty, T. (1975) <http://www.ngs.noaa.gov/PUBS_LIB/inverse.pdf>`__

Expand Down Expand Up @@ -142,7 +142,7 @@ PROJ.4 - geod program


The PROJ.4 [wiki:man_geod geod] program can be used for great circle distances
on an ellipsoid. As of proj verion 4.9.0, this uses a translation of
on an ellipsoid. As of proj version 4.9.0, this uses a translation of
GeographicLib::Geodesic (see below) into C. The underlying geodesic
calculation API is exposed as part of the PROJ.4 library (via the geodesic.h
header). Prior to version 4.9.0, the algorithm documented here was used:
Expand Down
4 changes: 2 additions & 2 deletions docs/source/projections/merc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ For the elliptical form of the projection we introduce the scaling factor:
k_0 = m\left( \phi_ts \right)
where :math:`m\left(\phi\right)` is the parallel radius at lattitude :math:`\phi`.
where :math:`m\left(\phi\right)` is the parallel radius at latitude :math:`\phi`.

We also use the Isometric Latitude kernel function :math:`t()`.

.. note::
m() and t() should be described properly on a seperate page about the theory of projections on the ellipsoid.
m() and t() should be described properly on a separate page about the theory of projections on the ellipsoid.

Forward projection
==================
Expand Down
2 changes: 1 addition & 1 deletion html/man_geod.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ <H2>DESCRIPTION</H2>
documentation for full list of these parameters and contrl.
The options are processed in left to right order
from the run line.
Reentry of an option is ignored with the first occurance assumed to
Reentry of an option is ignored with the first occurrence assumed to
be the desired value.
<P>

Expand Down
2 changes: 1 addition & 1 deletion jniwrap/README
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ The documentation is held inside the code and can be retrieved by running
doxygen inside the folder jniwrap. This will create the HTML format
documentation inside of jniwrap/docs

The standard way to achive this is to use an Ant target:
The standard way to achieve this is to use an Ant target:

ant do_make_help

Expand Down
4 changes: 2 additions & 2 deletions jniwrap/doxygen.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ HTML_FILE_EXTENSION = .html
# standard header. Note that when using a custom header you are responsible
# for the proper inclusion of any scripts and style sheets that doxygen
# needs, which is dependent on the configuration options used.
# It is adviced to generate a default header using "doxygen -w html
# It is advised to generate a default header using "doxygen -w html
# header.html footer.html stylesheet.css YourConfigFile" and then modify
# that header. Note that the header is subject to change so you typically
# have to redo this when upgrading to a newer version of doxygen or when changing the value of configuration settings such as GENERATE_TREEVIEW!
Expand Down Expand Up @@ -1108,7 +1108,7 @@ EXT_LINKS_IN_WINDOW = NO

FORMULA_FONTSIZE = 10

# Use the FORMULA_TRANPARENT tag to determine whether or not the images
# Use the FORMULA_TRANSPARENT tag to determine whether or not the images
# generated for formulas are transparent PNGs. Transparent PNGs are
# not supported properly for IE 6.0, but are supported on all modern browsers.
# Note that when changing this option you need to delete any form_*.png files
Expand Down
4 changes: 2 additions & 2 deletions jniwrap/org/proj4/PJ.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* Proj.4 library. This class is the only place where such native methods are defined.
* <p>
* In the Proj.4 library, the {@code PJ} structure aggregates in a single place information usually
* splitted in many different ISO 19111 interfaces: {@link org.opengis.referencing.datum.Ellipsoid},
* split in many different ISO 19111 interfaces: {@link org.opengis.referencing.datum.Ellipsoid},
* {@link org.opengis.referencing.datum.Datum}, {@link org.opengis.referencing.datum.PrimeMeridian},
* {@link org.opengis.referencing.cs.CoordinateSystem}, {@link org.opengis.referencing.crs.CoordinateReferenceSystem}
* and their sub-interfaces. The relationship with the GeoAPI methods is indicated in the
Expand Down Expand Up @@ -285,7 +285,7 @@ public native void transform(PJ target, int dimension, double[] coordinates, int
/**
* Deallocates the native PJ data structure. This method can be invoked only by the garbage
* collector, and must be invoked exactly once (no more, no less).
* <strong>NEVER INVOKE THIS METHOD EXPLICITELY, NEVER OVERRIDE</strong>.
* <strong>NEVER INVOKE THIS METHOD EXPLICITLY, NEVER OVERRIDE</strong>.
*/
@Override
protected final native void finalize();
Expand Down
2 changes: 1 addition & 1 deletion man/man1/nad2nad.1
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ stpaul \- St. Paul Is, Alaska
stlrnc \- St. Lawrence Is, Alaska
.TP
.B \-E
Input coordinates are echoed to output before ouput values.
Input coordinates are echoed to output before output values.
.RE
.TP
.BI \-f " format"
Expand Down
2 changes: 1 addition & 1 deletion nad/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# files containing dictionnary of useful projection
# files containing dictionary of useful projection
#

set(PROJ_DICTIONARY epsg
Expand Down
2 changes: 1 addition & 1 deletion nad/README
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pj_out27 --- Comparison files for above test procedures.
pj_out83

The following NADCON conversion files are distributed in separate,
uncompressed distibution file(s).
uncompressed distribution file(s).

Ascii source (in delta format) of grid data to convert geographic
coordinates from NAD27 to NAD83
Expand Down
2 changes: 1 addition & 1 deletion nad/other.extra
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## NAD83 / BC Albers (this has been superceeded but is kept for compatibility)
## NAD83 / BC Albers (this has been superseded but is kept for compatibility)
<42102> +proj=aea +ellps=GRS80 +lat_0=45 +lon_0=-126.0 +lat_1=50.0 +lat_2=58.5 +x_0=1000000.0 +y_0=0 +datum=NAD83 +units=m no_defs <>


Expand Down
2 changes: 1 addition & 1 deletion nad/test27
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ echo "diff ${OUT} with pj_out27.dist"
diff -b ${OUT} ${NAD_DIR}/pj_out27.dist
if [ $? -ne 0 ] ; then
echo ""
echo "PROBLEMS HAVE OCCURED"
echo "PROBLEMS HAVE OCCURRED"
echo "test file ${OUT} saved"
echo
exit 100
Expand Down
2 changes: 1 addition & 1 deletion nad/test83
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ echo "diff ${OUT} with pj_out83.dist"
diff -b ${OUT} ${NAD_DIR}/pj_out83.dist
if [ $? -ne 0 ] ; then
echo ""
echo "PROBLEMS HAVE OCCURED"
echo "PROBLEMS HAVE OCCURRED"
echo "test file ${OUT} saved"
echo
exit 100
Expand Down
2 changes: 1 addition & 1 deletion nad/testIGNF
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ echo "diff ${OUT} with ${OUT}.dist"
diff -b ${OUT} ${NAD_DIR}/${OUT}.dist
if [ $? -ne 0 ] ; then
echo ""
echo "PROBLEMS HAVE OCCURED"
echo "PROBLEMS HAVE OCCURRED"
echo "test file ${OUT} saved"
echo
exit 100
Expand Down
2 changes: 1 addition & 1 deletion nad/testdatumfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ echo "diff ${OUT} with ${OUT}.dist"
diff -b ${OUT} ${NAD_DIR}/${OUT}.dist
if [ $? -ne 0 ] ; then
echo ""
echo "PROBLEMS HAVE OCCURED"
echo "PROBLEMS HAVE OCCURRED"
echo "test file ${OUT} saved"
echo
exit 100
Expand Down
2 changes: 1 addition & 1 deletion nad/testflaky
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ echo "diff ${OUT} with ${OUT}.dist"
diff -b ${OUT} ${NAD_DIR}/${OUT}.dist
if [ $? -ne 0 ] ; then
echo ""
echo "PROBLEMS HAVE OCCURED"
echo "PROBLEMS HAVE OCCURRED"
echo "test file ${OUT} saved"
echo
exit 100
Expand Down
2 changes: 1 addition & 1 deletion nad/testntv2
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ echo "diff ${OUT} with ${OUT}.dist"
diff -b ${OUT} ${NAD_DIR}/${OUT}.dist
if [ $? -ne 0 ] ; then
echo ""
echo "PROBLEMS HAVE OCCURED"
echo "PROBLEMS HAVE OCCURRED"
echo "test file ${OUT} saved"
echo
exit 100
Expand Down
2 changes: 1 addition & 1 deletion nad/testvarious
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ echo "diff ${OUT} with ${OUT}.dist"
diff -b ${OUT} ${NAD_DIR}/${OUT}.dist
if [ $? -ne 0 ] ; then
echo ""
echo "PROBLEMS HAVE OCCURED"
echo "PROBLEMS HAVE OCCURRED"
echo "test file ${OUT} saved"
echo
exit 100
Expand Down
8 changes: 4 additions & 4 deletions nad/world
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
proj=tmerc ellps=mod_airy lat_0=53d30'N lon_0=8W
x_0=200000 y_0=250000 k_0=1.000035
no_defs <>
<neiez> # Netherlands East Indies Equitorial Zone
<neiez> # Netherlands East Indies Equatorial Zone
proj=merc ellps=bessel lon_0=110E
x_0=3900000 y_0=900000 k_0=0.997
no_defs <>
Expand Down Expand Up @@ -176,12 +176,12 @@
no_defs <>
# Gauss Krueger Grid for Germany
#
# The first figure of the easting is lon_0 devided by 3
# The first figure of the easting is lon_0 divided by 3
# ( 2 for 6d0E, 3 for 9d0E, 4 for 12d0E)
# For translations you have to remove this first figure
# and convert northings and eastings from km to meter .
# The other way round, devide by 1000 and add the figure.
# I made 3 entrys for the officially used grids in Germany
# The other way round, divide by 1000 and add the figure.
# I made 3 entries for the officially used grids in Germany
#
#
# Und nochmal in deutsch :
Expand Down
54 changes: 54 additions & 0 deletions scripts/fix_typos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/sh
# -*- coding: utf-8 -*-
###############################################################################
# $Id$
#
# Project: GDAL
# Purpose: (Interactive) script to identify and fix typos
# Author: Even Rouault <even.rouault at spatialys.com>
#
###############################################################################
# Copyright (c) 2016, Even Rouault <even.rouault at spatialys.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
###############################################################################

if ! test -d fix_typos; then
# Get our fork of codespell that adds --words-white-list and full filename support for -S option
mkdir fix_typos
cd fix_typos
git clone https://github.com/rouault/codespell
cd codespell
git checkout gdal_improvements
cd ..
# Aggregate base dictionary + QGIS one + Debian Lintian one
curl https://raw.githubusercontent.com/qgis/QGIS/master/scripts/spelling.dat | sed "s/:/->/" | grep -v "colour->" | grep -v "colours->" > qgis.txt
curl https://anonscm.debian.org/cgit/lintian/lintian.git/plain/data/spelling/corrections| grep "||" | grep -v "#" | sed "s/||/->/" > debian.txt
cat codespell/data/dictionary.txt qgis.txt debian.txt | awk 'NF' > gdal_dict.txt
echo "difered->deferred" >> gdal_dict.txt
echo "differed->deferred" >> gdal_dict.txt
cd ..
fi

EXCLUDED_FILES="*configure,config.status,config.sub,*/autom4te.cache/*,libtool,aclocal.m4,depcomp,ltmain.sh,*.pdf,./m4/*,./nad/epsg,./fix_typos/*"
WORDS_WHITE_LIST="metres,als,lsat,twon,ang"

python3 fix_typos/codespell/codespell.py -w -i 3 -q 2 -S $EXCLUDED_FILES \
-x scripts/typos_whitelist.txt --words-white-list=$WORDS_WHITE_LIST \
-D fix_typos/gdal_dict.txt .
1 change: 1 addition & 0 deletions scripts/typos_whitelist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

2 changes: 1 addition & 1 deletion src/PJ_aitoff.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static LP s_inverse (XY xy, PJ *P) { /* Spheroidal, inverse */

if ((fabs(xy.x) < EPSILON) && (fabs(xy.y) < EPSILON )) { lp.phi = 0.; lp.lam = 0.; return lp; }

/* intial values for Newton-Raphson method */
/* initial values for Newton-Raphson method */
lp.phi = xy.y; lp.lam = xy.x;
do {
iter = 0;
Expand Down
Loading

0 comments on commit ab7e98b

Please sign in to comment.