Comments (4)
It's possible the performance is related to the way georaster is bundling an older version of geotiff.js. Would you be able to see the workaround described here and let me know if that works for you?
GeoTIFF/geoblaze#226 (comment)
Long term, I hope to publish a new version of georaster that fixes this issue, but that may take some time because we're in the middle of a re-write.
from georaster-layer-for-leaflet.
I came to the same conclusion, my workaround right now is to download the data directly (gzip compresses it well) and construct the georasters manually as described here (https://github.com/GeoTIFF/georaster?tab=readme-ov-file#load-from-simple-object-on-front-end). Here is the metadata I'm supplying.
const sizeDegrees = 0.02906874;
const projection = 4326;
const xmin = -124.725839;
const xmax = -66.949895;
const ymin = 24.498131;
const ymax = 49.384358;
const pixelWidth = sizeDegrees;
const pixelHeight = sizeDegrees;
const metadata = { projection, xmin, xmax, ymin, ymax, pixelWidth, pixelHeight };
However I've run into another issue, with a raster 2000x850 that means there are 1.7m unique tiles. Even when I set the resolution to 8 I still have a good deal of lag when panning/zooming. Is there someway to change the way I create the rasters so they work better with GeoRasterLayer
? I also tried extending GridLayer the way this plugin does and found out that createTile
creates a new div/canvas for every cell 🤮.
As part of your rewrite are you planning to make it so that there is only a single canvas element? If not I think I'll give that a try, if so maybe I'll wait. In any case good luck with your endeavor.
from georaster-layer-for-leaflet.
@john-a-m , could you try the experimental pre-release version of georaster-layer-for-leaflet and let me know if that improves the performance for you?!
npm install georaster-layer-for-leaflet@next
from georaster-layer-for-leaflet.
It's been a while since I've used nvm/node/npm, here's what I did. I created an empty project and ran npm install georaster-layer-for-leaflet@next
everything seemed to install correctly. I looked at scripts
in package.json
and decided to copy georaster-layer-for-leaflet.min.js from the dist directory to the server. Anecdotally it does seem to run slightly faster, although I did notice there seems to be some "redraw artifacts".
For the resolution/zoom in that picture I would expect the little pixels to be resampled into the bigger pixels. Let me know what you think.
from georaster-layer-for-leaflet.
Related Issues (20)
- CanvasRenderingContext2D/filter --> using georaster from url HOT 2
- Error [ERR_REQUIRE_ESM]
- rawToRgb is not a function HOT 9
- COG not projected correctly HOT 9
- RPF, CADRG, CIB, ADRG, ASRP and DTED HOT 1
- "Uncaught TypeError: ap.defs is not a function" during vite preview HOT 2
- Cannot read properties of null (reading 'GeographicTypeGeoKey') HOT 2
- ALOS (30m) colors seem weirdly off HOT 6
- Error - "Can not get band1 min/max, try to calculate min/max values, or setting domain" HOT 1
- Tiles misaligned when source raster not in native projection HOT 1
- Update package.json script to work on any OS HOT 1
- Save Tile Stack HOT 1
- Add more tests for polar geotiffs HOT 1
- Get all visible pixels as array or data url
- When loading a 1.6g COG TIF or smaller tif, the map scaling may lag HOT 2
- endering Performance CloudOptimizedGeotiff Band calculation ( Question rather than a feature request) HOT 2
- Heavy memory usage on small CoG (Tiffs) files
- How can you extract bands from a geotiff? HOT 2
- Allow transparency without a Mask via pixelValuesToColorFn HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from georaster-layer-for-leaflet.