How to view a shape file in matlab

A
alessio grechi · Jan 11, 2022 · 2.2K views
Question
Hello,   I have a .shp file of the country Ireland.   This is the file    I read the file into matlab using the code:   S = shaperead('Ireland.shp') My question is how can I view the map?   I would appreciate it if anybody had the time to show me.   Also, is it possible to overlay GPS data on a file of this type?  
Expert Answer
Profile picture of John Michell
John Michell PhD Expert
Answered Nov 20, 2025
 doc mapshow

It can be as simple as:

 S = shaperead(filename);
 mapshow(S);

As long as you have latitude and longitude, you can plot pretty much anything

 doc plotm

 

Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!