#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 |
Description
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 by , 8 years ago
Cc: | added |
---|---|
Milestone: | 16.07 |
comment:2 by , 8 years ago
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 by , 8 years ago
Summary: | eastNorth2latlon and latlon2eastNorth not thread safe → Deprecate proj4j plugin (eastNorth2latlon and latlon2eastNorth not thread safe) |
---|
ok let's do it :)
No milestone for plugins.
@bastiK: can't we simply deprecate proj4j plugin? I don't remember if the projections rework is finished.