-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
proj4 base cases working; tests rearranged; tests added for all geometry
- Loading branch information
Mr Martian
committed
Sep 16, 2024
1 parent
9f4c24f
commit c54afbc
Showing
327 changed files
with
42,297 additions
and
921 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | ||
|
||
name: Node.js CI | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [14.x, 16.x, 18.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- run: npm ci | ||
- run: npm run build --if-present | ||
- run: npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
*~ | ||
node_modules | ||
.c9revisions | ||
coverage | ||
projs.js | ||
.DS_STORE | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"esversion": 6, | ||
"curly": true, | ||
"eqeqeq": true, | ||
"latedef": "nofunc", | ||
"undef": true, | ||
"unused": true, | ||
"trailing": true, | ||
"indent": 2, | ||
"browser": true, | ||
"node": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*~ | ||
.c9revisions | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Mike Adair <[email protected]> | ||
Richard Greenwood <[email protected]> | ||
Calvin Metcalf <[email protected]> | ||
Richard Marsden (http://www.winwaed.com) | ||
#credit for | ||
#src/projCode/gnom.js | ||
#src/projCode/cea.js | ||
T. Mittan | ||
#credit for | ||
#src/projCode/eqdc.js | ||
#src/projCode/equi.js | ||
#src/projCode/merc.js | ||
#src/projCode/mill.js | ||
#src/projCode/omerc.js | ||
#src/projCode/ortho.js | ||
#src/projCode/poly.js | ||
#src/projCode/poly.js | ||
D. Steinwand | ||
#credit for | ||
#src/projCode/merc.js | ||
#src/projCode/laea.js | ||
#src/projCode/moll.js | ||
S. Nelson | ||
#credit for | ||
#src/projCode/moll.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
var json = require('rollup-plugin-json'); | ||
var nodeResolve = require('rollup-plugin-node-resolve'); | ||
var replace = require('rollup-plugin-replace'); | ||
var pkg = require('./package.json'); | ||
|
||
var projs = [ | ||
'tmerc', | ||
'etmerc', | ||
'utm', | ||
'sterea', | ||
'stere', | ||
'somerc', | ||
'omerc', | ||
'lcc', | ||
'krovak', | ||
'cass', | ||
'laea', | ||
'aea', | ||
'gnom', | ||
'cea', | ||
'eqc', | ||
'poly', | ||
'nzmg', | ||
'mill', | ||
'sinu', | ||
'moll', | ||
'eqdc', | ||
'vandg', | ||
'aeqd', | ||
'ortho', | ||
'qsc', | ||
'robin', | ||
'geocent', | ||
'tpers', | ||
'geos', | ||
'eqearth', | ||
'bonne' | ||
]; | ||
module.exports = function (grunt) { | ||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
connect: { | ||
server: { | ||
options: { | ||
port: process.env.PORT || 8080, | ||
base: '.' | ||
} | ||
} | ||
}, | ||
mocha_phantomjs: { | ||
all: { | ||
options: { | ||
reporter: "dot", | ||
urls: [ //my ide requries process.env.IP and PORT | ||
"http://" + (process.env.IP || "127.0.0.1") + ":" + (process.env.PORT || "8080") + "/test/amd.html", | ||
"http://" + (process.env.IP || "127.0.0.1") + ":" + (process.env.PORT || "8080") + "/test/opt.html" | ||
] | ||
} | ||
} | ||
}, | ||
jshint: { | ||
options: { | ||
jshintrc: "./.jshintrc" | ||
}, | ||
all: ['./lib/*.js', './lib/*/*.js'] | ||
}, | ||
rollup: { | ||
options: { | ||
format: "umd", | ||
moduleName: "proj4", | ||
plugins: [ | ||
replace({ | ||
__VERSION__: pkg.version | ||
}), | ||
json(), | ||
nodeResolve() | ||
] | ||
}, | ||
files: { | ||
dest: './dist/proj4-src.js', | ||
src: './lib/index.js', | ||
}, | ||
}, | ||
uglify: { | ||
options: { | ||
report: 'gzip', | ||
mangle:{ | ||
reserved: ['proj4','Projection','Point'] | ||
}, | ||
}, | ||
all: { | ||
src: 'dist/proj4-src.js', | ||
dest: 'dist/proj4.js' | ||
} | ||
} | ||
}); | ||
grunt.loadNpmTasks('grunt-rollup'); | ||
grunt.loadNpmTasks('grunt-contrib-uglify'); | ||
grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
grunt.loadNpmTasks('grunt-contrib-connect'); | ||
grunt.loadNpmTasks('grunt-mocha-phantomjs'); | ||
grunt.registerTask('custom',function(){ | ||
grunt.task.run('rollup', 'uglify'); | ||
var projections = this.args; | ||
if(projections[0]==='default'){ | ||
grunt.file.write('./projs.js','export default function(){}'); | ||
return; | ||
} | ||
if(projections[0]==='all'){ | ||
projections = projs; | ||
} | ||
grunt.file.write('./projs.js',[ | ||
projections.map(function(proj) { | ||
return "import " + proj + " from './lib/projections/" + proj + "';"; | ||
}).join("\n"), | ||
"export default function(proj4){", | ||
projections.map(function(proj) { | ||
return " proj4.Proj.projections.add(" + proj + ");" | ||
}).join("\n"), | ||
"}" | ||
].join("\n")); | ||
}); | ||
grunt.registerTask('build',function(){ | ||
var args = this.args.length?this.args[0].split(','):['default']; | ||
grunt.task.run('jshint', 'custom:'+args.join(':')); | ||
}); | ||
grunt.registerTask('default', ['build:all', 'connect','mocha_phantomjs']); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
## Proj4js -- Javascript reprojection library. | ||
|
||
Authors: | ||
- Mike Adair madairATdmsolutions.ca | ||
- Richard Greenwood richATgreenwoodmap.com | ||
- Didier Richard didier.richardATign.fr | ||
- Stephen Irons stephen.ironsATclear.net.nz | ||
- Olivier Terral oterralATgmail.com | ||
- Calvin Metcalf cmetcalfATappgeo.com | ||
|
||
Copyright (c) 2014, Mike Adair, Richard Greenwood, Didier Richard, Stephen Irons, Olivier Terral and Calvin Metcalf | ||
|
||
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._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Publishing | ||
=== | ||
|
||
Make sure you have the latest from the main branch: | ||
|
||
git pull origin master | ||
|
||
Use `tin` to update the version number in the `package.json`, `component.json` & `bower.json`. | ||
|
||
tin -v x.y.z | ||
|
||
Then run the publish script | ||
|
||
./publish.sh | ||
|
||
afterwards don't forget to update the versions to be a prerelease of the next version, so if you just published 1.1.1 then: | ||
|
||
tin -v 1.1.2-alpha | ||
npm install | ||
git add package.json package-lock.json component.json bower.json | ||
git commit -m 'update version to 1.1.2-alpha' | ||
git push origin master |
Oops, something went wrong.