Knowledge Base



KB10674 - Cut vector layer into specified number of equally sized rectangular segments.

An example might be to cut (divide) a SHP vector map of a 30x30 kilometer area into nine separate SHP files, each covering a unique 10x10 km area from the original 30x30 km, with no overlapping areas and no loss of data.

With the TatukGIS Editor product this is done by carefully specifying the spatial extent (coverage area) for each of nine exported SHP files. Within the Layer Export dialog box (opened via menu Layer / Export) select the User defined export extent option and enter x and y coordinate values to define the right, left, upper, and lower boundaries of the export extent. Select the clipped by extent setting to, as required, cleanly cut line and polygon features along the extent boundaries (with no loss of geometric or attribute data). Refer to the Editor Layer / Export helpfile topic for more guidance.

If this operation will be performed regularly, more efficient may be to write an Editor script to automatically perform, as a custom routine, this operation on one or a series of shapefiles. For guidance, review the SplitLayerVector and SplitRasterVector source code scripts packaged with the Editor. The scripts are accessed under menu Scripts / Run / Open.

Created: January 17, 2006, Modified: January 09, 2016
follow us on Facebook  follow us on Twitter  follow us on Google +  follow us on LinkedIn  Embarcadero