aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--HOWTO-RELEASE1
-rw-r--r--docs/Makefile216
-rw-r--r--docs/images/healpix.pngbin0 -> 108768 bytes
-rw-r--r--docs/images/rhealpix.pngbin0 -> 99935 bytes
-rw-r--r--docs/source/_templates/layout.html20
-rw-r--r--docs/source/conf.py352
-rw-r--r--docs/source/download.rst22
-rw-r--r--docs/source/faq.rst327
-rw-r--r--docs/source/geodesic.rst212
-rw-r--r--docs/source/grids.rst167
-rw-r--r--docs/source/htpd.rst136
-rw-r--r--docs/source/index.rst45
-rw-r--r--docs/source/license.rst46
14 files changed, 1546 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index efea77f0..ad74f230 100644
--- a/.gitignore
+++ b/.gitignore
@@ -85,3 +85,5 @@ cmake/project-config*.cmake
/src/cs2cs
/src/multistresstest
/src/test228
+
+/docs/build
diff --git a/HOWTO-RELEASE b/HOWTO-RELEASE
index bc763f4f..d9b2f693 100644
--- a/HOWTO-RELEASE
+++ b/HOWTO-RELEASE
@@ -4,6 +4,7 @@
1) Update the version number in configure.in (in AC_INIT()).
1a) Update the version number in PROJ_BUILD_VERSION in CMakeLists.txt
+ 1b) Update the version number in doc/source/conf.py
2) Update the version number in proj_api.h (#define PJ_VERSION).
diff --git a/docs/Makefile b/docs/Makefile
new file mode 100644
index 00000000..4bd082c8
--- /dev/null
+++ b/docs/Makefile
@@ -0,0 +1,216 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = sphinx-build
+PAPER =
+BUILDDIR = build
+
+# User-friendly check for sphinx-build
+ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
+$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
+endif
+
+# Internal variables.
+PAPEROPT_a4 = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
+
+.PHONY: help
+help:
+ @echo "Please use \`make <target>' where <target> is one of"
+ @echo " html to make standalone HTML files"
+ @echo " dirhtml to make HTML files named index.html in directories"
+ @echo " singlehtml to make a single large HTML file"
+ @echo " pickle to make pickle files"
+ @echo " json to make JSON files"
+ @echo " htmlhelp to make HTML files and a HTML help project"
+ @echo " qthelp to make HTML files and a qthelp project"
+ @echo " applehelp to make an Apple Help Book"
+ @echo " devhelp to make HTML files and a Devhelp project"
+ @echo " epub to make an epub"
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+ @echo " latexpdf to make LaTeX files and run them through pdflatex"
+ @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
+ @echo " text to make text files"
+ @echo " man to make manual pages"
+ @echo " texinfo to make Texinfo files"
+ @echo " info to make Texinfo files and run them through makeinfo"
+ @echo " gettext to make PO message catalogs"
+ @echo " changes to make an overview of all changed/added/deprecated items"
+ @echo " xml to make Docutils-native XML files"
+ @echo " pseudoxml to make pseudoxml-XML files for display purposes"
+ @echo " linkcheck to check all external links for integrity"
+ @echo " doctest to run all doctests embedded in the documentation (if enabled)"
+ @echo " coverage to run coverage check of the documentation (if enabled)"
+
+.PHONY: clean
+clean:
+ rm -rf $(BUILDDIR)/*
+
+.PHONY: html
+html:
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+.PHONY: dirhtml
+dirhtml:
+ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+.PHONY: singlehtml
+singlehtml:
+ $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+ @echo
+ @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+.PHONY: pickle
+pickle:
+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+ @echo
+ @echo "Build finished; now you can process the pickle files."
+
+.PHONY: json
+json:
+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+ @echo
+ @echo "Build finished; now you can process the JSON files."
+
+.PHONY: htmlhelp
+htmlhelp:
+ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+ @echo
+ @echo "Build finished; now you can run HTML Help Workshop with the" \
+ ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+.PHONY: qthelp
+qthelp:
+ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+ @echo
+ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
+ ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+ @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/proj4.qhcp"
+ @echo "To view the help file:"
+ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/proj4.qhc"
+
+.PHONY: applehelp
+applehelp:
+ $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
+ @echo
+ @echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
+ @echo "N.B. You won't be able to view it unless you put it in" \
+ "~/Library/Documentation/Help or install it in your application" \
+ "bundle."
+
+.PHONY: devhelp
+devhelp:
+ $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+ @echo
+ @echo "Build finished."
+ @echo "To view the help file:"
+ @echo "# mkdir -p $$HOME/.local/share/devhelp/proj4"
+ @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/proj4"
+ @echo "# devhelp"
+
+.PHONY: epub
+epub:
+ $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+ @echo
+ @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+.PHONY: latex
+latex:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo
+ @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+ @echo "Run \`make' in that directory to run these through (pdf)latex" \
+ "(use \`make latexpdf' here to do that automatically)."
+
+.PHONY: latexpdf
+latexpdf:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo "Running LaTeX files through pdflatex..."
+ $(MAKE) -C $(BUILDDIR)/latex all-pdf
+ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+.PHONY: latexpdfja
+latexpdfja:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo "Running LaTeX files through platex and dvipdfmx..."
+ $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
+ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+.PHONY: text
+text:
+ $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+ @echo
+ @echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+.PHONY: man
+man:
+ $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+ @echo
+ @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+.PHONY: texinfo
+texinfo:
+ $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+ @echo
+ @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
+ @echo "Run \`make' in that directory to run these through makeinfo" \
+ "(use \`make info' here to do that automatically)."
+
+.PHONY: info
+info:
+ $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+ @echo "Running Texinfo files through makeinfo..."
+ make -C $(BUILDDIR)/texinfo info
+ @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
+
+.PHONY: gettext
+gettext:
+ $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
+ @echo
+ @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
+
+.PHONY: changes
+changes:
+ $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+ @echo
+ @echo "The overview file is in $(BUILDDIR)/changes."
+
+.PHONY: linkcheck
+linkcheck:
+ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+ @echo
+ @echo "Link check complete; look for any errors in the above output " \
+ "or in $(BUILDDIR)/linkcheck/output.txt."
+
+.PHONY: doctest
+doctest:
+ $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+ @echo "Testing of doctests in the sources finished, look at the " \
+ "results in $(BUILDDIR)/doctest/output.txt."
+
+.PHONY: coverage
+coverage:
+ $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
+ @echo "Testing of coverage in the sources finished, look at the " \
+ "results in $(BUILDDIR)/coverage/python.txt."
+
+.PHONY: xml
+xml:
+ $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
+ @echo
+ @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
+
+.PHONY: pseudoxml
+pseudoxml:
+ $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
+ @echo
+ @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
diff --git a/docs/images/healpix.png b/docs/images/healpix.png
new file mode 100644
index 00000000..0f448469
--- /dev/null
+++ b/docs/images/healpix.png
Binary files differ
diff --git a/docs/images/rhealpix.png b/docs/images/rhealpix.png
new file mode 100644
index 00000000..497b364e
--- /dev/null
+++ b/docs/images/rhealpix.png
Binary files differ
diff --git a/docs/source/_templates/layout.html b/docs/source/_templates/layout.html
new file mode 100644
index 00000000..df00789a
--- /dev/null
+++ b/docs/source/_templates/layout.html
@@ -0,0 +1,20 @@
+{# Import the theme's layout. #}
+{% extends "!layout.html" %}
+
+{# Add some extra stuff before and use existing with 'super()' call. #}
+
+{%- block footer %}
+ <div class="footer">
+ <div class="container">
+ &copy; {{ copyright }}
+ Gerald Evenden,
+ <a href="https://github.com/warmerdam">Frank Warmerdam</a>,
+ and
+ <a href="https://github.com/OSGeo/proj.4/graphs/contributors">others</a>,
+ {%- if last_updated %}
+ {% trans last_updated=last_updated|e %}Last updated
+ on {{ last_updated }}.{% endtrans %}
+ {%- endif %}
+ </div>
+ </div>
+{%- endblock %}
diff --git a/docs/source/conf.py b/docs/source/conf.py
new file mode 100644
index 00000000..aae0c729
--- /dev/null
+++ b/docs/source/conf.py
@@ -0,0 +1,352 @@
+# -*- coding: utf-8 -*-
+#
+# proj.4 documentation build configuration file, created by
+# sphinx-quickstart on Wed Feb 24 10:47:15 2016.
+#
+# This file is execfile()d with the current directory set to its
+# containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys
+import os
+import sphinx_bootstrap_theme
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration ------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = [
+ 'sphinx.ext.mathjax',
+]
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix(es) of source filenames.
+# You can specify multiple suffix as a list of string:
+# source_suffix = ['.rst', '.md']
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'proj.4'
+copyright = u'1992-2016, Gerald Evenden, Frank Warmerdam, and others'
+author = u'Gerald Evenden'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = u'4.9.3'
+# The full version, including alpha/beta/rc tags.
+release = u'4.9.3'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#
+# This is also used if you do content translation via gettext catalogs.
+# Usually you set "language" from the command line for these cases.
+language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = []
+
+# The reST default role (used for this markup: `text`) to use for all
+# documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+# If true, keep warnings as "system message" paragraphs in the built documents.
+#keep_warnings = False
+
+# If true, `todo` and `todoList` produce output, else they produce nothing.
+todo_include_todos = False
+
+
+# -- Options for HTML output ----------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+html_theme = 'bootstrap'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further. For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+html_theme_options = {
+ # Navigation bar title. (Default: ``project`` value)
+ 'navbar_title': "",
+
+ # Tab name for entire site. (Default: "Site")
+ 'navbar_site_name': "Docs",
+
+ # A list of tuples containing pages or urls to link to.
+ # Valid tuples should be in the following forms:
+ # (name, page) # a link to a page
+ # (name, "/aa/bb", 1) # a link to an arbitrary relative url
+ # (name, "http://example.com", True) # arbitrary absolute url
+ # Note the "1" or "True" value above as the third argument to indicate
+ # an arbitrary url.
+ 'navbar_links': [
+ ("Download", "download"),
+ ("GitHub", "https://github.com/OSGeo/proj.4", True),
+ ],
+
+ # Render the next and previous page links in navbar. (Default: true)
+ 'navbar_sidebarrel': True,
+
+ # Render the current pages TOC in the navbar. (Default: true)
+ 'navbar_pagenav': True,
+
+ # Tab name for the current pages TOC. (Default: "Page")
+ 'navbar_pagenav_name': "Here",
+
+ # Global TOC depth for "site" navbar tab. (Default: 1)
+ # Switching to -1 shows all levels.
+ 'globaltoc_depth': 2,
+
+ # Include hidden TOCs in Site navbar?
+ #
+ # Note: If this is "false", you cannot have mixed ``:hidden:`` and
+ # non-hidden ``toctree`` directives in the same page, or else the build
+ # will break.
+ #
+ # Values: "true" (default) or "false"
+ 'globaltoc_includehidden': "true",
+
+ # HTML navbar class (Default: "navbar") to attach to <div> element.
+ # For black navbar, do "navbar navbar-inverse"
+ 'navbar_class': "navbar",
+
+ # Fix navigation bar to top of page?
+ # Values: "true" (default) or "false"
+ 'navbar_fixed_top': "true",
+
+ # Location of link to source.
+ # Options are "nav" (default), "footer" or anything else to exclude.
+ 'source_link_position': "nav",
+
+ # Bootswatch (http://bootswatch.com/) theme.
+ #
+ # Options are nothing (default) or the name of a valid theme
+ # such as "amelia" or "cosmo".
+ 'bootswatch_theme': "paper",
+
+ # Choose Bootstrap version.
+ # Values: "3" (default) or "2" (in quotes)
+ 'bootstrap_version': "3",
+}
+
+
+# Add any paths that contain custom themes here, relative to this directory.
+html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
+
+
+# The name for this set of Sphinx documents. If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar. Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# Add any extra paths that contain custom files (such as robots.txt or
+# .htaccess) here, relative to this directory. These files are copied
+# directly to the root of the documentation.
+#html_extra_path = []
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+html_show_sourcelink = False
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it. The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Language to be used for generating the HTML full-text search index.
+# Sphinx supports the following languages:
+# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
+# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
+#html_search_language = 'en'
+
+# A dictionary with options for the search language support, empty by default.
+# Now only 'ja' uses this config value
+#html_search_options = {'type': 'default'}
+
+# The name of a javascript file (relative to the configuration directory) that
+# implements a search results scorer. If empty, the default will be used.
+#html_search_scorer = 'scorer.js'
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'proj4doc'
+
+# -- Options for LaTeX output ---------------------------------------------
+
+latex_elements = {
+# The paper size ('letterpaper' or 'a4paper').
+#'papersize': 'letterpaper',
+
+# The font size ('10pt', '11pt' or '12pt').
+#'pointsize': '10pt',
+
+# Additional stuff for the LaTeX preamble.
+#'preamble': '',
+
+# Latex figure (float) alignment
+#'figure_align': 'htbp',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+# author, documentclass [howto, manual, or own class]).
+latex_documents = [
+ (master_doc, 'proj4.tex', u'proj.4 Documentation',
+ u'Gerald Evenden', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output ---------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+ (master_doc, 'proj4', u'proj.4 Documentation',
+ [author], 1)
+]
+
+# If true, show URL addresses after external links.
+#man_show_urls = False
+
+
+# -- Options for Texinfo output -------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+# dir menu entry, description, category)
+texinfo_documents = [
+ (master_doc, 'proj4', u'proj.4 Documentation',
+ author, 'proj4', 'One line description of project.',
+ 'Miscellaneous'),
+]
+
+# Documents to append as an appendix to all manuals.
+#texinfo_appendices = []
+
+# If false, no module index is generated.
+#texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+#texinfo_show_urls = 'footnote'
+
+# If true, do not generate a @detailmenu in the "Top" node's menu.
+#texinfo_no_detailmenu = False
diff --git a/docs/source/download.rst b/docs/source/download.rst
new file mode 100644
index 00000000..69878748
--- /dev/null
+++ b/docs/source/download.rst
@@ -0,0 +1,22 @@
+.. _download:
+
+================================================================================
+Download
+================================================================================
+
+
+Current Release
+--------------------------------------------------------------------------------
+
+* **2015-09-13** `proj-4.9.2.tar.gz`_ `Release Notes`_ (`md5`_)
+
+Past Releases
+--------------------------------------------------------------------------------
+
+* **2015-03-04** `proj-4.9.1.tar.gz`_
+
+
+.. _`proj-4.9.1.tar.gz`: http://download.osgeo.org/proj/proj-4.9.1.tar.gz
+.. _`proj-4.9.2.tar.gz`: http://download.osgeo.org/proj/proj-4.9.2.tar.gz
+.. _`md5`: http://download.osgeo.org/proj/proj-4.9.2.tar.gz.md5
+.. _`Release Notes`: http://lists.maptools.org/pipermail/proj/2015-September/007270.html
diff --git a/docs/source/faq.rst b/docs/source/faq.rst
new file mode 100644
index 00000000..a289494c
--- /dev/null
+++ b/docs/source/faq.rst
@@ -0,0 +1,327 @@
+.. _faq:
+
+******************************************************************************
+FAQ
+******************************************************************************
+
+
+Where can I find the list of projections and their arguments?
+--------------------------------------------------------------------------------
+
+There is no simple single location to find all the required information. The
+!PostScript/PDF documents listed on the [http://trac.osgeo.org/proj/wiki main]
+PROJ.4 page under documentation are the authoritative source but projections
+and options are spread over several documents in a form more related to their
+order of implementation than anything else.
+
+The '''proj''' command itself can report the list of projections using the
+'''-lp''' option, the list of ellipsoids with the '''-le''' option, the list of
+units with the '''-lu''' option, and the list of built-in datums with the
+'''-ld''' option.
+
+The [http://www.remotesensing.org/geotiff/proj_list/ GeoTIFF Projections Pages]
+include most of the common PROJ.4 projections, and a definition of the
+projection specific options for each.
+
+* How do I do datum shifts between NAD27 and NAD83?
+
+While the '''nad2nad''' program can be used in some cases, the '''cs2cs''' is
+now the preferred mechanism. The following example demonstrates using the
+default shift parameters for NAD27 to NAD83:
+
+
+::
+
+ % cs2cs +proj=latlong +datum=NAD27 +to +proj=latlong +datum=NAD83 -117 30
+
+
+producing:
+
+::
+
+ 117d0'2.901"W 30d0'0.407"N 0.000
+
+In order for datum shifting to work properly the various grid shift files must
+be available. See below. More details are available in the
+[wiki:GenParms#nadgrids-GridBasedDatumAdjustments General Parameters] document.
+
+How do I build/configure PROJ.4 to support datum shifting?
+--------------------------------------------------------------------------------
+
+After downloading and unpacking the PROJ.4 source, also download and unpack the
+set of datum shift files. See :ref:`download` for instructions how to fetch
+and install these files
+
+On Windows the extra nadshift target must be used. For instance
+``nmake /f makefile.vc nadshift`` in the ``proj/src`` directory.
+
+A default build and install on Unix will normally build knowledge of the
+directory where the grid shift files are installed into the PROJ.4 library
+(usually /usr/local/share/proj). On Windows the library is normally built
+thinking that C:\PROJ\NAD is the installed directory for the grid shift files.
+If the built in concept of the PROJ.4 data directory is incorrect, the ``PROJ_LIB``
+environment can be defined with the correct directory.
+
+How do I debug problems with NAD27/NAD83 datum shifting?
+--------------------------------------------------------------------------------
+
+1. Verify that you have the binary files (eg. /usr/local/share/proj/conus)
+ installed on your system. If not, see the previous question.
+2. Try a datum shifting operation in relative isolation, such as with the cs2cs
+ command listed above. Do you get reasonable results? If not it is likely
+ the grid shift files aren't being found. Perhaps you need to define
+ PROJ_LIB?
+3. The cs2cs command and the underlying pj_transform() API know how to do a
+ grid shift as part of a more complex coordinate transformation; however, it
+ is imperative that both the source and destination coordinate system be
+ defined with appropriate datum information. That means that implicitly or
+ explicitly there must be a +datum= clause, a +nadgrids= clause or a
+ +towgs84= clause. For instance
+ ``cs2cs +proj=latlong +datum=NAD27 +to +proj=latlong +ellps=WGS84`` won't work because defining the output
+ coordinate system as using the ellipse WGS84 isn't the same as defining it
+ to use the datum WGS84 (use +datum=WGS84). If either the input or output
+ are not identified as having a datum, the datum shifting (and ellipsoid
+ change) step is just quietly skipped!
+4. The ``PROJ_DEBUG`` environment can be defined (any value) to force extra output
+ from the PROJ.4 library to stderr (the text console normally) with
+ information on what data files are being opened and in some cases why a
+ transformation fails.
+
+ ::
+
+ export PROJ_DEBUG=ON
+ cs2cs ...
+
+
+ .. note::
+ ``PROJ_DEBUG`` support is not yet very mature in the PROJ.4 library.
+
+5. The ``-v`` flag to cs2cs can be useful in establishing more detail on what
+ parameters being used internally for a coordinate system. This will include
+ expanding the definition of +datum clause.
+
+How do I use EPSG coordinate system codes with PROJ.4?
+--------------------------------------------------------------------------------
+
+There is somewhat imperfect translation between 2d geographic and projected
+coordinate system codes and PROJ.4 descriptions of the coordinate system
+available in the epsg definition file that normally lives in the proj/nad
+directory. If installed (it is installed by default on Unix), it is possible
+to use EPSG numbers like this:
+
+::
+
+
+ % cs2cs -v +init=epsg:26711
+ # ---- From Coordinate System ----
+ #Universal Transverse Mercator (UTM)
+ # Cyl, Sph
+ # zone= south
+ # +init=epsg:26711 +proj=utm +zone=11 +ellps=clrk66 +datum=NAD27 +units=m
+ # +no_defs +nadgrids=conus,ntv1_can.dat
+ #--- following specified but NOT used
+ # +ellps=clrk66
+ # ---- To Coordinate System ----
+ #Lat/long (Geodetic)
+ #
+ # +proj=latlong +datum=NAD27 +ellps=clrk66 +nadgrids=conus,ntv1_can.dat
+
+The proj/nad/epsg file can be browsed and searched in a text editor for
+coordinate systems. There are known to be problems with some coordinate
+systems, and any coordinate systems with odd axes, a non-greenwich prime
+meridian or other quirkyness are unlikely to work properly. Caveat Emptor!
+
+How do I use 3 parameter and 7 parameter datum shifting
+--------------------------------------------------------------------------------
+
+Datum shifts can be approximated with 3 and 7 parameter transformations. Their
+use is more fully described in the
+[wiki:GenParms#towgs84-DatumtransformationtoWGS84 towgs84] parameter
+discussion.
+
+Does PROJ.4 work in different international numeric locales?
+--------------------------------------------------------------------------------
+
+No. PROJ.4 makes extensive use of sprintf() and atof() internally to translate
+numeric values. If a locale is in effect that modifies formatting of numbers,
+altering the role of commas and periods in numbers, then PROJ.4 will not work.
+This problem is common in some European locales.
+
+On unix-like platforms, this problem can be avoided by forcing the use of the
+default numeric locale by setting the LC_NUMERIC environment variable to C.
+
+::
+
+ $ export LC_NUMERIC=C
+ $ proj ...
+
+.. 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
+ 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?
+----------------------------------------------------------------------------------------------
+
+The coordinate system definition for Google Earth, and Virtual Globe Mercator
+is as follows, which uses a sphere as the earth model for the Mercator
+projection.
+
+::
+
+ +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0
+ +x_0=0.0 +y_0=0 +k=1.0 +units=m +no_defs
+
+But, if you do something like:
+
+::
+
+ cs2cs +proj=latlong +datum=WGS84
+ +to +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0
+ +x_0=0.0 +y_0=0 +k=1.0 +units=m +no_defs
+
+to convert between WGS84 and mercator on the sphere there will be substantial
+shifts in the Y mercator coordinates. This is because internally cs2cs is
+having to adjust the lat/long coordinates from being on the sphere to being on
+the WGS84 datum which has a quite differently shaped ellipsoid.
+
+In this case, and many other cases using spherical projections, the desired
+approach is to actually treat the lat/long locations on the sphere as if they
+were on WGS84 without any adjustments when using them for converting to other
+coordinate systems. The solution is to "trick" PROJ.4 into applying no change
+to the lat/long values when going to (and through) WGS84. This can be
+accomplished by asking PROJ to use a null grid shift file for switching from
+your spherical lat/long coordinates to WGS84.
+
+::
+
+ cs2cs +proj=latlong +datum=WGS84 \
+ +to +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 \
+ +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs
+
+Note the strategic addition of +nadgrids=@null to the spherical projection
+definition.
+
+Similar issues apply with many other datasets distributed with projections
+based on a spherical earth model - such as many NASA datasets. This coordinate
+system is now known by the EPSG code 3857 and has in the past been known as
+EPSG:3785 and EPSG:900913. When using this coordinate system with GDAL/OGR it
+is helpful to include the +wktext so the exact proj.4 string will be preserved
+in the WKT representation (otherwise key parameters like `+nadgrids=@null` will
+be dropped):
+
+::
+
+ +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0
+ +units=m +nadgrids=@null +wktext +no_defs
+
+Why do I get different results with 4.5.0 and 4.6.0?
+--------------------------------------------------------------------------------
+
+The default datum application behavior changed with the 4.6.0 release. PROJ.4
+will now only apply a datum shift if both the source and destination coordinate
+system have valid datum shift information.
+
+From the PROJ.4 4.6.0 Release Notes (in NEWS):
+ * MAJOR: Rework pj_transform() to avoid applying ellipsoid to ellipsoid
+ transformations as a datum shift when no datum info is available.
+
+
+How do I calculate distances/directions on the surface of the earth?
+--------------------------------------------------------------------------------
+
+These are called geodesic calculations. There is a page about it here:
+[wiki:GeodesicCalculations]
+
+What is the HEALPix projection and how can I use it?
+--------------------------------------------------------------------------------
+
+.. figure::
+ ../images/rhealpix.png
+ :scale: 40%
+ :align: left
+
+The HEALPix projection is area preserving and can be used with a
+spherical and ellipsoidal model. It was initially developed for mapping cosmic
+background microwave radiation. The image below is the graphical
+representation of the mapping and consists of eight isomorphic triangular
+interrupted map graticules. The north and south contains four in which
+straight meridians converge polewards to a point and unequally spaced
+horizontal parallels. HEALPix provides a mapping in which points of equal
+latitude and equally spaced longitude are mapped to points of equal latitude
+and equally spaced longitude with the module of the polar interruptions. ||
+
+To run a forward HEALPix projection on a unit sphere model, use the following command:
+
+::
+
+ proj +proj=healpix +lon_0=0 +a=1 -E <<EOF
+ 0 0
+ EOF
+
+Output of the above command.
+
+::
+
+ 0 0 0.00 0.00
+
+What is the rHEALPix projection and how can I use it?
+--------------------------------------------------------------------------------
+
+.. figure::
+ ../images/healpix.png
+ :scale: 40%
+ :align: left
+
+rHEALPix is a projection based on the HEALPix projection. The implementation
+of rHEALPix uses the HEALPix projection. The rHEALPix combines the peaks of
+the HEALPix into a square. The square's position can be translated and rotated
+across the x-axis which is a noval approach for the rHEALPix projection. The
+initial intention of using rHEALPix in the Spatial Computation Engine Science
+Collaboration Environment (SCENZGrid).
+
+To run a inverse rHEALPix projection on a WGS84 ellipsoidal model, use the following command:
+
+::
+
+ proj +proj=rhealpix -f '%.2f' -I +lon_0=0 +a=1 +ellps=WGS84 +npole=0 +spole=0 -E <<EOF
+ 0 0.7853981633974483
+ EOF
+
+Where spole and npole are integers from the range of 0 to 3 inclusive and represent the positions of the north polar and south polar squares.
+
+Output of above command:
+
+::
+
+ 0 0.7853981633974483 0.00 41.94
+
+What options does proj.4 allow for the shape of the Earth (geodesy)?
+--------------------------------------------------------------------------------
+
+See https://github.com/OSGeo/proj.4/blob/master/src/pj_ellps.c
+for possible ellipse options. For example, putting ``+ellps=WGS84`` uses
+the ``WGS84`` Earth shape.
+
+What if I want a spherical Earth?
+--------------------------------------------------------------------------------
+
+Use ``+ellps=sphere``. See https://github.com/OSGeo/proj.4/blob/master/src/pj_ellps.c
+for the radius used in this case.
+
+How do I change the radius of the Earth? How do I use proj.4 for work on Mars?
+--------------------------------------------------------------------------------
+
+You can supply explicit values for the semi minor and semi major axes instead
+of using the symbolic "sphere" value. Eg, if the radius were 2000000m:
+
+::
+
+ +proj=laea +lon_0=-40.000000 +lat_0=74.000000 +x_0=1000000 +y_0=1700000 +a=2000000 +b=2000000"
+
+How do I do False Eastings and False Northings?
+--------------------------------------------------------------------------------
+
+Use ``+x_0`` and ``+y_0`` in the projection string.
+
diff --git a/docs/source/geodesic.rst b/docs/source/geodesic.rst
new file mode 100644
index 00000000..474cfdc1
--- /dev/null
+++ b/docs/source/geodesic.rst
@@ -0,0 +1,212 @@
+.. _geodesic:
+
+================================================================================
+Geodesic Calculations
+================================================================================
+
+Geodesic Calculations
+--------------------------------------------------------------------------------
+
+Geodesic calculations are calculations along lines (great circle) on the
+surface of the earth. They can answer questions like:
+
+ * What is the distance between these two points?
+ * If I travel X meters from point A at bearing phi, where will I be. They are
+ done in native lat-long coordinates, rather than in projected coordinates.
+
+Relevant mailing list threads
+................................................................................
+
+ * http://thread.gmane.org/gmane.comp.gis.proj-4.devel/3361
+ * http://thread.gmane.org/gmane.comp.gis.proj-4.devel/3375
+ * http://thread.gmane.org/gmane.comp.gis.proj-4.devel/3435
+ * http://thread.gmane.org/gmane.comp.gis.proj-4.devel/3588
+ * http://thread.gmane.org/gmane.comp.gis.proj-4.devel/3925
+ * http://thread.gmane.org/gmane.comp.gis.proj-4.devel/4047
+ * http://thread.gmane.org/gmane.comp.gis.proj-4.devel/4083
+
+Terminology
+--------------------------------------------------------------------------------
+
+The shortest distance on the surface of a solid is generally termed a geodesic,
+be it an ellipsoid of revolution, aposphere, etc. On a sphere, the geodesic is
+termed a Great Circle.
+
+HOWEVER, when computing the distance between two points using a projected
+coordinate system, that is a conformal projection such as Transverse Mercator,
+Oblique Mercator, Normal Mercator, Stereographic, or Lambert Conformal Conic -
+that then is a GRID distance which can be converted to an equivalent GEODETIC
+distance using the function for "Scale Factor at a Point." The conversion is
+then termed "Grid Distance to Geodetic Distance," even though it will not be as
+exactly correct as a true ellipsoidal geodesic. Closer to the truth with a TM
+than with a Lambert or other conformal projection, but still not exactly "on."
+
+
+So, it can be termed "geodetic distance" or a "geodesic distance," depending
+on just how you got there ...
+
+
+The Math
+--------------------------------------------------------------------------------
+
+Spherical Approximation
+................................................................................
+
+The simplest way to compute geodesics is using a sphere as an approximation for
+the earth. This from Mikael Rittri on the Proj mailing list:
+
+ If 1 percent accuracy is enough, I think you can use spherical formulas
+ with a fixed Earth radius. You can find good formulas in the Aviation
+ Formulary of Ed Williams, http://williams.best.vwh.net/avform.htm.
+
+ For the fixed Earth radius, I would choose the average of the:
+
+ c = radius of curvature at the poles,
+ b^2^ / a = radius of curvature in a meridian plane at the equator,
+
+ since these are the extreme values for the local radius of curvature of the
+ earth ellipsoid.
+
+ If your coordinates are given in WGS84, then
+
+ c = 6 399 593.626 m,
+ b^2^ / a = 6 335 439.327 m,
+
+ (see http://home.online.no/~sigurdhu/WGS84_Eng.html) so their average is 6,367,516.477 m.
+ The maximal error for distance calculation should then be less than 0.51 percent.
+
+ When computing the azimuth between two points by the spherical formulas, I
+ think the maximal error on WGS84 will be 0.2 degrees, at least if the
+ points are not too far away (less than 1000 km apart, say). The error
+ should be maximal near the equator, for azimuths near northeast etc.
+
+I am not sure about the spherical errors for the forward geodetic problem:
+point positioning given initial point, distance and azimuth.
+
+Ellipsoidal Approximation
+................................................................................
+
+For more accuracy, the earth can be approximated with an ellipsoid,
+complicating the math somewhat. See the wikipedia page, `Geodesics on an
+ellipsoid <https://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid>`__, for
+more information.
+
+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)
+
+and algorithm details published in: `Vincenty, T. (1975) <http://www.ngs.noaa.gov/PUBS_LIB/inverse.pdf>`__
+
+Javascript code
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Chris Veness has coded Vincenty's formulas as !JavaScript.
+
+distance: http://www.movable-type.co.uk/scripts/latlong-vincenty.html
+
+direct: http://www.movable-type.co.uk/scripts/latlong-vincenty-direct.html
+
+C code
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+From Gerald Evenden: a library of the converted NGS Vincenty geodesic procedure
+and an application program, 'geodesic'. In the case of a spherical earth
+Snyder's preferred equations are used.
+
+* http://article.gmane.org/gmane.comp.gis.proj-4.devel/3588/
+
+The link in this message is broken. The correct URL is
+http://home.comcast.net/~gevenden56/proj/
+
+Earlier Mr. Evenden had posted to the PROJ.4 mailing list this code for
+determination of true distance and respective forward and back azimuths between
+two points on the ellipsoid. Good for any pair of points that are not
+antipodal.
+Later he posted that this was not in fact the translation of NGS FORTRAN code,
+but something else. But, for what it's worth, here is the posted code (source
+unknown):
+
+* http://article.gmane.org/gmane.comp.gis.proj-4.devel/3478
+
+
+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
+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:
+`
+Paul D. Thomas, 1970
+Spheroidal Geodesics, Reference Systems, and Local Geometry"
+U.S. Naval Oceanographic Office, p. 162
+Engineering Library 526.3 T36s
+
+http://handle.dtic.mil/100.2/AD0703541
+
+GeographicLib::Geodesic
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Charles Karney has written a C++ class to do geodesic calculations and a
+utility GeodSolve to call it. See
+
+* http://geographiclib.sourceforge.net/geod.html
+
+An online version of GeodSolve is available at
+
+* http://geographiclib.sourceforge.net/cgi-bin/GeodSolve
+
+This is an attempt to do geodesic calculations "right", i.e.,
+
+* accurate to round-off (i.e., about 15 nm);
+* inverse solution always succeeds (even for near anti-podal points);
+* reasonably fast (comparable in speed to Vincenty);
+* differential properties of geodesics are computed (these give the scales of
+ geodesic projections);
+* the area between a geodesic and the equator is computed (allowing the
+ area of geodesic polygons to be found);
+* included also is an implementation in terms of elliptic integrals which
+ can deal with ellipsoids with 0.01 < b/a < 100.
+
+A JavaScript implementation is included, see
+
+* `geo-calc <http://geographiclib.sourceforge.net/scripts/geod-calc.html>`__,
+ a text interface to geodesic calculations;
+* `geod-google <http://geographiclib.sourceforge.net/scripts/geod-google.html>`__,
+ a tool for drawing geodesics on Google Maps.
+
+Implementations in `Python <http://pypi.python.org/pypi/geographiclib>`__,
+`Matlab <http://www.mathworks.com/matlabcentral/fileexchange/39108>`__,
+`C <http://geographiclib.sourceforge.net/html/C/>`__,
+`Fortran <http://geographiclib.sourceforge.net/html/Fortran/>`__ , and
+`Java <http://geographiclib.sourceforge.net/html/java/>`__ are also available.
+
+The algorithms are described in
+ * C. F. F. Karney, `Algorithms for gedesics <http://dx.doi.org/10.1007/s00190-012-0578-z>`__,
+ J. Geodesy '''87'''(1), 43-55 (2013),
+ DOI: `10.1007/s00190-012-0578-z <http://dx.doi.org/10.1007/s00190-012-0578-z>`__; `geo-addenda.html <http://geographiclib.sf.net/geod-addenda.html>`__.
+
+Triaxial Ellipsoid
+................................................................................
+
+A triaxial ellipsoid is a marginally better approximation to the shape of the earth
+than an ellipsoid of revolution.
+The problem of geodesics on a triaxial ellipsoid was solved by Jacobi in 1838.
+For a discussion of this problem see
+* http://geographiclib.sourceforge.net/html/triaxial.html
+* the wikipedia entry: `Geodesics on a triaxial ellipsoid <https://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid#Geodesics_on_a_triaxial_ellipsoid>`__
+
+The History
+--------------------------------------------------------------------------------
+
+The bibliography of papers on the geodesic problem for an ellipsoid is
+available at
+
+* http://geographiclib.sourceforge.net/geodesic-papers/biblio.html
+
+this includes links to online copies of the papers.
diff --git a/docs/source/grids.rst b/docs/source/grids.rst
new file mode 100644
index 00000000..77d4c019
--- /dev/null
+++ b/docs/source/grids.rst
@@ -0,0 +1,167 @@
+.. _grids:
+
+================================================================================
+Grids
+================================================================================
+
+.. contents:: Contents
+ :depth: 3
+ :backlinks: none
+
+
+Grid files are important for shifting and transforming between datums
+
+US, Canadian, French and New Zealand
+--------------------------------------------------------------------------------
+
+* http://download.osgeo.org/proj/proj-datumgrid-1.5.zip: US, Canadian, French
+ and New Zealand datum shift grids - unzip in the `nad` directory before
+ configuring to add NAD27/NAD83 and NZGD49 datum conversion
+
+Switzerland
+--------------------------------------------------------------------------------
+
+Background in ticket [#145](https://github.com/OSGeo/proj.4/issues/145)
+
+We basically have two shift grids available. An official here:
+
+`Swiss CHENyx06 dataset in NTv2 format <http://www.swisstopo.admin.ch/internet/swisstopo/en/home/topics/survey/lv03-lv95/chenyx06/distortion_grids.html>`__
+
+And a derived in a temporary location which is probably going to disappear soon.
+
+Main problem seems to be there's no mention of distributivity of the grid from
+the official website. It just tells: "you can use freely". The "contact" link
+is also broken, but maybe someone could make a phone call to ask for rephrasing
+that.
+
+HARN
+--------------------------------------------------------------------------------
+
+With the support of `i-cubed <http://www.i-cubed.com>`__, Frank Warmerdam has
+written tools to translate the HPGN grids from NOAA/NGS from ``.los/.las`` format
+into NTv2 format for convenient use with PROJ.4. This project included
+implementing a `.los/.las reader <https://github.com/OSGeo/gdal/tree/trunk/gdal/frmts/raw/loslasdataset.cpp>`__
+for GDAL, and an `NTv2 reader/writer <https://github.com/OSGeo/gdal/tree/trunk/gdal/frmts/raw/ntv2dataset.cpp>`__.
+Also, a script to do the bulk translation was implemented in
+https://github.com/OSGeo/gdal/tree/trunk/gdal/swig/python/samples/loslas2ntv2.py.
+The command to do the translation was:
+
+::
+
+ loslas2ntv2.py -auto *hpgn.los
+
+As GDAL uses NAD83/WGS84 as a pivot datum, the sense of the HPGN datum shift offsets were negated to map from HPGN to NAD83 instead of the other way. The files can be used with PROJ.4 like this:
+
+::
+
+ cs2cs +proj=latlong +datum=NAD83
+ +to +proj=latlong +nadgrids=./azhpgn.gsb +ellps=GRS80
+
+::
+
+ # input:
+ -112 34
+
+::
+
+ # output:
+ 111d59'59.996"W 34d0'0.006"N -0.000
+
+This was confirmed against the `NGS HPGN calculator
+<http://www.ngs.noaa.gov/cgi-bin/nadcon2.prl>`__.
+
+The grids are available at http://download.osgeo.org/proj/hpgn_ntv2.zip
+
+.. seealso::
+ :ref:`htpd` describes similar grid shifting
+
+HTDP
+--------------------------------------------------------------------------------
+
+:ref:`htpd` describes the situation with HTDP grids based on NOAA/NGS HTDP Model.
+
+
+Non-Free Grids
+--------------------------------------------------------------------------------
+
+Not all grid shift files have licensing that allows them to be freely
+distributed, but can be obtained by users through free and legal methods.
+
+Canada NTv2.0
+................................................................................
+Although NTv1 grid shifts are provided freely with PROJ.4, the higher-quality
+NTv2.0 file needs to be downloaded from Natural Resources Canada. More info:
+http://www.geod.nrcan.gc.ca/tools-outils/ntv2_e.php.
+
+Procedure:
+
+1. Visit the [NTv2](http://webapp.geod.nrcan.gc.ca/geod/tools-outils/applications.php?locale=en#ntv2), and register/login
+2. Follow the Download NTv2 link near the bottom of the page.
+3. Unzip `ntv2_100325.zip` (or similar), and move the grid shift file `NTV2_0.GSB` to the proj directory (be sure to change the name to lowercase for consistency)
+ * e.g.: `mv NTV2_0.GSB /usr/local/share/proj/ntv2_0.gsb`
+4. Test it using:
+ ::
+
+ cs2cs +proj=latlong +ellps=clrk66 +nadgrids=@ntv2_0.gsb +to +proj=latlong +ellps=GRS80 +datum=NAD83
+ -111 50
+
+ ::
+
+ 111d0'3.006"W 50d0'0.103"N 0.000 # correct answer
+
+Australia
+................................................................................
+
+`Geocentric Datum of Australia AGD66/AGD84 <http://www.icsm.gov.au/gda/tech.html>`__
+
+Canada
+................................................................................
+
+`Canadian NTv2 grid shift binary <http://open.canada.ca/data/en/dataset/b3534942-31ea-59cf-bcc3-f8dc4875081a>`__ for NAD27 <=> NAD83.
+
+Germany
+................................................................................
+
+`German BeTA2007 DHDN GK3 => ETRS89/UTM <http://crs.bkg.bund.de/crseu/crs/descrtrans/BeTA/de_dhdn2etrs_beta.php>`__
+
+Great Britain
+................................................................................
+
+`Great Britain's OSTN02_NTv2: OSGB 1936 => ETRS89 <http://www.ordnancesurvey.co.uk/business-and-government/help-and-support/navigation-technology/os-net/ostn02-ntv2-format.html>`__
+
+Austria
+................................................................................
+
+`Austrian Grid <http://www.bev.gv.at/portal/page?_pageid=713,2204753&_dad=portal&_schema=PORTAL>`__ for MGI
+
+Spain
+................................................................................
+
+`Spanish grids <http://www.ign.es/ign/layoutIn/herramientas.do#DATUM>`__ for ED50.
+
+Portugal
+................................................................................
+
+`Portuguese grids <http://www.fc.up.pt/pessoas/jagoncal/coordenadas/index.htm>`__ for ED50, Lisbon 1890, Lisbon 1937 and Datum 73
+
+Brazil
+................................................................................
+
+`Brazilian grids <http://www.ibge.gov.br/home/geociencias/geodesia/param_transf/default_param_transf.shtm>`__ for datums Corrego Alegre 1961, Corrego Alegre 1970-72, SAD69 and SAD69(96)
+
+South Africa
+................................................................................
+
+`South African grid <http://eepublishers.co.za/article/datum-transformations-using-the-ntv2-grid.html>`__ (Cape to Hartebeesthoek94 or WGS84)
+
+Netherlands
+................................................................................
+
+`Dutch grid <https://www.kadaster.nl/web/Themas/Registraties/Rijksdriehoeksmeting/Transformatie-van-coordinaten.htm) (Registration required before download>`__
+
+Hungary
+................................................................................
+
+`Hungarian grid <https://github.com/OSGeoLabBp/eov2etrs/>`__ ETRS89 - HD72/EOV (epsg:23700), both horizontal and elevation grids
+
+
diff --git a/docs/source/htpd.rst b/docs/source/htpd.rst
new file mode 100644
index 00000000..2209c865
--- /dev/null
+++ b/docs/source/htpd.rst
@@ -0,0 +1,136 @@
+.. _htpd:
+
+================================================================================
+HTPD
+================================================================================
+
+.. contents:: Contents
+ :depth: 2
+ :backlinks: none
+
+This page documents use of the `crs2crs2grid.py` script and the HTDP
+(Horizontal Time Dependent Positioning) grid shift modelling program from
+NGS/NOAA to produce PROJ.4 compatible grid shift files for fine grade
+conversions between various NAD83 epochs and WGS84. Traditionally PROJ.4 has
+treated NAD83 and WGS84 as equivalent and failed to distinguish between
+different epochs or realizations of those datums. At the scales of much
+mapping this is adequate but as interest grows in high resolution imagery and
+other high resolution mapping this is inadequate. Also, as the North American
+crust drifts over time the displacement between NAD83 and WGS84 grows (more
+than one foot over the last two decades).
+
+Getting and building HTDP
+--------------------------------------------------------------------------------
+
+The HTDP modelling program is in written FORTRAN. The source and documentation
+can be found on the HTDP page at http://www.ngs.noaa.gov/TOOLS/Htdp/Htdp.shtml
+
+On linux systems it will be necessary to install `gfortran` or some FORTRAN
+compiler. For ubuntu something like the following should work.
+
+::
+
+ apt-get install gfortran
+
+To compile the program do something like the following to produce the binary "htdp" from the source code.
+
+::
+
+ gfortran htdp.for -o htdp
+
+Getting crs2crs2grid.py
+--------------------------------------------------------------------------------
+
+The `crs2crs2grid.py` script can be found at
+https://github.com/OSGeo/gdal/tree/trunk/gdal/swig/python/samples/crs2crs2grid.py
+
+It depends on having the GDAL Python bindings operational. If they are not
+available you will get an error something like the following:
+
+
+::
+
+ Traceback (most recent call last):
+ File "./crs2crs2grid.py", line 37, in <module>
+ from osgeo import gdal, gdal_array, osr
+ ImportError: No module named osgeo
+
+Usage
+--------------------------------------------------------------------------------
+
+::
+
+ crs2crs2grid.py
+ <src_crs_id> <src_crs_date> <dst_crs_id> <dst_crs_year>
+ [-griddef <ul_lon> <ul_lat> <ll_lon> <ll_lat> <lon_count> <lat_count>]
+ [-htdp <path_to_exe>] [-wrkdir <dirpath>] [-kwf]
+ -o <output_grid_name>
+
+ -griddef: by default the following values for roughly the continental USA
+ at a six minute step size are used:
+ -127 50 -66 25 251 611
+ -kwf: keep working files in the working directory for review.
+
+::
+
+ crs2crs2grid.py 29 2002.0 8 2002.0 -o nad83_2002.ct2
+
+The goal of `crs2crs2grid.py` is to produce a grid shift file for a designated
+region. The region is defined using the `-griddef` switch. When missing a
+continental US region is used. The script creates a set of sample points for
+the grid definition, runs the "htdp" program against it and then parses the
+resulting points and computes a point by point shift to encode into the final
+grid shift file. By default it is assumed the `htdp` program will be in the
+executable path. If not, please provide the path to the executable using the
+`-htdp` switch.
+
+The `htdp` program supports transformations between many CRSes and for each (or
+most?) of them you need to provide a date at which the CRS is fixed. The full
+set of CRS Ids available in the HTDP program are:
+
+::
+
+ 1...NAD_83(2011) (North America tectonic plate fixed)
+ 29...NAD_83(CORS96) (NAD_83(2011) will be used)
+ 30...NAD_83(2007) (NAD_83(2011) will be used)
+ 2...NAD_83(PA11) (Pacific tectonic plate fixed)
+ 31...NAD_83(PACP00) (NAD 83(PA11) will be used)
+ 3...NAD_83(MA11) (Mariana tectonic plate fixed)
+ 32...NAD_83(MARP00) (NAD_83(MA11) will be used)
+
+ 4...WGS_72 16...ITRF92
+ 5...WGS_84(transit) = NAD_83(2011) 17...ITRF93
+ 6...WGS_84(G730) = ITRF92 18...ITRF94 = ITRF96
+ 7...WGS_84(G873) = ITRF96 19...ITRF96
+ 8...WGS_84(G1150) = ITRF2000 20...ITRF97
+ 9...PNEOS_90 = ITRF90 21...IGS97 = ITRF97
+ 10...NEOS_90 = ITRF90 22...ITRF2000
+ 11...SIO/MIT_92 = ITRF91 23...IGS00 = ITRF2000
+ 12...ITRF88 24...IGb00 = ITRF2000
+ 13...ITRF89 25...ITRF2005
+ 14...ITRF90 26...IGS05 = ITRF2005
+ 15...ITRF91 27...ITRF2008
+ 28...IGS08 = ITRF2008
+
+The typical use case is mapping from NAD83 on a particular date to WGS84 on
+some date. In this case the source CRS Id "29" (NAD_83(CORS96)) and the
+destination CRS Id is "8 (WGS_84(G1150)). It is also necessary to select the
+source and destination date (epoch). For example:
+
+::
+
+ crs2crs2grid.py 29 2002.0 8 2002.0 -o nad83_2002.ct2
+
+The output is a CTable2 format grid shift file suitable for use with PROJ.4
+(4.8.0 or newer). It might be utilized something like:
+
+
+::
+
+ cs2cs +proj=latlong +ellps=GRS80 +nadgrids=./nad83_2002.ct2 +to +proj=latlong +datum=WGS84
+
+See Also
+--------------------------------------------------------------------------------
+
+* http://www.ngs.noaa.gov/TOOLS/Htdp/Htdp.shtml - NGS/NOAA page about the HTDP
+ model and program. Source for the HTDP program can be downloaded from here.
diff --git a/docs/source/index.rst b/docs/source/index.rst
new file mode 100644
index 00000000..3d5226c1
--- /dev/null
+++ b/docs/source/index.rst
@@ -0,0 +1,45 @@
+.. _home:
+
+******************************************************************************
+proj.4
+******************************************************************************
+
+
+============= ================================================================
+ Platform Test Status and Coverage
+============= ================================================================
+Travis |travis|
+AppVeyor |appveyor|
+Coverage |coverals|
+============= ================================================================
+
+.. |travis| image:: https://travis-ci.org/OSGeo/proj.4.svg?branch=master
+ :target: https://travis-ci.org/OSGeo/proj.4
+.. |appveyor| image:: https://ci.appveyor.com/api/projects/status/584j49uguwoo5evi?svg=true
+ :target: https://ci.appveyor.com/project/OSGeo/proj-4
+.. |coverals| image:: https://coveralls.io/repos/OSGeo/proj.4/badge.svg?branch=master
+ :target: https://coveralls.io/r/OSGeo/proj.4?branch=master
+
+Documentation
+=================
+
+.. toctree::
+ :maxdepth: 1
+
+ download
+ faq
+ geodesic
+ grids
+ license
+ htpd
+
+
+
+
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`search`
+
diff --git a/docs/source/license.rst b/docs/source/license.rst
new file mode 100644
index 00000000..bd4f633c
--- /dev/null
+++ b/docs/source/license.rst
@@ -0,0 +1,46 @@
+.. _license:
+
+================================================================================
+License
+================================================================================
+
+:Author: Frank Warmerdam
+:Contact: warmerdam@pobox.com
+:Date: 2001
+
+PROJ.4 has been placed under an MIT license. I believe this to be as close as
+possible to public domain while satisfying those who say that a copyright
+notice is required in some countries. The COPYING file read as follows:
+
+All source, data files and other contents of the PROJ.4 package are available
+under the following terms. Note that the PROJ 4.3 and earlier was "public
+domain" as is common with US government work, but apparently this is not a well
+defined legal term in many countries. I am placing everything under the
+following MIT style license because I believe it is effectively the same as
+public domain, allowing anyone to use the code as they wish, including making
+proprietary derivatives.
+
+Though I have put my own name as copyright holder, I don't mean to imply I did
+the work. Essentially all work was done by Gerald Evenden.
+
+::
+
+ Copyright (c) 2000, Frank Warmerdam
+
+ 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.