Main Content

clipdata

(To be removed) Clip data at +/-pi in longitude, +/-pi in latitude

The clipdata function will be removed in a future release.

Syntax

[lat,long,splitpts] = clipdata(lat,long,object)

Description

[lat,long,splitpts] = clipdata(lat,long,object) inserts NaNs at the appropriate locations in a map object so that a displayed map is clipped at the appropriate edges.

Note

To clip vector data that is represented by a shape object in geographic coordinates, use the geoclip function. To crop raster data that is represented by an array and a geographic raster reference object, use the geocrop function.

The clipdata function assumes that the clipping occurs at +/- pi/2 radians in the latitude (y) direction and +/- pi radians in the longitude (x) direction.

The input data must be in radians and properly transformed for the particular aspect and origin so that it fits in the specified clipping range.

The output data is in radians, with NaNs placed at the proper locations. The output variable splitpts returns the row and column indices of the clipped elements (columns 1 and 2 respectively). These indices are necessary to restore the original data if the map parameters or projection are ever changed.

The object parameter can have any of the following values:

Object to clipDescription
'surface'graticules
'light'lights
'line'lines
'patch'patches
'text'text object location points
'point'point data
'none'skip all clipping operations

Version History

Introduced before R2006a

collapse all

R2024a: To be removed

The clipdata function issues a warning that it will be removed in a future release.

See Also

|