CRS conversion is off by 20 meter; how to correct

조회 수: 5 (최근 30일)
Ferry Nieuwland
Ferry Nieuwland 2022년 9월 9일
댓글: Ferry Nieuwland 2022년 12월 12일
Hello community,
I have used the "projinv" function to convert a [X,Y] coordinate in Rijksdriehoek coordinatesystem (projcrs = 28992) to [lat,lon]. However, the converted point is about 20 meter of from where it should be, see attached pdf for script and plot with the problem. How can this be corrected? Any suggestion? Should I use a different projcrs identifier? Any suggestion where to find a list of available projcrs systems that I could test?
Kind Regards,
Ferry

채택된 답변

Kelly Luetkemeyer
Kelly Luetkemeyer 2022년 12월 9일
HI Ferry,
The basemaps used by geographic axes are in a Web Mercator (WGS84) map projection. Your data are in the Amersfoort/RD projected coordinate refernece system. You can place your coordinate data into a geographic point shape object and set the GeographicCRS object and then use geoplot. Here is the modified code that plots the point as intended. You can see the difference below. geoplot(lat,lon) assumes the latitude/longitude values are in WGS84. The point in red is in the corrected location.
name = 'openstreetmap';
url = 'a.tile.openstreetmap.org';
copyright = char(uint8(169));
attribution = copyright + "OpenStreetMap contributors";
addCustomBasemap(name,url,'Attribution',attribution);
x = 155000;
y = 463000;
p = projcrs(28992);
[lat,lon]=projinv(p,x,y);
shape = geopointshape(lat,lon);
shape.GeographicCRS = p.GeographicCRS;
figure
geobasemap openstreetmap
geoplot(lat,lon,"Marker","o","MarkerSize",25,"MarkerFaceColor","blue","Color","blue")
gx = gca;
gx.InnerPosition = gx.OuterPosition;
gx.ZoomLevel = 17;
hold on
geoplot(shape,"Marker","o","MarkerSize",25,"MarkerFaceColor","red")
  댓글 수: 1
Ferry Nieuwland
Ferry Nieuwland 2022년 12월 12일
Hello Kelly,
Thanks for your support and suggestion. This solves my problem.
Kind Regards,
Ferry

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by