You are here: > ESRI Forums > arcview 3.x users discussion forums > Thread Replies

ArcView 3.x Users Discussion Forums

ArcView GIS - Core program forum

Import Shapefiles to Matlab   Padraig Corcoran Aug 14, 2003
Re: Import Shapefiles to Matlab   Dan Patterson Aug 14, 2003
Re: Import Shapefiles to Matlab   Padraig Corcoran Aug 14, 2003
Re: Import Shapefiles to Matlab   William Huber Aug 14, 2003
Re: Import Shapefiles to Matlab   Padraig Corcoran Aug 15, 2003
Re: Import Shapefiles to Matlab   William Huber Aug 15, 2003
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Import Shapefiles to Matlab 
Author Padraig Corcoran 
Date Aug 14, 2003 
Message Hi
I am working on a project that involves matlab and arcview 3.x and I need to import shapefiles into matlab. Does anyone know if this can be done?
please help
thanx in advance 
  Padraig Corcoran
NUI Maynooth 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Import Shapefiles to Matlab 
Author Dan Patterson 
Date Aug 14, 2003 
Message Have you searched

http://www.mathworks.com/index.shtml

If it works with tabular data, then the dbf file can be imported. There was no hits on shapefile but several on ESRI 
  Geomatics, Carleton University, Ottawa, Canada 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Import Shapefiles to Matlab 
Author Padraig Corcoran 
Date Aug 14, 2003 
Message thanx Dan
I have searched the mathworks site but to no avail. Does a toolbox or m file(s) exist that will perform this task. thanx again 
  Padraig Corcoran
NUI Maynooth 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Import Shapefiles to Matlab 
Author William Huber 
Date Aug 14, 2003 
Message You can certainly plot shapefile features in Matlab. Export the shapefile node coordinates and feature ids into an ASCII file, read those into Matlab (use 'csvread' or 'textread'), and use its 'plot' command to display them, specifying a different 'linespec' for each feature id.

Exporting node coordinates is easy; I believe several utilities on ArcScripts will generate tables of nodes and you can go from there.

As far as I can tell, though, Matlab does not read shapefiles directly. 
  --Bill Huber
Quantitative Decisions (http://www.quantdec.com )
More GIS Q&A at http://gis.stackexchange.com/q/3083/664 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Import Shapefiles to Matlab 
Author Padraig Corcoran 
Date Aug 15, 2003 
Message cheers William
I got that done. What I am trying to do in matlab is extract the part of an image that a vector overlays. I know this is not an arcview question but could u point me in the right direction please, of how to perform this task. thanx again 
  Padraig Corcoran
NUI Maynooth 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Import Shapefiles to Matlab 
Author William Huber 
Date Aug 15, 2003 
Message For importing the image, see the imread function.

There's complete documentation online at http://www.mathworks.com/access/helpdesk/help/techdoc/matlab.shtml .

I am not at all familiar with Matlab--I have never used it--and so cannot tell you whether Matlab can extract portions of images. (I am doubtful, but you never know...) You can do this with Spatial Analyst, of course.

There's also a "Mapping Toolbox" add-on to Matlab that implements some limited GIS capabilities. Visit the MatLab HelpDesk page for more information. 
  --Bill Huber
Quantitative Decisions (http://www.quantdec.com )
More GIS Q&A at http://gis.stackexchange.com/q/3083/664