# GDAL License Attribution

This project includes code ported from the GDAL (Geospatial Data Abstraction Library) project, specifically from the OGR library.

## GDAL License

GDAL is licensed under the MIT/X11 license. The following license text applies to the GDAL code portions used in this project:

```
Copyright (c) 2000, Frank Warmerdam
Copyright (c) 2008-2014, Even Rouault <even.rouault at spatialys.com>
Copyright (c) 2015, Faza Mahamood
Copyright (c) 2016, Ari Jolma
Copyright (c) 2017, Ari Jolma
Copyright (c) 2018, Ari Jolma
Copyright (c) 2019, Ari Jolma
Copyright (c) 2020, Ari Jolma
Copyright (c) 2021, Ari Jolma
Copyright (c) 2022, Ari Jolma
Copyright (c) 2023, Ari Jolma
Copyright (c) 2024, Ari Jolma

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.
```

## Ported Code

The following files contain code ported from GDAL:

- `src/great-circle.ts` - Dateline handling logic ported from `gdal/ogr/ogrgeometryfactory.cpp`

## Original Source

- **GDAL Repository**: https://github.com/OSGeo/gdal
- **Specific File**: `gdal/ogr/ogrgeometryfactory.cpp`
- **Commit Reference**: 7bfb9c452a59aac958bff0c8386b891edf8154ca
- **GDAL Website**: https://gdal.org/

## Modifications

The ported code has been adapted from C++ to TypeScript and integrated into the arc.js library's great circle calculation functionality. The core dateline handling algorithm remains functionally equivalent to the original GDAL implementation.
