From 5de7d79d93e009cf6e52f0006ef8bcbd00d3cf56 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Thu, 2 Nov 2023 07:14:30 +0900 Subject: Add PROJ bug 1654 References: https://github.com/OSGeo/PROJ/issues/1654 --- proj/1654.gie | 23 +++++++++++++++++++++++ proj/default.nix | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 proj/1654.gie create mode 100644 proj/default.nix (limited to 'proj') diff --git a/proj/1654.gie b/proj/1654.gie new file mode 100644 index 0000000..10964f1 --- /dev/null +++ b/proj/1654.gie @@ -0,0 +1,23 @@ + +# Test oblique aeqd with point very close lon_0, lat_0, on a perfect sphere +operation +proj=aeqd +a=6371008.771415 +b=6371008.771415 +lat_0=30.2345 +lon_0=-120.2345 +tolerance 1 mm +accept -120.234501 30.234501 +expect -0.096 0.111 +roundtrip 1 + +accept -120.2345 30.2345 +expect 0.000 0.000 +roundtrip 1 + +# Same on an ellipsoid very close to the sphere +operation +proj=aeqd +a=6371008.771415 +b=6371008.771414 +lat_0=30.2345 +lon_0=-120.2345 +tolerance 1 mm +accept -120.234501 30.234501 +expect -0.096 0.111 +roundtrip 1 + +accept -120.2345 30.2345 +expect 0.000 0.000 +roundtrip 1 + diff --git a/proj/default.nix b/proj/default.nix new file mode 100644 index 0000000..96b8470 --- /dev/null +++ b/proj/default.nix @@ -0,0 +1,35 @@ +# Recipe for building PROJ at specific snapshot +# +# SPDX-FileCopyrightText: 2007 Marc Weber +# SPDX-FileCopyrightText: 2019 Jonathan Ringer +# SPDX-License-Identifier: MIT +# +# SPDX-FileCopyrightText: 2023 Nguyễn Gia Phong +# SPDX-License-Identifier: AGPL-3.0-or-later + +{ lib, stdenv, version, fetchFromGitHub, commit, hash +, autoreconfHook, binRenameHook, pkg-config, sqlite }: + +stdenv.mkDerivation rec { + name = "proj"; + inherit version; + + src = fetchFromGitHub { + owner = "OSGeo"; + repo = "PROJ"; + rev = commit; + inherit hash; + }; + + nativeBuildInputs = [ autoreconfHook binRenameHook pkg-config ]; + buildInputs = [ sqlite ]; + enableParallelBuilding = true; + outputs = [ "out" "dev" ]; + + meta = with lib; { + description = "Cartographic Projections Library"; + homepage = "https://proj.org"; + license = licenses.mit; + platforms = platforms.all; + }; +} -- cgit 1.4.1