2D Polygon buffered (offset) exterior ring

I have a set of lat/lng co-ordinates for polygons that I want to display as extruded polygons with a buffer (say 10 meters) around the prism. This is not a simple task for complex polygons which may have narrow inlets that should disappear and sharp angles that must not jut out. Is there any cesium capability that allows me to produce an outer ring polygon from another polygon and a buffer width in meters?

If there is not a cesium capability, does anyone know of an open source javascript example to do this?


If you need to do it client side, I havn’t worked with it yet but I would look at


a javascript port of the widely used JTS Topology Suite


To add a 10 meter buffer you will need to convert your long/lats to a coordinate space in meters , such as UTMs, or EPSG:3857

there is a javascript port of Proj4


or there is WebMercatorProjection in Cesium with a project function


you may want to simplify the polygons produced after the buffer operation

using jsts (I haven’t tried this yet)


or another library that works well in 3D (I have used with cesium on cartesian arrays)

http://mourner.github.io/simplify-js/ (for the 3D version go to the ‘3D’ brach on github)

Server side , there is a bunch of stuff depending on your environment

If you have the data in MS Sql 2008 server or later or Oracle there are a number of spatial functions SQL geometry & geography types for C# ect…