geoblaze icon indicating copy to clipboard operation
geoblaze copied to clipboard

Get method or intersect-polygon on frontend

Open codesian opened this issue 6 years ago • 4 comments

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

codesian avatar Dec 13 '18 17:12 codesian

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.

DanielJDufour avatar Dec 13 '18 19:12 DanielJDufour

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 avatar Dec 13 '18 19:12 codesian

@codesian , I'd love it if you do a PR!

DanielJDufour avatar Dec 13 '18 19:12 DanielJDufour

@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!

DanielJDufour avatar Dec 13 '18 20:12 DanielJDufour