Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#13254 closed defect (fixed)

Deprecate proj4j plugin (eastNorth2latlon and latlon2eastNorth not thread safe)

Reported by: michael2402 Owned by: joshdoe
Priority: normal Milestone:
Component: Plugin proj4j Version:
Keywords: gsoc-core Cc: bastiK


We are running multiple threads in JOSM and with the new TileSource system, we will get parallel coordinate conversion in core. We may already have it in other places.

latlon2eastNorth and eastNorth2latlon both call transform. That method uses an object to store intermediate values and is not thread safe.

A quick fix would be to make both methods synchronized. I did not do any profiling, it may be better for performance reasons - especially when painting primitives - to have one transform per thread or a transform pool. It would be best to simply fix BasicCoordinateTransform of proj4j and make geoCoord a local variable.

Attachments (0)

Change History (5)

comment:1 Changed 7 years ago by Don-vip

Cc: bastiK added
Milestone: 16.07

No milestone for plugins.
@bastiK: can't we simply deprecate proj4j plugin? I don't remember if the projections rework is finished.

comment:2 Changed 7 years ago by bastiK

Yes, we can do that. The proj4j plugin has a couple more base projections (with varying degree of stability), but in terms of EPSG codes, there is only a single projection (EPSG:29101 - SAD69 / Brazil Polyconic) that is currently supported by the plugin, but not by JOSM core.

To be fair, one could easily add support for EPSG:4087, EPSG:4088, EPSG:5472, EPSG:5530 and EPSG:5880 by updating the resources/nad/epsg file. Nevertheless, nobody is using those at the moment, so we can consider the projection rework complete until there is a specific user request.

The plugin provides not only EPSG:* codes, but also a list of ESRI:* codes. As far as I can tell, the ESRI list is a proprietary fork of the EPSG list with minor additions and modifications and I'm not aware that it is are used by anyone in the JOSM "world".

comment:3 Changed 7 years ago by Don-vip

Summary: eastNorth2latlon and latlon2eastNorth not thread safeDeprecate proj4j plugin (eastNorth2latlon and latlon2eastNorth not thread safe)

ok let's do it :)

comment:4 Changed 7 years ago by Don-vip

Resolution: fixed
Status: newclosed

In 10708/josm:

fix #13254 - Deprecate proj4j plugin

comment:5 Changed 7 years ago by Don-vip

plugin sources removed in [o32758].

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain joshdoe.
as The resolution will be set.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.