@cpp.js/package-proj-multithread 2.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,34 @@
1
+
2
+ All source, data files and other contents of the PROJ package are
3
+ available under the following terms. Note that the PROJ 4.3 and earlier
4
+ was "public domain" as is common with US government work, but apparently
5
+ this is not a well defined legal term in many countries. Frank Warmerdam placed
6
+ everything under the following MIT style license because he believed it is
7
+ effectively the same as public domain, allowing anyone to use the code as
8
+ they wish, including making proprietary derivatives.
9
+
10
+ Initial PROJ 4.3 public domain code was put as Frank Warmerdam as copyright
11
+ holder, but he didn't mean to imply he did the work. Essentially all work was
12
+ done by Gerald Evenden.
13
+
14
+ Copyright information can be found in source files.
15
+
16
+ --------------
17
+
18
+ Permission is hereby granted, free of charge, to any person obtaining a
19
+ copy of this software and associated documentation files (the "Software"),
20
+ to deal in the Software without restriction, including without limitation
21
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
22
+ and/or sell copies of the Software, and to permit persons to whom the
23
+ Software is furnished to do so, subject to the following conditions:
24
+
25
+ The above copyright notice and this permission notice shall be included
26
+ in all copies or substantial portions of the Software.
27
+
28
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
29
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
30
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
31
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
33
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
34
+ DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # @cpp.js/package-proj
2
+ **Precompiled proj library built with cpp.js for seamless integration in JavaScript, WebAssembly and React Native projects.**
3
+
4
+ <a href="https://www.npmjs.com/package/@cpp.js/package-proj">
5
+ <img alt="NPM version" src="https://img.shields.io/npm/v/@cpp.js/package-proj?style=for-the-badge" />
6
+ </a>
7
+ <a href="https://github.com/OSGeo/PROJ">
8
+ <img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Funpkg.com%2F%40cpp.js%2Fpackage-proj%2Fpackage.json&query=%24.nativeVersion&style=for-the-badge&label=PROJ" />
9
+ </a>
10
+ <a href="https://github.com/OSGeo/PROJ/blob/master/COPYING">
11
+ <img alt="License" src="https://img.shields.io/npm/l/%40cpp.js%2Fpackage-proj?style=for-the-badge" />
12
+ </a>
13
+
14
+ ## Integration
15
+ Start by installing these package with the following command:
16
+
17
+ ```sh
18
+ npm install @cpp.js/package-proj
19
+ ```
20
+
21
+ To enable the library, modify the cppjs.config.js file as shown below.
22
+ ```diff
23
+ +import proj from '@cpp.js/package-proj/cppjs.config.js';
24
+
25
+ export default {
26
+ dependencies: [
27
+ + proj
28
+ ]
29
+ paths: {
30
+ config: import.meta.url,
31
+ }
32
+ };
33
+ ```
34
+
35
+ ## Usage
36
+ Below are the steps to use the proj in your C++ or JavaScript code.
37
+
38
+ ### Usage in C++ Code
39
+ ```diff
40
+ +#include <proj.h>
41
+
42
+ double Native::sample() {
43
+ + return proj_torad(15.6);
44
+ }
45
+ ```
46
+
47
+ ## License
48
+ This project includes the precompiled proj library, which is distributed under the [MIT License](https://github.com/OSGeo/PROJ/blob/master/COPYING).
49
+
50
+ Proj Homepage: [https://proj.org/](https://proj.org/)
package/cppjs.build.js ADDED
@@ -0,0 +1,11 @@
1
+ export default {
2
+ getURL: (version) => `https://download.osgeo.org/proj/proj-${version}.tar.gz`,
3
+ buildType: 'cmake',
4
+ getBuildParams: (platform, depPaths) => [
5
+ '-DENABLE_CURL=OFF', '-DBUILD_TESTING=OFF', '-DBUILD_APPS=OFF',
6
+ `-DSQLite3_INCLUDE_DIR=${depPaths.sqlite3.header}`,
7
+ `-DSQLite3_LIBRARY=${depPaths.sqlite3.lib}`,
8
+ `-DTIFF_INCLUDE_DIR=${depPaths.tiff.header}`,
9
+ `-DTIFF_LIBRARY_RELEASE=${depPaths.tiff.lib}`,
10
+ ],
11
+ };
@@ -0,0 +1,14 @@
1
+ import projWasmMultithread from '@cpp.js/package-proj-wasm-multithread/cppjs.config.js';
2
+ import projAndroidMultithread from '@cpp.js/package-proj-android-multithread/cppjs.config.js';
3
+ import projIosMultithread from '@cpp.js/package-proj-ios-multithread/cppjs.config.js';
4
+
5
+ export default {
6
+ dependencies: [
7
+ projWasmMultithread,
8
+ projAndroidMultithread,
9
+ projIosMultithread,
10
+ ],
11
+ paths: {
12
+ config: import.meta.url
13
+ }
14
+ };
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "@cpp.js/package-proj-multithread",
3
+ "version": "2.0.0-beta.1",
4
+ "nativeVersion": "9.7.1",
5
+ "description": "This package provides the precompiled proj library, built using cpp.js, for easy integration into JavaScript, WebAssembly and React Native projects. It allows users to perform geodetic computations such as projections and coordinate transformations, ensuring high performance and cross-platform compatibility. Ideal for use in web and mobile applications.",
6
+ "homepage": "https://github.com/bugra9/cpp.js/tree/main/packages/cppjs-package-proj#readme",
7
+ "repository": "https://github.com/bugra9/cpp.js.git",
8
+ "type": "module",
9
+ "license": "MIT",
10
+ "keywords": [
11
+ "proj",
12
+ "libproj",
13
+ "cpp.js-package",
14
+ "webassembly",
15
+ "react-native"
16
+ ],
17
+ "devDependencies": {
18
+ "cpp.js": "^2.0.0-beta.1",
19
+ "@cpp.js/package-proj-wasm-multithread": "^2.0.0-beta.1",
20
+ "@cpp.js/package-proj-android-multithread": "^2.0.0-beta.1",
21
+ "@cpp.js/package-proj-ios-multithread": "^2.0.0-beta.1"
22
+ }
23
+ }