Main Content


Concatenate geographic or planar vector



v = cat(1,v1,v2,...) concatenates the geographic or planar vectors v1,v2, and so on, along the first dimension. If the class type of any property is a cell array, then the resultant field in the output v is also a cell array.


collapse all

Create two geopoint vectors. The first vector has one feature, and the second vector has two features. The vectors have different dynamic properties.

gp1 = geopoint(52,-101, 'Weather','Cloudy');
gp2 = geopoint([42 42.2], [-110.5 -110.7], 'Temperature', [65.6 63.2]);

Concatenate the vectors into a single geopoint vector. Note that the first input argument must be 1.

p = cat(1,gp1,gp2)
p = 
 3x1 geopoint vector with properties:

 Collection properties:
       Geometry: 'point'
       Metadata: [1x1 struct]
 Feature properties:
       Latitude: [52 42 42.2000]
      Longitude: [-101 -110.5000 -110.7000]
        Weather: {'Cloudy'  ''  ''}
    Temperature: [0 65.6000 63.2000]

The concatenated vector has three features, and all features have all dynamic properties. Default property values are used when the value was not specified in the original geopoint vector. For example, the 'Temperature' value of the first feature is set to 0 since no 'Temperature' value was specified in gp1.

Input Arguments

collapse all

Geographic or planar vectors to be concatenated, specified as geopoint, geoshape, mappoint, or mapshape objects. All of v1, v2,… are the same type of object.

Output Arguments

collapse all

Concatenated geographic or planar vector, returned as a geopoint, geoshape, mappoint, or mapshape object. The object type of v matches the object type of v1,v2,....

Version History

Introduced in R2012a

See Also