Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: GeoTIFF/geoblaze
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b8ef92ebb7e6d1fe5bcc79626f61095f62a4301f
Choose a base ref
...
head repository: GeoTIFF/geoblaze
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f8a029065717d31cccb7acd7d4fb58b38e1ca3bd
Choose a head ref
Loading
Showing with 26,115 additions and 16,084 deletions.
  1. +2 −2 .babelrc
  2. +9 −6 .eslintrc.json
  3. +2 −1 .gitignore
  4. +0 −32 .travis.yml
  5. +12 −13 README.md
  6. +2 −2 docs/assets/anchor.js
  7. +2 −2 docs/assets/split.js
  8. +655 −269 docs/index.html
  9. +11 −6 documentation.yml
  10. +0 −62 index.js
  11. +22,540 −13,283 package-lock.json
  12. +54 −37 package.json
  13. +0 −1 serve.js
  14. +0 −16 server.js
  15. +1 −1 setup.sh
  16. +51 −60 src/band-arithmetic/band-arithmetic.module.js
  17. +163 −130 src/band-arithmetic/band-arithmetic.test.js
  18. +11 −9 src/band-arithmetic/index.js
  19. +1 −1 src/cache/index.js
  20. +26 −18 src/convert-geometry/convert-geometry.module.js
  21. +63 −56 src/convert-geometry/convert-geometry.test.js
  22. +1 −1 src/convert-geometry/index.js
  23. +5 −3 src/error-constants.js
  24. +59 −23 src/get/get.module.js
  25. +147 −40 src/get/get.test.js
  26. +7 −9 src/get/index.js
  27. +42 −51 src/histogram/histogram.module.js
  28. +128 −94 src/histogram/histogram.test.js
  29. +16 −7 src/histogram/index.js
  30. +12 −11 src/identify/identify.module.js
  31. +50 −23 src/identify/identify.test.js
  32. +17 −9 src/identify/index.js
  33. +50 −0 src/index.js
  34. +1 −3 src/intersect-polygon/index.js
  35. +40 −46 src/intersect-polygon/intersect-polygon.module.js
  36. +88 −50 src/intersect-polygon/intersect-polygon.test.js
  37. +16 −9 src/load/index.js
  38. +23 −18 src/load/load.module.js
  39. +61 −76 src/load/load.test.js
  40. BIN src/load/test/spam2005v2r0_physical-area_rice_total.tiff
  41. +10 −7 src/max/index.js
  42. +5 −77 src/max/max.module.js
  43. +62 −45 src/max/max.test.js
  44. +10 −7 src/mean/index.js
  45. +5 −80 src/mean/mean.module.js
  46. +79 −49 src/mean/mean.test.js
  47. +10 −7 src/median/index.js
  48. +5 −92 src/median/median.module.js
  49. +72 −50 src/median/median.test.js
  50. +10 −7 src/min/index.js
  51. +5 −77 src/min/min.module.js
  52. +57 −39 src/min/min.test.js
  53. +12 −8 src/mode/index.js
  54. +5 −74 src/mode/mode.module.js
  55. +59 −45 src/mode/mode.test.js
  56. +20 −0 src/modes/index.js
  57. +6 −0 src/modes/modes.module.js
  58. +60 −0 src/modes/modes.test.js
  59. +24 −0 src/parse/index.js
  60. +29 −0 src/parse/parse.module.js
  61. +100 −0 src/parse/parse.test.js
  62. +8 −8 src/raster-calculator/index.js
  63. +38 −53 src/raster-calculator/raster-calculator.module.js
  64. +129 −186 src/raster-calculator/raster-calculator.test.js
  65. +13 −0 src/stats/index.js
  66. +73 −0 src/stats/stats.module.js
  67. +102 −0 src/stats/stats.test.js
  68. +11 −9 src/sum/index.js
  69. +5 −59 src/sum/sum.module.js
  70. +275 −212 src/sum/sum.test.js
  71. +1 −3 src/utils/index.js
  72. +115 −95 src/utils/utils.module.js
  73. +200 −188 src/utils/utils.test.js
  74. +13 −0 src/wrap-load.js
  75. +13 −0 src/wrap-parse.js
  76. +36 −36 test-loading-builds.js
  77. +1 −1 test/test-dev-build.html
  78. +1 −1 test/test-production-build.html
  79. +0 −45 webpack.base.js
  80. +68 −0 webpack.config.js
  81. +0 −24 webpack.dev.js
  82. +0 −20 webpack.prod.js
