-
Notifications
You must be signed in to change notification settings - Fork 1
Vector functions
This page contains a listing of all the vector functions currently supported in Qpy.
This class contains all the basic geoprocessing functions found within QGIS.
A function to clip a polygon feature to the extent of another polygon feature.
Source: modules/vector.py Class: VectorA
import qpy
qpy.vector_basic.clip("polygon_to_be_clipped.shp", "extent_polygon.shp", "output_polygon.shp")
A reverse of the clip function. Erases overlaying polygon features from an input polygon.
Source: modules/vector.py Class: VectorA
import qpy
qpy.vector_basic.erase("erased.shp", "cutter.shp", "output_polygon.shp")
Calculates the geometric intersection of two shapefiles.
Source: modules/vector.py Class: VectorA
qpy.vector_basic.intersect("shape1.shp", "shape2.shp", "output_shape.shp")
Merges two shapefiles together. Can be points, lines, or polygons, but must all be the same type.
Source: modules/vector.py Class: VectorA
qpy.vector_basic.merge("shape1.shp", "shape2.shp", "output_shape.shp")
To merge more than two shapefiles, use the merge_multiple or merge_folder method.
Merges a list of shapefiles together. Uses the merge method, so must all be the same data type.
Source: modules/vector.py Class: VectorA
qpy.vector_basic.merge_multiple(["shape1.shp", "shape2.shp", "shape3.shp", "shape4.shp", "shape5.shp"], "output_shape.shp")
Merges a folder of shapefiles.
Source: modules/vector.py Class: VectorA
qpy.vector_basic.merge_folder("/home/mcvittal/gis/tobemerged", "output_shape.shp")
Extracts features from a shapefile based on SQL table selection.
NOTE: ogr2ogr is not working in my test environment on Windows, but it works on my Linux test environment. YMMV.
qpy.vector_basic.select("roads.shp", "ferguson_road.shp", "ROADNAM LIKE 'Ferguson%'")