Gdstk (GDSII Tool Kit) is a C++ library for creation and manipulation of GDSII stream files. It is also available as a Python module meant to be a successor to Gdspy. Key features for the creation of complex CAD layouts are included: 1. Boolean operations on polygons (AND, OR, NOT, XOR) based on clipping algorithm; 2. Polygon offset (inward and outward rescaling of polygons); and 3. Efficient point-in-polygon solutions for large array sets.