Registered Member
|
Hi,
I am developing an apps using marble. It supports some projections such as Spherical, Equirectangular, Mercator, ... I know that the Mercator projection Marble using is Normal Mercator Projection, not Universal Transverse Mercator (UTM). Does anyone know how to use UTM projection? Thanks, |
KDE Developer
|
Hi,
If you are referring to the UTM coordinate system - currently there is just support for the UTM grid: Settings->Configure Marble Then in the "Unit" section switch "Angle" to UTM. This will make the Graticule render the major UTM zones. For further UTM support (i.e. displaying UTM coordinates on hover, search for UTM positions in the query) we'd gladly accept patches (That would probably mostly require a patch to the GeoDataCoordinates class). |
KDE Developer
|
If you want to add further support it would be very much welcome.
Check out the the Marble source code (https://marble.kde.org/sources.php). In order to enable UTM mode, see my prior post. A) Displaying UTM coordinates (e.g. if you enable the status bar or click an item on the map) Initially I guess it would be best if we had a more accurate implementation of QString GeoDataCoordinates::lonToString( ) and QString GeoDataCoordinates::latToString( ) See lines 938 and 1085 inside src/lib/marble/geodata/data/GeoDataCoordinates.cpp where UTM is mentioned and where a stub implementation is provided already. I just checked whether the current implementation seems to work but at least for me it just displays always "30,N" (maybe a regression?) B) Interpreting search queries e.g. when you enter a UTM coordinate in the Marble Search Query: This would require to add UTM support inside src/lib/marble/geodata/data/GeoDataCoordinates.cpp to bool LonLatParser::parse( const QString& string ) C) Improving the Graticule: That would require to improve the implementation inside src/plugins/render/graticule/GraticulePlugin.cpp. , line 311 |
Registered Member
|
Hi!
I have done some work concerning these issues. It's just the first approach but, by now, the code is able to calculate the zone and latitude bands (only the regular ones). I copy here the relevant code so far:
Furthermore, the equator, meridian and antimeridian lines are now drawn in UTM mode. The lines and the proper calculation of zone/latitude band are seen in the following screenshot: The code does not calculate the exceptions in the latitude bands nor the precise coordinate position yet. There are also some grid labels that does not appear. Once I got those things working, I'll submit a Review Request. |
KDE Developer
|
You can find the review request at https://git.reviewboard.kde.org/r/123579/
|
Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, Sogou [Bot]