Shapefile distorted on World Map
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I have two shapefiles that are projected correctly on the "flat map" but get distorted when I project them on World Map. I'm assuming this is a simple projection problem but I'm not sure if it is an issue with my shapefiles or with how I'm projecting onto World Map. In the images, the grey areas represent my two shapefiles.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/197456/image.jpeg)
"Flat Map" Code:
geoshow('landareas.shp', 'FaceColor', [0.5 0.7 0.5],'DefaultEdgeColor', 'k');
geoshow('Shape1.shp','facealpha',.5)
geoshow('Shape2.shp','facealpha',.5)
World Map Code:
ax = worldmap('World');
land = shaperead('landareas', 'UseGeoCoords', true);
geoshow(ax, land, 'FaceColor', [0.5 0.7 0.5])
afr=shaperead('shape1','UseGeoCoords',true);
geoshow(ax,afr,'FaceColor',[0.5,.5,.5],'FaceAlpha',0.5)
south=shaperead('shape2','UseGeoCoords',true);
geoshow(ax,south,'FaceColor',[0.8,.8,.8],'FaceAlpha',0.5)
0 comentarios
Respuestas (1)
ANKUR KUMAR
el 10 de Oct. de 2018
"I'm not sure if it is an issue with my shapefiles or with how I'm projecting".
Its only because of projection, the continental boundaries seems to be slight tilted towards the pole. You can use m_map to plot these things. m_map does the thing in an efficient manner along with the overlying contour in all projections. Have a look over m_map html sample documentation .
Or you can use shaperead command to read longitude - latitude values and plot using simple plot command.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!