4 changes: 2 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"presets": ["env"],
"plugins": ["transform-runtime"]
"presets": ["@babel/preset-env"],
"plugins": ["@babel/plugin-transform-runtime"]
}
15 changes: 9 additions & 6 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -2,18 +2,17 @@
"env": {
"browser": true,
"es6": true,
"node": true,
"mocha": true
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 2017,
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
"arrow-parens": ["error", "as-needed"],
"camelcase": "error",
"comma-dangle": ["error", { "objects": "always-multiline" }],
"comma-dangle": ["error", "never"],
"indent": ["error", 2],
"linebreak-style": ["error", "unix"],
"no-console": "off",
@@ -25,8 +24,12 @@
"prefer-const": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"quotes": ["error", "single"],
"quotes": ["error", "double", { "avoidEscape": true }],
"semi": ["error", "always"],
"space-before-function-paren": ["error", "always"]
"space-before-function-paren": ["error", {
"anonymous": "always",
"named": "never",
"asyncArrow": "always"
}]
}
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -98,4 +98,5 @@ data/veneto/*.tif
dist/

# DS_Store
DS_Store
.DS_Store
*/*/.DS_Store
32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

25 changes: 12 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -3,19 +3,19 @@
[![Maintainability](https://api.codeclimate.com/v1/badges/a99a88d28ad37a79dbf6/maintainability)](https://codeclimate.com/github/codeclimate/codeclimate/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/a99a88d28ad37a79dbf6/test_coverage)](https://codeclimate.com/github/codeclimate/codeclimate/test_coverage)

# Geoblaze
# GeoBlaze

***A blazing fast javascript raster processing engine***

---

Geoblaze is a geospatial raster processing engine written purely in javascript. Powered by [geotiffjs](https://github.com/geotiffjs/geotiff.js), it provides tools to analyze [GeoTIFFs](https://en.wikipedia.org/wiki/GeoTIFF). Using geoblaze, you can run computations ranging from basic statistics (min, max, mean, mode) to band arithmetic and histogram generation in either a web browser or a node application.
GeoBlaze is a geospatial raster processing engine written purely in javascript. Powered by [geotiffjs](https://github.com/geotiffjs/geotiff.js), it provides tools to analyze [GeoTIFFs](https://en.wikipedia.org/wiki/GeoTIFF). Using geoblaze, you can run computations ranging from basic statistics (min, max, mean, mode) to band arithmetic and histogram generation in either a web browser or a node application.

Learn more by [reading our documentation](https://geoblaze.io)

## Getting Started

1. Add Geoblaze to your project
1. Add GeoBlaze to your project
```
npm install geoblaze
```
@@ -28,8 +28,9 @@ import geoblaze from 'geoblaze';
const url = 'http://url-to-geotiff';

async function getMean () {
const raster = await geoblaze.load(url);
return geoblaze.mean(raster);
const georaster = await geoblaze.load(url);
const mean = await geoblaze.mean(georaster);
return mean;
}
```

@@ -80,7 +81,7 @@ We squash and rebase all PRs. Please squash all of your commits into one and reb
```

### Linting
Geoblaze uses [eslint](https://eslint.org/) for linting. We suggest using an eslint plugin for your text editor. Here are some common options:
GeoBlaze uses [eslint](https://eslint.org/) for linting. We suggest using an eslint plugin for your text editor. Here are some common options:

- For Sublime: [SublimeLinter-eslint](https://github.com/SublimeLinter/SublimeLinter-eslint)
- For Atom: [linter-eslint](https://atom.io/packages/linter-eslint)
@@ -93,7 +94,7 @@ To test for linting errors:
```

### Testing
Geoblaze uses [mocha](https://mochajs.org/) as its testing framework. To learn more, see their [getting started guide](https://mochajs.org/#getting-started).
GeoBlaze uses [flug](https://github.com/DanielJDufour/flug) as its testing framework.

To run tests:

@@ -102,12 +103,10 @@ To run tests:
npm run setup
```

2. Spin up the test node server
```
npm run server
```

3. In a separate tab, run tests
2. Run tests. Each test file will automatically spin up a server using [srvd](https://github.com/danieljdufour/srvd).
```
npm run test
```

# Used By
<a href="https://geotiff.io"><img src="https://github.com/GeoTIFF/geotiff.io/raw/master/assets/favicon.png" height="75px"></a>
4 changes: 2 additions & 2 deletions docs/assets/anchor.js
Original file line number Diff line number Diff line change
@@ -262,8 +262,8 @@
*/
this.hasAnchorJSLink = function(el) {
var hasLeftAnchor =
el.firstChild &&
(' ' + el.firstChild.className + ' ').indexOf(' anchorjs-link ') > -1,
el.firstChild &&
(' ' + el.firstChild.className + ' ').indexOf(' anchorjs-link ') > -1,
hasRightAnchor =
el.lastChild &&
(' ' + el.lastChild.className + ' ').indexOf(' anchorjs-link ') > -1;
4 changes: 2 additions & 2 deletions docs/assets/split.js
Original file line number Diff line number Diff line change
@@ -219,8 +219,8 @@
var b = elements[this.b];
var percentage = a.size + b.size;

a.size = offset / this.size * percentage;
b.size = percentage - offset / this.size * percentage;
a.size = (offset / this.size) * percentage;
b.size = percentage - (offset / this.size) * percentage;

setElementSize(a.element, a.size, this.aGutterSize);
setElementSize(b.element, b.size, this.bGutterSize);
Loading