Shapefile distorted on World Map
6 次查看(过去 30 天)
显示 更早的评论
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.
"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 个评论
回答(1 个)
ANKUR KUMAR
2018-10-10
"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.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!