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
0 个评论
采纳的回答
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")
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!