-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello all,

I've been hacking on the WMS client implementation in xastir
this weekend and have a working prototype of WMS-C. The motivation
was to be able to display data from Open Streetmap as part of
the map.

The problem was that the WMS server that serves OSM data does
not support arbitrary bounding boxes or image sizes - tiles are
256x256 pixels and bounding boxes must be such that a slot in
a quadtree with the top level being the whole world divided into
two tiles, eastern and western hemispheres. To make a long story
short, one can't just ask for a tile of the same size as the
window and with the same bounding box.

The code is heavily based on map_WMS.c -- basically with a
routine that finds the tiles overlapping the viewport at an
appropriate resolution and then a loop that fetches them and
displays them.

It seems to work for me but there are some caveats. Especially
on big screens (read lots of tiles) there can be many network
requests done serially. This means that rendering the screen each
time one pans or zooms is *slow* until the images are in the
cache.

Now that it is working the code can probably use some cleanup.

Also I was having problems with cache id collision and had to
add a random element to the function in map_cache.c.

Though this is, in principle, equivalent in terms of functionality
to map_WMS.c, the current set of patches implement a different
geo file type, TILESERVER. There are two example files, OSM.geo
and VMAP0.geo (mind that vmap0 is notoriously inaccurate).

I found wrapping my head around the coordinate system used by
Xastir to be challenging. It took a fair amount of trial and error
to get it right.

Anyhow, patches against version 1.9.4 and some screenshots are
available here:

        http://irl.styx.org/xastir/wmsc/

Thoughts on the approach? Would such a thing be a candidate for
inclusion in the main tree? How one might parallelize the network
requests (xastir being apparently quite unsafe for threads)?

73 de VE2WSW

- --
William Waites                       <[EMAIL PROTECTED]>
http://www.irl.styx.org/          +49 30 8894 9942
CD70 0498 8AE4 36EA 1CD7  281C 427A 3F36 2130 E9F5

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iEYEARECAAYFAkjDoS0ACgkQQno/NiEw6fXXXQCcDkXIeJCtDtIRzcJOjF39UTro
2S0AnAv4lqVPnulNhSw8hk4COsJbqqOQ
=BH9S
-----END PGP SIGNATURE-----
_______________________________________________
Xastir-dev mailing list
[email protected]
http://lists.xastir.org/cgi-bin/mailman/listinfo/xastir-dev

Reply via email to