Jerry sent me some OSM tweaks Friday.  I managed to get them
tested and committed to CVS.  Below are Jerry's notes about the
patch.  I personally did a Reindex New on the maps a couple of
times, then killed/restarted Xastir to get the *.osm maps to be
removed from Map Chooser.  Perhaps one reindex would have worked,
but I didn't check the map index file until I had done it twice.

Read Jerry's notes below.  BTW:  The <F4> key seems to work well for
me.  I'm using FVWM2 like Tom is.

Thanks again Jerry, looks good!  --Curt.

---------------------------------------------------------------------

Summary of changes:
  - scaling corrected
  - requested OSM map size limited to 2000x2000 and +/-89 deg latitude
  - no 'binned' zoom levels
  - new function key (F4) to 'optimize' zoom level for OSM
  - .osm maps eliminated
  - OSM map files (.geo) built from a single template

Details:
  scaling corrected:
    This required a major rewrite of the map_OSM.c code since
    the map_tiger.c code that it was based on did not support
    Mercator projection.

    Note that due to size limitations from the server and the
    use of Mercator scaling when the OSM bitmap images are rendered,
    some OSM maps will not fill the display window. This is particularly
    common when using a large display window. Selecting an optimized OSM
    zoom level (F4) will generally, but not always, result in bit map
    image that fills the window.

  map size limitations:
    The OSM map server that is used by this code limits the returned
    bitmap image to 2000 pixels in either direction. Also, as a side
    effect of the Mercator projection, latitude values must be limited
    to -90 < lat < 90.

  no binned zoom levels:
    Attempts to constrain the linear Xastir scaling to the binned OSM
    levels has been unsuccessful. The final straw was a problem with
    float to integer transitions that would result in looping and
    oscillation between levels.

  new function key to optimize OSM zoom levels:
    Since bitmap images do not scale well, they will always look best when
    the Xastir scale is closest to the OSM scale. A function key (F4) has
    been defined that will adjust the Xastir scale to the nearest OSM level
    and redraw the screen. Note that even if the scale is not changed, the
    F4 key will redraw the screen- this is intentional on my part.

    The F4 key works only if an OSM map is selected.

    If the F4 key is already defined for some other use on your system you
    can specify an alternative key by modifying the map files (OSM*.geo).
    The specified value must be an X11 KeySym value. Setting the value to 0
    will disable the key.

  .osm maps eliminated
    Since binned scale levels are no longer supported, the .osm extension
    is no longer needed. .osm file will not be installed.

    If your maps directory (typically /usr/local/share/xastir/maps/Online/)
    contains .osm file from an previous install you will have to remove
    them by hand.

    You should also re-index your files (Map->Configure->Index:Reindex
    ALL maps) to remove them from the Map Chooser.

  OSM map files (.geo) built from a single template:
    This is primarily of interest to developers and results in a cleaner
    source tree.

_______________________________________________
Xastir mailing list
[email protected]
http://lists.xastir.org/cgi-bin/mailman/listinfo/xastir

Reply via email to