[josm-dev] Proj4J - New plugin supporting 3000+ projections
Frederik Ramm
frederik at remote.org
Fri Feb 25 09:09:34 GMT 2011
Hi,
On 02/25/2011 05:10 AM, Josh Doe wrote:
> Perhaps my sensationalist subject line turned people off from this.
> Any chance this could get added to the svn? I'd like to submit patches
> against that rather than continually updating the zip on the ticket.
> I'd do so myself, but I don't want to be presumptuous and ask for an
> svn account.
Go ahead and request an OSM SVN account, it's nothing presumptuous.
I see some trouble coming up when this plugin interacts with other
stuff, like the tile/WMS backgrounds and the ImportImage or PDF plugins.
These problems already exist - your plugin doesn't create them; it's
just that your plugin opens the door to people using all kinds of
strange projections and believing that was "supported".
Problems I suspect may arise:
* Selecting a projection that is only valid for a small part of the
world (indeed, most of the "3000+" will not work for the whole planet)
and then zooming out - what will happen? Do you actually include the
validity bounding boxes for each and switch back to plain Mercator
outside of that area?
* Imagery subsystem (tile/WMS) is likely to, at best, squish or stretch
images, but will not properly reproject them, which will lead to
noticeable inaccuracies especially on low to medium zoomlevels. The kind
of inaccuracy depends on the projection chosen. For example, if you set
JOSM ot 4326 then request tiles from a Mercator tile server, the middle
section of each tile will be displaced towards the equator. This effect
is probably more pronounced with other source/destination combinations.
* ImportImage plugin contains its own projection library which (a) may
be partly unnecessary if your plugin is loaded - maybe ImportImage could
be made to depend on yours? - and (b) it tries to reproject loaded
images to the display projection, one should try if this really works
with the usual projections.
* Gauss-Krueger proejctions commonly used in Germany are not processed
by proj.4 accurately unless an extra grid file (BETA2007.gsb) is used,
see
http://osgeo-org.1803224.n2.nabble.com/gdal-dev-Re-ogr2ogr-BeTA2007-grid-td4900463.html
- will that be possible with your plugin?
* I have no clue what the PDF import plugin does if your viewport is
projected. I assume that there's a whole host of plugins assuming that
you can just scale an image to the viewport and it will somehow
magically work.
Don't let these points discourage you from continuing your work, it is
most appreciated. I would just advise some caution when saying that
certain projections are now "supported" as this will naturally lead
users to believe that "everything still works" if they select that
projection - which may not always be the case :)
Bye
Frederik
More information about the josm-dev
mailing list