Question

I am looking for a function to read/write points, lines and polygons from ESRI's shapefile format (as used in Arcview) for use in Matlab

Was it helpful?

Solution

From the Matlab mapping toolbox, use the shaperead function

For example download the NOAA Interstate Highway shape file here, extract and then read data into Matlab using the function, S = shaperead('in101503.shp');

OTHER TIPS

If you do not have the Matlab mapping toobox, the very useful m_map package now has an m_shaperead() function which does a good job of reading shapefiles.

X = m_shaperead('filename'); % for filename.(dbf,shp,...)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top