help clippolylineclippolyline v1.1 (GitHub)

CLIPPOLYLINE (beta release)

clippolyline takes a polyline shapefile and clips it on a manually defined bounding box. This program is a wrapper for the intermediate clipline program that
implements the Cohen-Sutherland algorithm in Stata.

If you want to do other type of clippings, then use clippolygon which supercedes clippolyline. For box clipping, clippolyline is still much faster.

Syntax

clippolyline filename, box(xmin, xmax, ymin, ymax)

filename is the *_shp.dta file generated by Stata's spshape2dta command that contains line coordinates.

box(xmin, xmax, ymin, ymax) The bounding box coordinates need to be specified in the correct order.

See the GitHub repository for examples.

Keywords: Stata, graphs, map line clipping, Cohen-Sutherland algorithm
Version: clippolyline version 1.1
This release: 08 Sep 2022
First release: 02 Apr 2022
License: MIT

Author: Asjad Naqvi (WU Wien and IIASA, Austria)
E-mail: asjadnaqvi@gmail.com
Twitter: @AsjadNaqvi