Fun with EsriJS Geometry Engine
The release of version 3.13 of the ArcGIS API for JavaScript introduced the beta version of the Geometry Engine. Since this is still considered beta, there are probably some missing features, maybe a few bugs here and there, so use with caution.
What the hell is it?
The Geometry Engine is analogous to Turf. I’m a big fan of Turf even converting my ArcGIS Features to GeoJSON to use it when needed, so I was pretty excited to see this additional functionality. There’s a sample up on how to buffer, which is classic. We always want to buffer. I showed how it can be used to measure distances pretty easily in this blog post on GeoNet and there’s tons of other really cool stuff you can do with it.
Dumb stuff to do dumb stuff
So the following examples are in no way intended to be useful whatsoever. They are however examples of what you can do if you just wanted to play with the Geometry Engine. If you look at the docs, all the basics are there. You can clip, buffer, intersect, union, find nearest points, check if one geometry is another, blah blah blah. You could also say screw that noise and just rotate the shit out of stuff. Fun with Geometry Engine
Or maybe you want to turn California into an island! Fun with Geometry Engine
Or you want to make it dance. Fun with Geometry Engine
Ok, that’s just some silly stuff you could do with the Geometry Engine. If you are doing some more complex work, like buffering lots of points, clipping some complez features, or more, you may want to use the async version of Geometry Engine which will start using Web Workers to handle some of the load.
Enough fooling around
Take the Geometry Engine start seeing if it can fill some gaps in your workflow. Composed together, you can forego some requests to a Geometry Service and do a lot of this work in the browser now. I like Turf for my non-esri projects and I’m glad that I have a cool option in the ArcGIS API for JavaScript now.