MATLAB Answers


Where can I find data providing state and province boundaries for Mexico and Canada respectively for use with the Mapping Toolbox?

I have an application that requires me to depict data all over the United States. I was able to obtain state boundaries for United States using the USALO and USAHI functions and the MAT-Files of the same name. Sometimes, my data extends beyond the United States and crosses into Mexico and Canada. I would like to obtain data providing the state/province boundaries for Mexico and Canada respectively in order to map such data.

1 Answer

Answer by MathWorks Support Team on 17 Apr 2019
Edited by MathWorks Support Team on 17 Apr 2019
 Accepted Answer

This change has been incorporated into the documentation in Release 14 Service Pack 3 (R14SP3). For previous releases, read below for any additional information:
The following website provides information relelvant to your application:
From here, you can download "", which contains a shapefile consisting of the province boundary data for Canada. The SHAPEREAD command can be used to import this file into MATLAB. The file "" in the same directory contains a shapefile MX_STATE.SHP which provides state boundaries for Mexico.
The coordinates of this data are latitude-longitude, so the following syntax of SHAPEREAD can be used to read in the data correctly:
s = shaperead('MX_STATE.SHP','UseGeoCoords',true);
Please note that as of Mapping 2.1 (R14SP2), the USAHI and USALO functions and associated MAT-files are no longer shipped. However, the data from those MAT-files does still ship with the Mapping Toolbox in shapefile format. See solution 1-12MDM2 for details.
See the following Tech Note for more information on accessing geospatial data, including many publicly available Internet resources.
Accessing Geospatial Data on the Internet for the Mapping Toolbox.


Sign in to comment.