Re: [josm-dev] Save file dialog

2008-07-08 Thread Dirk Stöcker
On Mon, 7 Jul 2008, Frederik Ramm wrote:

>> I need to add osm/gpx file extension seperation (first three files).
>
> Why?
>
> Currently, you *can* save any OSM layer as a GPX file. It seems to me
> that your code would disable this feature, woudln't it?

No. It wouldn't.

Currently when you save a GPX layer and enter "test", then josm makes 
test.osm from this and later complains about invalid extension. The patch 
now adds "osm" for OSM and "gpx" for GPX files. As this is only the 
default extension, adding gpx for saving an OSM file is still possible. 
The result will be a GPX file? What's the purpose of this?

This is actually what the bug report really is about - saving GPX, not 
OSM.

Additionally I introduced a title line, so the dialog now tells you, 
whether you save GPX or OSM (Because until I researched for this bug I 
did not know, that selecting a different layer affects saving). And the 
bug clearly tells me I'm not the only one.

Ciao
-- 
http://www.dstoecker.eu/ (PGP key available)

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/josm-dev


Re: [josm-dev] Landsat tiled WMS support for wmsplugin implemented

2008-07-08 Thread Bodo Meissner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,

I tried to send this message with the big patch included but it did not appear 
on the list.
That's why I send it again but include only download links to the files.

The patch is available at
http://bodo-m.de/josm/wmsplugin.patch.txt
(For some files the patch wants to replace the whole file and does not show the 
individual changes, probably because of different UNIX/DOS line endings.)

A modified version of the .jar file created from my sandbox is available at.
http://bodo-m.de/josm/wmsplugin.jar


Bodo (bomm)

Bodo Meissner schrieb:

> Hello,
> 
> I have implemented an extension for wmsplugin to support the tiled WMS 
> operation mode of the Landsat WMS server as specified on
> http://onearth.jpl.nasa.gov/tiled.html
> 
> Before committing this to SVN I would like to get some feedback.
> 
> Implementation overview:
> 
> WMSGrabber now requests GetCapabilities and partially parses the response 
> into a WMSCapabilities object.
> If the server supports the GetTileService request it will perform this 
> request and parse the response into a tree of objects from wmsplugin.tiledwms.
> The root of the tree is a TiledPatterns object that contains TiledGroup 
> objects. A TiledGroup can contain other TiledGroup objects or TilePattern 
> objects. TiledPatterns, TileGroup and TilePattern correspond to XML tags in 
> the GetTileService response. A TilePattern tag contains one or more WMS 
> request strings that will be parsed into WMSRequest objects.
> 
> If the WMS server supports tiled WMS, the images will be grabbed with 
> WMSGrabber.grabTiled() instead of WMSGrabber.grab().
> grabTiled() looks for the best matching WMS access pattern from the 
> TiledPatterns structure. To find the best match, I first select all 
> compatible patterns, i.e. patterns that have the same parameter values except 
> coordinates (bbox) and image size (width, height). From the compatible 
> patterns I select the pattern with the image resolution nearest to the 
> requested resolution. If available I use the smallest resolution greater than 
> or equal to the requested resolution, otherwise I use the highest available 
> resolution.
> From the best pattern, a set of requests is generated to get one or more 
> tiles of fixed size that fully cover the requested area and an area of images 
> is returned.
> 
> If the WMS server does not support tiled WMS or this mode is disabled or if 
> no matching pattern is found, grabTiled() falls back to a normal WMS request 
> using grab().
> 
> Additionally to the tiled WMS operation, I added a flag to the preferences to 
> enable/disable tiled WMS mode and a "Clone" button to create a new entry from 
> an existing one. With this it is easy to create tiled/normal variants of the 
> same WMS server.
> 
> 
> 
> Currently the Landsat WMS server seems to work for non-tiled requests.
> When I download the same area using both tiled and normal WMS, there are some 
> small differences between the images in these two layers.
> I don't know yet the reason for this. It might be JOSM stretching individual 
> tiles instead of stretching a larger image or a different interpretation of 
> coordinates and image size between JOSM and the WMS server. (When I specify 
> the coordinates bounding box of the image, is this the center of the corner 
> pixels or the outer corner of these pixels?)
> 
> 
> If you want to test the tiled WMS access I suggest to clone the Landsat entry 
> and enable "use tiled".
> If everything is OK, I will change the default to "use tiled" in the final 
> version, so it will use tiled WMS whenever possible.
> 
> 
> Bodo

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIc+VRnMz9fgzDSqcRAvVfAJ4srJyu8is+TsQPLiKyioLswRo/9gCeKEZf
TD/8xI6Hbo8j/i0HkYqT0sk=
=b4RU
-END PGP SIGNATURE-

___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/josm-dev


Re: [josm-dev] Landsat tiled WMS support for wmsplugin implemented

2008-07-08 Thread Frederik Ramm
Hi,

> Additionally to the tiled WMS operation, I added a flag to the preferences 
> to enable/disable tiled WMS mode and a "Clone" button to create a new entry 
> from an existing one. With this it is easy to create tiled/normal variants 
> of the same WMS server.

I may be totally wrong here but as I understood it, the type of tiled
WMS used by Landsat is something unique to them and not identical to
the WMS-C "standard" used by others?

> I don't know yet the reason for this. It might be JOSM stretching individual 
> tiles instead of stretching a larger image or a different interpretation of 
> coordinates and image size between JOSM and the WMS server. 

Have you set your JOSM to EPSG:4326? If you're using Mercator then I
should not be surprised about funny results along the edges.

> (When I specify the coordinates bounding box of the image, is this the center 
> of the corner pixels or the outer corner of these pixels?)

The centre usually.

Bye
Frederik

-- 
Frederik Ramm  ##  eMail [EMAIL PROTECTED]  ##  N49°00'09" E008°23'33"


___
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/josm-dev