CRS conversion is off by 20 meter; how to correct

3 次查看(过去 30 天)
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