geoblaze
geoblaze copied to clipboard
Get method or intersect-polygon on frontend
Im trying to cut a tiff loaded with geoblaze, load method, with a custom geoJson geometry and get a pixel array, as get method do, unfortunately (get method, or intersect-polygon) isnt available at less on CDN version of library (index.js not include to build this modules with webpack) Dont know if its a limitation, a bug or my own ignorance.
I need to extend with other stats (percentils, quantils...) or maybe integrate with simplestatistics
Thanks
Hi, @codesian . Great question. I'll change the code right now to export the get
and intersectPolygon
functions and republish. I'll update this issue when that is complete.
Thanks!
I changed to do localy, i can do a PR if you want. Did intersectPolygon
function works with other EPSGs like 3857 or only its tested with 4326?
@codesian , I'd love it if you do a PR!
@codesian , unfortunately, I've only tested it with 4326. The code also assumes that the raster and the clipping geometry are the same projection, so it should work if you reproject your geometry into 3857 before running on a raster in 3857. I can't guarantee it though. You may be familiar with proj4js, which can be used to reproject a geospatial geometry. http://proj4js.org/
Is there a specific projection that you would like us to support? 3857 is the first that comes to mind, but I want to make sure I understand your highest priority. Thanks!
P.S. We're always open to pull requests or bug fixes. We're not perfect, but we can make a great library together!