Modify

Opened 7 years ago

Last modified 3 weeks ago

#7966 new defect

georef images wrong displayed after switching to correct projection

Reported by: skyper Owned by: rebsc
Priority: normal Milestone:
Component: Plugin piclayer Version:
Keywords: Cc:

Description (last modified by skyper)

  1. load .zip file containing jpeg + ref file in mercator projection
  2. switch to correct projection (Gauß-Krüger 3).

The picture(s) are misaligned which is really obvious if using several. Seems to exist for a long time and is 100% reproducable with Aerowest pictures.

First switching to correct projection and then opening the files works perfectly.

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2012-08-15 01:31:10
Last Changed Author: akks
Revision: 5443
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2012-08-14 10:07:01 +0200 (Tue, 14 Aug 2012)
Last Changed Rev: 5443

Identification: JOSM/1.5 (5443 de)
Memory Usage: 976 MB / 976 MB (537 MB allocated, but free)
Java version: 1.6.0_24, Sun Microsystems Inc., OpenJDK 64-Bit Server VM
Operating system: Linux
Dataset consistency test: No problems found

Plugin: PicLayer (27883)
Plugin: utilsplugin2 (28551)

Attachments (0)

Change History (11)

comment:1 Changed 7 years ago by skyper

Description: modified (diff)

comment:2 Changed 7 years ago by Larry0ua

I see PicLayer code uses Main.getProjection() to convert to/from screen and latlon coordinates. Which behavior is needed?

Should I cache projection and tie it to picture layer and not share them between different layers?

How can I get projection name from world file (or what is used in that archive?)

How can I translate projection name to Projection using JOSM core to support future adding of some rare projections? I see only ProjectionPreferences that could work for me, but it is really not easily extendable and configurable

comment:3 Changed 7 years ago by Larry0ua

related to #7144

comment:4 in reply to:  2 Changed 7 years ago by bastiK

Replying to Larry0ua:

I see PicLayer code uses Main.getProjection() to convert to/from screen and latlon coordinates. Which behavior is needed?

Should I cache projection and tie it to picture layer and not share them between different layers?

You can either register a ProjectionChangeListener, like in MultipolygonCache, or save the projection and check on each access, like in CachedLatLon.

How can I get projection name from world file (or what is used in that archive?)

World file does not contain a projection, it assumes, that the projection is already known. Especially for the Aerowest imagery, there is no hint in the zip archive.

How can I translate projection name to Projection using JOSM core to support future adding of some rare projections? I see only ProjectionPreferences that could work for me, but it is really not easily extendable and configurable

That depends on what you mean by projection name. There is Projection.toCode and ProjectionInfo.getProjectionByCode for example.

comment:5 Changed 7 years ago by Larry0ua

Can you show scenario when projection is changed with some more details? I mean with files (or links to the files) and steps - when any projection is changed and what is the expected result on the each step. Sorry, I still cannot get what the issue is

comment:6 Changed 7 years ago by bastiK

  • Open any image with PicLayer, move it to a certain place (align against Bing or OSM background).
  • Go to preferences (F12), 3rd tab. Change map projection to something else, e.g. WGS84 or the UTM zone for your region.

Result: Image is moved to a random place on earth, there are no longer the same coordinates (lat/lon) in the center of the image.

comment:7 Changed 7 years ago by Larry0ua

appreciate any help with this bug - simple caching of Projection object did not help.

comment:8 Changed 7 years ago by skyper

Strange, today it worked changing from Mercator to Gauß-Krüger 3. I have to say though that the images have never been displayed with mercator but that is fine.

Last edited 7 years ago by skyper (previous) (diff)

comment:9 Changed 7 years ago by skyper

Can not reproduce. At least my part seems to be fixed.

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2012-10-05 01:31:10
Last Changed Author: bastiK
Revision: 5530
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2012-10-04 23:31:21 +0200 (Thu, 04 Oct 2012)
Last Changed Rev: 5530

Identification: JOSM/1.5 (5530 de)
Memory Usage: 610 MB / 610 MB (198 MB allocated, but free)
Java version: 1.6.0_24, Sun Microsystems Inc., OpenJDK 64-Bit Server VM
Operating system: Linux
Dataset consistency test: No problems found

Plugin: PicLayer (28660)
Plugin: terracer (28656)
Plugin: utilsplugin2 (28656)

comment:10 Changed 7 years ago by skyper

As my part is fixed this seems to be a duplicate of #7144.

comment:11 Changed 3 weeks ago by Don-vip

Owner: changed from Larry0ua to rebsc

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain rebsc.
as The resolution will be set.
to The owner will be changed from rebsc to the specified user.
The owner will change to skyper
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from rebsc to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.