about summary refs log tree commit diff
path: root/proj
diff options
context:
space:
mode:
Diffstat (limited to 'proj')
-rw-r--r--proj/1654.gie23
-rw-r--r--proj/default.nix35
2 files changed, 58 insertions, 0 deletions
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 @@
+<gie>
+# 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
+</gie>
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;
+  };
+}