shapely-compute

Computational geometry with Shapely - create geometries, boolean operations, measurements, predicates

By parcadei · 489 installs

npx skills add parcadei/continuous-claude-v3 --skill shapely-compute

Source repository · Upstream listing

Computational Geometry with Shapely When to Use Creating geometric shapes (points, lines, polygons) Boolean operations (intersection, union, difference) Spatial predicates (contains, intersects, within) Measurements (area, length, distance, centroid) Geometry transformations (translate, rotate, scale) Validating and fixing invalid geometries Quick Reference I want to... Command Example Create geometry create create polygon coords "0,0 1,0 1,1 0,1" Intersection op intersection op intersection g1 "POLYGON(...)" g2 "POLYGON(...)" Check contains pred contains pred contains g1 "POLYGON(...)" g2 "POINT(0.5 0.5)" Calculate area measure area measure area geom "POLYGON(...)" Distance distance distance g1 "POINT(0 0)" g2 "POINT(3 4)" Transform transform translate transform translate geom "..." params "1,2" Validate validate validate geom "POLYGON(...)" Commands create Create geometric objects from coordinates. op (operations) Boolean geometry operations. pred (predicates) Spatial relationship tests (returns boolean). measure Geometric measurements. distance Distance between geometries. transform Affine transformations. validate / makevalid Check and fix geometry validity. coords Extract coordinates from geometry. fromwkt Parse WKT and get geometry information. Geometry Types point Single coordinate (x, y) or (x, y, z) line / linestring Sequence of connected points polygon Closed shape with optional holes multipoint , multilinestring , multipolygon Collections Input Formats Coordinates string : "0,0 1,0 1,1 0,1" (space separated x,y pairs) WKT : "POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))" Output Format All commands return JSON with: wkt : WKT representation of result geometry type : Geometry type (Point, LineString, Polygon, etc.) bounds : (minx, miny, maxx, maxy) is valid , is empty : Validity flags Measurement specific fields (area, length, distance, etc.) Common Use Cases Use Case Command Collision detection pred intersects Point in polygon pred contains Area calculation measure area Buffer zones op buffer Shape combination op union Shape subtraction op difference Bounding box op envelope or measure bounds Simplify path op simplify Related Skills /math mode Full math orchestration (SymPy, Z3) /math plot Visualization with matplotlib