geotiff / geoblaze Goto Github PK
View Code? Open in Web Editor NEWBlazing Fast JavaScript Raster Processing Engine
Home Page: http://geoblaze.io
License: MIT License
Blazing Fast JavaScript Raster Processing Engine
Home Page: http://geoblaze.io
License: MIT License
already did sum, have to do others, too
ift.tt/2gKrEzF
Params:
Clip By This Raster:
Raster To Clip
(No Data Value? or take from GeoTIFF metadata)
I think it'll be faster if we have an if statement or ternary expression in the reduce function rather than having filter then reduce. That's because we're currently iterating over all the values twice. Not sure though. We can write performance tests too to find out!
@DanielJDufour DanielJDufour Merge pull request #24 from sdpeyton/temp โฆ
Should probably rename to something a little more intuitive
With features getting more complex, testing will need to be re-architected to be more efficient at getting high coverage. Specifically, we need:
Currently, tools check to see if there is only one band and returns just those results if that is the case. This will be unsustainable in the future; it is better to have the user handle it on the front end
Need to write tests (probably in a separate repository) that tests and compares GDAL, GeoDjango, rasterio, and geoblaze.
We want to run automated tests after each PR created.
You want to place a .travis.yml file in the root directory and configure it to run npm test. Here's an example for a Python package.
https://github.com/DanielJDufour/date-extractor/blob/master/.travis.yml
Identify runs slow on mobile devices probably because readRasters takes a while to run (not 100% sure on this though).
We could speed this up by doing the following:
We can use the Browser's performance API, to track how long operations take.
which are what the Load File option uses
Here's an example of a raster that uses a float for their GDAL_NO_DATA value
It's a Rwanda raster for world pop.
https://github.com/GeoTIFF/geotiff.io/blob/master/data/RWA_ppp_v2b_2020.tif
using documentation.js that MapBox GL JS and Turf use
Here's example of geojson:
http://bl.ocks.org/d/17662f9239fd6e4c38008c48125af756
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-112.1484375,
-55.37911044801048
],
[
101.6015625,
-55.37911044801048
],
[
101.6015625,
68.9110048456202
],
[
-112.1484375,
68.9110048456202
],
[
-112.1484375,
-55.37911044801048
]
]
]
}
}
]
}
need to return row index and column index along with value and band_index.
It'd be nice of the Readme had the following categories, if not more:
npm install geotiff-io
Here's an example:
https://github.com/DanielJDufour/date-extractor
Is your feature request related to a problem? Please describe.
We need to set up automated testing, so we can automatically test pull requests
Describe the solution you'd like
We probably should create a .circleci
folder and create a config.yml
inside of this folder. This config.yml configures the Circle CI tests. Here's an example of a config.yml file: https://github.com/FirstDraftGIS/cooccurrences/blob/master/.circleci/config.yml
Describe alternatives you've considered
TravisCI also provides from testing for Open Source projects. I'd be happy with Travis CI, too! :-) Here's an example of a .travis.yml file: https://github.com/DanielJDufour/date-extractor/blob/master/.travis.yml
Additional context
N/A
Here's the link to the file:
ftp://ftp.glcf.umd.edu/glcf/SRTM/Degree_Tiles/n038/SRTM_f03_n038e077/SRTM_f03_n038e077.tif.gz
Should we add code editor to docs, so people can actually edit example code on the fly???
We probably should only have a few rasters loaded for all the samples though...
Is your feature request related to a problem? Please describe.
A user should be able to clip a raster by a vector. In other words, the clip function should clip the raster by the geometry's bounding box and set all the remaining values outside of the geometry to No Data
. It should also update the metadata for the raster.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Create a clip module that takes in a georaster and geovector and returns the result as a georaster. The approach could include:
Describe alternatives you've considered
None at the moment
Additional context
You'll need to borrow some logic from https://github.com/GeoTIFF/geoblaze/blob/master/src/intersect-polygon/intersect-polygon.module.js and potentially split out some of the code, creating a separate getInsides
module
gio-convert-geometry should handle points when passed in as object with x and y as properties
Since it is the standard convention in javascript, we should more to camel case.
I think it would be awesome if we could create ObservableHQ Notebook examples of raster band math. It'd also help users understand how to use it. You could also push it to app.geotiff.io like I do in https://beta.observablehq.com/@danieljdufour/create-an-rgb-geotiff if the GeoTIFF file isn't too big to embed in the url!
Documentation https://docs.geoblaze.io/ looks ugly (I did it)
We need to make it look better, something like https://turfjs.org
Perhaps we can borrow orange color from http://geoblaze.io/
Currently, documentation doesn't describe that third options parameter for histogram. A user spent a long time and had to go through our source code to figure out what params to pass in with options. We need to update documentation.
use namespaced
Throw errors in gio.js. Could you throw an errors in addition to logging to console with console.error? We need this in order to capture errors and alert the users.
We can then catch errors in promises with .catch (the opposite of .then).
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/catch
We should add a debug mode in the settings, also as a url param, that will add a lot of alerts to the page with relevant info. For example, after we run an identify, the alert should say how much each part of that process took.
We absolutely don't want to load all of the raster pixel values into JavaScript memory for a simple identify function. We should use a rasterWindow, which you can be seen used here: https://www.npmjs.com/package/geotiff
Using RasterWindow will also decrease the odds of maxing out the system memory and crashing the browser.
Not necessarily gonna rearchitect
Code complexity will become an issue as we increase the number of features we support. Converting to classes may improve readability
This is a research task - if this refactor would significantly hurt performance, we should abort
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.