GRASS (Geographic Resources Analysis Support System) is a very old GIS with very advanced features for raster and vector analysis.
GRASS GIS 7 Programmer's Manual
Programming language integration:
PyGRASS
) is available in GRASS 7.v
v.extract
Selects vector objects from an existing vector map and creates a new map.
r
r3
db
d.vect.thematic
Displays thematic vector map