isequal
R2026bCompare projcrs, geocrs, or
vertcrs objects for equivalence
Description
returns logical tf = isequal(crs1,crs2)1 (true) if the coordinate reference
systems (CRSs) are equivalent. Otherwise, it returns logical 0
(false).
Two
projcrsobjects are equivalent if they have the same geographic CRS, projection method, projection parameters, length unit, and vertical CRS.Two
geocrsobjects are equivalent if they have the same datum name, reference spheroid, prime meridian, angle unit, and vertical CRS.Two
vertcrsobjects are equivalent if they have the same datum, direction, and length unit.
The isequal function does not consider CRS names.
Examples
Input Arguments
Tips
If you expect two CRSs to be equivalent, but the
isequalfunction returns0(false), you can inspect the WKT strings for differences using thewktstringfunction.To compare only the 2-D parts of geographic or projected CRSs, set their
VerticalCRSproperties to[]before comparing them.