Opened 12 months ago
Last modified 12 months ago
#23303 needinfo defect
Magnetic declination is not considered for drawing the image arrows on photos
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Core image mapping | Version: | latest |
Keywords: | template_report | Cc: |
Description
What steps will reproduce the problem?
- Load geotagged images with direction in the EXIF
- Click on a photo and check the arrow drawn next to it.
What is the expected result?
The drawn arrow should point in the correct direction of the photo taken.
What happens instead?
The arrow direction is offseted depending of the geolocation and the date because the magnetic north is not the true/geographical north on the map. (example offset map)
Please provide any additional information below. Attach a screenshot if possible.
The source file geoimage/GeoImageLayer.java:528 should add the magnetic declination in order to have a correct geographical direction.
For example OsmAnd adds the declination by getting it from android.hardware.GeomagneticField, which uses a downloaded model for the calulation (like https://www.ngdc.noaa.gov/geomag/calculators/magcalc.shtml ).
JOSM should use a similar offline model or query the values from a public api based on the photo time and gps coordinates.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2023-08-29 13:38:40 +0200 (Tue, 29 Aug 2023) Revision:18822 Build-Date:2023-08-30 01:30:57 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (18822 en) Linux Debian GNU/Linux trixie/sid Memory Usage: 334 MB / 4096 MB (179 MB allocated, but free) Java version: 17.0.9-ea+6-Debian-1, Debian, OpenJDK 64-Bit Server VM Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel Screen: :0.0 3840×2160 (scaling 1.00×1.00) Maximum Screen Size: 3840×2160 Best cursor sizes: 16×16→16×16, 32×32→32×32 Environment variable LANG: en_US System property file.encoding: UTF-8 System property sun.jnu.encoding: UTF-8 Locale info: en_US Numbers with default locale: 1234567890 -> 1234567890 Desktop environment: XFCE Java package: openjdk-17-jre:amd64-17.0.9~6ea-1 Java ATK Wrapper package: libatk-wrapper-java:all-0.38.0-1 libcommons-compress-java: libcommons-compress-java:all-1.22-1 libcommons-logging-java: libcommons-logging-java:all-1.2-2 fonts-noto: fonts-noto:all-20201225-1 VM arguments: [--module-path=/usr/share/openjfx/lib, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, -Djosm.restart=true, -Djava.net.useSystemProxies=true, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED] Plugins: + FastDraw (36126) + HouseNumberTaggingTool (36178) + ImportImagePlugin (36184) + Mapillary (2.2.0) + PicLayer (1.0.3) + RoadSigns (36126) + apache-commons (36176) + apache-http (36176) + buildings_tools (36178) + ejml (36176) + geotools (36176) + imagery_offset_db (36126) + jackson (36176) + jaxb (36118) + jna (36176) + jts (36004) + log4j (36176) + measurement (36126) + photoadjust (36188) + reverter (36126) + tageditor (36126) + turnlanes-tagging (0.0.5) + turnrestrictions (36178) + undelete (36126) + utilsplugin2 (36178) Tagging presets: + https://raw.githubusercontent.com/yopaseopor/traffic_signs_preset_JOSM/master/HU.zip Map paint styles: - https://josm.openstreetmap.de/josmfile?page=Styles/HU-HighlightHikingTrailSigns&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/LayerChecker&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Modified&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Enhanced_Lane_and_Road_Attributes&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Lane_features&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/FixmeAndNote&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Streets&zip=1 + /tmp/elemstyles-bigfont.mapcss Validator rules: + https://josm.openstreetmap.de/josmfile?page=Rules/OSMLint&zip=1 Last errors/warnings: - 00004.679 E: Failed to locate image 'traffic_signs/HU/HU_C-031.png.png' - 00004.680 W: No overtaking: Could not get presets icon traffic_signs/HU/HU_C-031.png.png
Attachments (0)
Change History (3)
comment:1 by , 12 months ago
Owner: | changed from | to
---|---|
Status: | new → needinfo |
comment:2 by , 12 months ago
Current phones store quite accurate directions and it is clearly visible that the arrow is systematically wrong - depending of course on the location you are. A lower effort solution could be to let the user add a fix offset angle to the geotagged images layer.
comment:3 by , 12 months ago
In the US, the maximum declination is 14 degrees.
The max where people are likely to be is 26 degrees.
It might not be a bad idea to have an interface which a plugin could use to correct magnetic declination. Of course, someone has to either provide a patch or work on it.
@rexendor: If you really want that functionality, please provide a patch (see wiki:DevelopersGuide/PatchGuide). I have higher priority items to work on right now (example: #23286).
Things to note:
- We generally don't like adding additional libraries to JOSM core. Plugins can do whatever they want.
Why? The difference is not worth the effort for photo aligning. Which user takes photos with an direction accuracy that this starts to get a meaning? What's the use-case?