Mapping Toolbox    

Trimming Vector Data to a Defined Region

Sometimes vector data may extend beyond the geographic region of interest. For example, if you have world coastline data, but you require a map of Australia only, you may want to create new variables that contain only the data you need. You might also want to trim your data to save memory or to speed up calculations and display.

We can distinguish between trimming line data and patch data. Line data can be trimmed by simply removing points outside the region of interest. Patch data requires a more complicated method to ensure that the patch objects are correctly displayed. For the vector data, two functions are available to achieve this. If the variables are to be treated as line data, the maptriml command will return variables containing only those points in the defined region. If polygon format must be retained, the maptrimp command will ensure this, although compared to the line formatted data, the patch-trimmed data will be larger and take more time to compute.

Load the coast MAT-file, and trim the vector data to a region centered on Australia:


  Buffer Zones Simplifying Vector Data