Mapshow shape files of different coordinates (distance and degrees decimals) using mapping tools in Matlab on each other

3 visualizaciones (últimos 30 días)
Hi ,
So I have these two shape files and wanted to plot both together using matlab mapping toolbox functions but the units of the coordinates are different so they are not plotting on each other. I tried some other functions but nothing is working.
Here are my simplest trial:
M0 = shaperead('M0PolygonLayer.shp');
land = shaperead('Canada Background.shp');
figure
hold on
mapshow(land,'FaceColor', [0.9 0.9 0.9]);
mapshow(M0,'FaceColor', [0.9 0.9 0.9], 'Linewidth',2);
%figure on left
plotting both sepeartely,
subplot(2,4,[1,1.8])
mapshow(land,'FaceColor', [0.9 0.9 0.9])
grid on;box on
subplot(2,4,[3.5,7,8])
mapshow(M0,'FaceColor', [0.9 0.9 0.9], 'Linewidth',2);
I tried deg = km2deg(km) to convert MO X and Y to deg but that did not work.
please help me.
Thank you.
KB

Respuestas (1)

Walter Roberson
Walter Roberson el 11 de Abr. de 2022
You should be passing referencing information to mapshow()
  6 comentarios
Walter Roberson
Walter Roberson el 22 de Abr. de 2022
Although I am from Canada, unfortunately I do not recognize the shape being contained by M0PolygonLayer.shp . It is not Canada as a whole; it is not any of the provinces. My guess from the shape is that it is one of the lakes, but not any of the largest lakes.
Because I do not recognize which part of Canada it is intended to be in from the shape, I am unable to guess what coordinate system is being used.
I can speculate that maybe 6.35*10^6 might maybe refer to 63.5N . If I scan along that latitude in Canada, I do not see any good matches.. but maybe it is left/right flipped of one of the lakes in North West Territory, such as near 118W ???
As you do not appear to have any information about where in Canada the M0 is located, then as outside observers, we have to assume that the M0 shape might be outlining a underground geological feature, such as the suspected boundaries of a mineral deposit. There is no way for us as outside observers to be able to place that on the map of Canada.
How do you know that the M0 shape is contained within Canada? Is there information inside the shp file that tells you that? Is there a documentation page where you obtained the shp file that might happen to have a clue about which part of Canada it is?
B
B el 22 de Abr. de 2022
Hi Walter, Thanks for the concern. I am happy to inform you that I have been able to resolve the problem using projcrs,projin, projfwd and geoplot functions. I really appreciate your response.
KB

Iniciar sesión para comentar.

Productos


Versión

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by