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?

Thanks.

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

https://github.com/bjornharrtell/jsts

a javascript port of the widely used JTS Topology Suite

http://tsusiatsoftware.net/jts/main.html

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

https://github.com/proj4js/proj4js

or there is WebMercatorProjection in Cesium with a project function

http://cesiumjs.org/Cesium/Build/Documentation/WebMercatorProjection.html?classFilter=Project

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

using jsts (I haven’t tried this yet)

http://bjornharrtell.github.io/jsts/doc/api/symbols/jsts.operation.buffer.BufferInputLineSimplifier.html

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…