PostGIS Licensing
==================

This file attempts to include all licenses that apply within the PostGIS
source tree, in particular any that are supposed to be exposed to the end
user for credit requirements for instance.

PostGIS General
----------------

In general PostGIS may be distributed and/or modified under the conditions
of the GNU General Public License, either version 2 or (at your option) any
later version. Please refer to the COPYING file for details.

PostGIS has dependencies on other libraries which are not under GPL and
that are commonly distributed with PostGIS core libraries.  In general
these are dynamically linked libraries.  Libraries are as follows:

Proj4 - http://proj.osgeo.org -- X/MIT License
GEOS - http://geos.osgeo.org -- LGPL License
LibXML - http://xmlsoft.org/ -- X/MIT License
GDAL - http://gdal.osgeo.org/ -- X/MIT Style License

Source files included with PostGIS not under GPL
------------------------------------------------

-- The following loader/dumper files are derivative works or direct ports
of ShapeLib which is under an X/MIT License: loader/dbfopen, safileio.*,
shapefil.h, shpopen.c (copyrighted by Frank Warmerdam and Even Rouault).

-- loader/getopt.* are under AT&T public domain (Copyright (c) 1984, 1985 AT&T).

-- Doc/xsl files
These are under a BSD Style license

-- liblwgeom/lookup3.c is released under Public Domain by Bob Jenkins, May 2006.

-- deps/ryu (see LICENSE in folder) is released under the Apache 2.0 license;
alternatively, in can be used under the Boost 1.0 license. Copyrighted by Ulf
Adams and contributors.

-- deps/uthash (see LICENSE in folder) is released under a simplified BSD
license. Copyright (c) 2005-2018, Troy D. Hanson.

-- deps/wagyu (see LICENSE.README in folder) includes code released under the
ISC license (copyrighted by Mapbox) and the Boost Software License (copyrighted
by Angus Johnson and Mapbox). Copyright for "almost_equal.hpp" file is held by
Google Inc and its license is listed at the top of that file.

The documentation for PostGIS is under a creative commons share-alike
3.0 license.  http://creativecommons.org/licenses/by-sa/3.0/

Data used in documentation falls in one of the following categories
- Many of the examples in the topology and tiger geocoder section utilize
  data from US Census Tiger data 2010
  http://www.census.gov/geo/www/tiger/tgrshp2010/tgrshp2010.html
- data or snapshots generated by community
- many images autogenerated by PostGIS documentation generator (which
  utilizes ImageMagick) as described
  http://trac.osgeo.org/postgis/wiki/DevWikiDocNewFeature
- PostGIS raster output functions such as the ST_AsPNG etc.
- raster/vector data from MassGIS: http://www.mass.gov/mgis/laylist.htm

License notice for ryu
-------------------------------------------------------------------------------
All the C code is copyrighted by Ulf Adams and contributors, and may be used freely 
in accordance with the Apache 2.0 license. Alternatively, it may be used freely in 
accordance with the Boost 1.0 license.

License notice for uthash
-------------------------------------------------------------------------------

Copyright (c) 2005-2018, Troy D. Hanson    http://troydhanson.github.com/uthash/
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

License notice for geometry
-------------------------------------------------------------------------------
Copyright (c) 2016, Mapbox

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

License notice for wagyu
-------------------------------------------------------------------------------
Parts of the code in the Wagyu Library are derived from the version of the 
Clipper Library by Angus Johnson listed below.

Author    :  Angus Johnson
Version   :  6.4.0
Date      :  2 July 2015
Website   :  http://www.angusj.com

Copyright for portions of the derived code in the Wagyu library are held 
by Angus Johnson, 2010-2015. All other copyright for the Wagyu Library are held by 
Mapbox, 2016. This code is published in accordance with, and retains the same license
as the Clipper Library by Angus Johnson.

Copyright (c) 2010-2015, Angus Johnson
Copyright (c) 2016, Mapbox

Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:

The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.

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, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
