CRS conversion is off by 20 meter; how to correct

3 vues (au cours des 30 derniers jours)
Ferry Nieuwland
Ferry Nieuwland le 9 Sep 2022
Commenté : Ferry Nieuwland le 12 Déc 2022
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

Réponse acceptée

Kelly Luetkemeyer
Kelly Luetkemeyer le 9 Déc 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 commentaire
Ferry Nieuwland
Ferry Nieuwland le 12 Déc 2022
Hello Kelly,
Thanks for your support and suggestion. This solves my problem.
Kind Regards,
Ferry

Connectez-vous pour commenter.

Plus de réponses (0)

Tags

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by