DEV Community

Discussion on: I'm an open source enthusiast at Mapbox, the creator of Leaflet and 40+ other JS libraries, and a rock musician. AMA!

Collapse
 
danielceregatti profile image
Daniel Ceregatti

I attended Mapbox Locate recently and after Lauren Budorick's presentation on mapbox-gl I wondered if the power of GL could not be leveraged for performing spatial queries on geometric data that have already been loaded into a browser, as an alternative to turf.js on the front end. Is this something you've pondered, and/or do you see any viability in pursuing such a thing?

Collapse
 
mourner profile image
Vladimir Agafonkin

WebGL is great for rendering large amounts of data, but is very difficult to use for actual processing and analysis. There are many research papers with geometric algorithms tailored for the GPU for massive parallelization, but pretty much no real implementations, and those algorithms use advanced APIs such as compute shaders, which are currently not available for WebGL and won't be for a while. Khronos is working on such an extension for the upcoming WebGL 2.0, but it will take a long time.