- projlist : https://www.mathworks.com/help/map/ref/projlist.html
- Projcrs : https://www.mathworks.com/help/map/ref/projcrs.html
- Projfwd: https://www.mathworks.com/help/map/ref/projcrs.projfwd.html
- PROJ: https://proj.org/en/stable/resource_files.html
Discrepancy in EPSG:3003 Coordinate Conversion Results in MATLAB
5 views (last 30 days)
Show older comments
Hi everyone,
I need to convert latitude and longitude coordinates to the EPSG:3003 coordinate system. I have written the following lines of code:
proj3003 = projcrs(3003);
posLLH = [43.7918028 11.2474672 0];
[posEPSG3003(1), posEPSG3003(2)] = projfwd(proj3003, posLLH(1), posLLH(2));
I get the following result:
posEPSG3003 = [1680827.953610798, 4851292.727994160]
posEPSG3003 = [1680850, 4851220]
Can anyone explain the reason for this discrepancy?
Thank you in advance for your help!
0 Comments
Answers (1)
Purvaja
on 2 May 2025
Edited: Purvaja
on 2 May 2025
Referring to your question, I understand that you're observing a discrepancy between the EPSG:3003 coordinate conversion results obtained using MATLAB's “projfwd” function and those from an online tool like EPSG.io.
Specifically, your MATLAB code yields:
posEPSG3003 = [1680827.953610798, 4851292.727994160];
whereas EPSG.io provides:
posEPSG3003 = [1680850, 4851220];
This discrepancy arises due to differences in the transformation parameters and methods used by MATLAB and EPSG.io. MATLAB's “projcrs” and “projfwd” functions rely on the PROJ library, which may use different default transformation paths or parameters compared to those employed by EPSG.io. These differences can lead to variations in the projected coordinates.
This documentation indicates that MATLAB is using PROJ library for conversion:
For more clarifications refer to following documentation links:
For version specific MATLAB documentation links type following commands in MATLAB command window:
web(fullfile(docroot, '/map/ref/projlist.html'))
web(fullfile(docroot, '/map/ref/projcrs.html'))
web(fullfile(docroot, '/map/ref/projcrs.projfwd.html'))
Hope this helps you!
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!