How to view a shape file in matlab
31 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
John
am 24 Dez. 2012
Kommentiert: Harold Steven Buitrago Segura
am 29 Apr. 2022
Hello,
I have a .shp file of the country Ireland.
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?
Thank you
1 Kommentar
alessio grechi
am 18 Okt. 2018
Bearbeitet: alessio grechi
am 18 Okt. 2018
ciao. Sei riuscito a far visualizzare la mappa in MatLab?
Akzeptierte Antwort
José-Luis
am 24 Dez. 2012
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
6 Kommentare
José-Luis
am 24 Dez. 2012
If you are plotting a point, are you sure your Marker is large enough so you can see it, try a large size first
plot(x,y,'LineStyle','none','Marker','o','MarkerSize',20);
The map you are linking to does not appear to be in lat-long, it looks like UTM.
I don't know where you could find a suitable map, but google can help you. You could also look at worldmap() from Matlab.
Weitere Antworten (2)
Clelia Massarino
am 20 Sep. 2018
Hello,
I am having problem displaying the Germany map. My final goal is to have one with the elevation or at least different colors to discern different altitudes. I used the same code of you but it starts running endlessly. Any suggestion?
1 Kommentar
Alessandro Mura
am 21 Dez. 2021
@Clelia Massarino sei riuscito a cambiare i diversi colori della mappa della Germania? se si ti posso chiedere per favore lo script?
ti ringrazio
Siehe auch
Kategorien
Mehr zu Mapping Toolbox finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
