Modify

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#6104 closed defect (wontfix)

Umstellung interne Einheit im JOSM / PicLayer Plugin (v25219)

Reported by: osm_project@… Owned by: team
Priority: normal Milestone:
Component: Plugin piclayer Version: latest
Keywords: Cc: saerdnaer

Description

Nach der Umstellung der internen Einheit beim JOSM

(Hintergrund: Bei der Berechnung von EPSG:3857 hat JOSM bisher eine
falsche Einheit benutzt. Eigentlich sollte das Ergebnis in Metern
sein, JOSM hat bisher intern immer Radiant-Werte verwendet. Der
fehlende Faktor von 6378137 wurde in r3922 eingefügt und hat
eigentlich keine praktischen Auswirkungen, außer dass die
gespeicherten Offset Werte nun nicht mehr stimmen. Eine automatische
Migration wurde in r3962 eingebaut.)

Gruß, Sebastian

sind im PicLayer Plugin (v25219) vor einigen Wochen gespeicherte Kallibrierungs-Dateien nicht mehr einlesbar (Absturz im JOSM beim Laden von Bildern). Neu erzeugte Kallibierungs-Files scheinen zu funktionieren. Hier scheint die automatische Migration von r3962 nicht zu greifen.

Absturz Fehlermeldung mit JOSM latest (version 3978):

java.lang.NullPointerException
        at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
        at java.lang.Double.valueOf(Unknown Source)
        at org.openstreetmap.josm.plugins.piclayer.PicLayerAbstract.loadCalibration(PicLayerAbstract.java:386)
        at org.openstreetmap.josm.plugins.piclayer.PicLayerAbstract.loadCalibration(PicLayerAbstract.java:368)
        at org.openstreetmap.josm.plugins.piclayer.PicLayerFromFile.createImage(PicLayerFromFile.java:105)
        at org.openstreetmap.josm.plugins.piclayer.PicLayerAbstract.initialize(PicLayerAbstract.java:134)
        at org.openstreetmap.josm.plugins.piclayer.NewLayerFromFileAction.action Performed(NewLayerFromFileAction.java:114)
        at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
        at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
        at javax.swing.AbstractButton.doClick(Unknown Source)
        at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
        at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
        at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
        at java.awt.Component.processMouseEvent(Unknown Source)
        at javax.swing.JComponent.processMouseEvent(Unknown Source)
        at java.awt.Component.processEvent(Unknown Source)
        at java.awt.Container.processEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Window.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$000(Unknown Source)
        at java.awt.EventQueue$1.run(Unknown Source)
        at java.awt.EventQueue$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue$2.run(Unknown Source)
        at java.awt.EventQueue$2.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

Alte (jetzt defekte) Kalibrierungs-Datei:

#JOSM PicLayer-Plugin Kalibrierdatendaten
#Fri Feb 04 06:59:44 CET 2011
POSITION_X=0.14533825983355894
POSITION_Y=1.0070853419907346
INITIAL_POS_X=0.14550347025292631
INITIAL_POS_y=1.0071632482888404
INITIAL_SCALE=232.27531607375366
SCALEY=0.06655494220503104
SCALEX=0.061780312308595674
ANGLE=0.0

Neu angelegte (funktionierende) Kalibrierungs-Datei:

#JOSM PicLayer-Plugin Kalibrierdatendaten
#Thu Mar 10 19:15:10 CET 2011
POSITION_X=926981.620019931
POSITION_Y=6423331.957815339
INITIAL_POS_X=926980.5097618777
INITIAL_POS_y=6423251.908910746
INITIAL_SCALE=108.29959475335929
SCALEY=0.14434924197475973
SCALEX=0.14011428763110947
SHEARX=0.0
SHEARY=0.0
ANGLE=0.0

TimG

Attachments (0)

Change History (7)

comment:1 by stoecker, 13 years ago

Component: CorePlugin piclayer

comment:2 by anonymous, 13 years ago

Kann ich die .cal Files irgendwie manuell konvertieren?

comment:3 by saerdnaer, 13 years ago

Cc: saerdnaer added

comment:4 by osm_project@…, 13 years ago

vermutlich so:

POSITION_X (neu) = POSITION_X (alt) * 6378137
POSITION_Y (neu) = POSITION_Y (alt) * 6378137
INITIAL_POS_X (neu) = INITIAL_POS_X (alt) * 6378137
INITIAL_POS_Y (neu) = INITIAL_POS_Y (alt) * 6378137

ob die SCALE-Werte auch betroffen sind weis ich leider nicht

comment:5 by bastiK, 13 years ago

Resolution: wontfix
Status: newclosed

Apparently, no one will fix this, sorry. The suggested manual correction should work.

comment:6 by saerdnaer, 13 years ago

Naja, man müsste in die in http://josm.openstreetmap.de/changeset/3962/josm eingeführen Schwellwerte nur anpassen. Also 2x 1E-3 durch 1 ersetzen.
Wobei, wenn der Umrechnungsbeschreibung oben stimmt sollte auch, noch center{X,Y} anpassen. Hier mal ein Vorschlag: (sorry, hab leider grad keinen Checkout zum Patch erstellen da)

69	        }
70	        // Mercator scale factor migration
71	        if (proj instanceof Mercator && Math.abs(this.dx) < 1 && Math.abs(this.dy) < 1) {
72	            this.dx *= 6378137;
73	            this.dy *= 6378137;
                    this.centerX = *= 6378137;
                    this.centerY *= 6378137;
74	        }

Aber ich habe nicht wirklich Überblick über den Code und weis daher nicht was das sonst noch für Auswirkungen hat. Ich fix meine cal Files halt jetzt manuell.

Last edited 13 years ago by saerdnaer (previous) (diff)

in reply to:  4 comment:7 by saerdnaer, 13 years ago

Replying to osm_project@…:

vermutlich so:

POSITION_X (neu) = POSITION_X (alt) * 6378137
POSITION_Y (neu) = POSITION_Y (alt) * 6378137
INITIAL_POS_X (neu) = INITIAL_POS_X (alt) * 6378137
INITIAL_POS_Y (neu) = INITIAL_POS_Y (alt) * 6378137

Ist hiermit bestätigt, zusätzlich muss man noch

SHEARX=0.0
SHEARY=0.0

mit an die Datei anfügen

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.