CRS conversion is off by 20 meter; how to correct

5 views (last 30 days)
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

Accepted Answer

Kelly Luetkemeyer
Kelly Luetkemeyer on 9 Dec 2022
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 Comment
Ferry Nieuwland
Ferry Nieuwland on 12 Dec 2022
Hello Kelly,
Thanks for your support and suggestion. This solves my problem.
Kind Regards,
Ferry

Sign in to comment.

More Answers (0)

Tags

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!