Hi Simon,
Hey, this is great! Thanks for sending this in so quickly. I'm adding
it into the release right now. Comments below...
On Jan 27, 2004, at 12:47 PM, Simon Bowen wrote:
> Don,
>
> Attached new version of thecom.bbn.openmap.layer.mifpackage (zipped)
> ** See notes below, also note that I have only tested using
> OpenMap4.5.4, I am not yet up to speed with the CVSHEAD.
>
> I hope you can get this included in the next release ofOpenMap. Any
> problems or question just let me know.
>
>
> Cheers
>
> Simon
>
> NOTES
>
>
> Overview ofcom.bbn.openmap.layer.mifpackage changes:-
>
>
>
> Removed call toOMSubtraction.containswithin thePROCESS_REGIONcase of
> theloadFile() method ofMIFLoader
>
> - couldn't see the real reason for this, it was actually
> causing the file to take about 60% extra time to load into memory
>
> MIFLoadernow checks that theCoordSystype of the MIF file is Latitude
> and Longitude before attempting to parse the file
>
> Added support toMIFLoaderfor the MIF "TEXT" and "POINT" graphical
> primitives (although only basic functionality)
>
> Added 2 extra properties to MIFLayerthat define the scale value after
> which the text and point graphics are rendered (seeMIFPointandMIFText)
>
> textVisible
>
> pointVisible
>
>
> MIF package updates
>
>
>
> New classes
>
> MIFException
>
> MIFText
>
> MIFPoint
>
>
>
> New Interfaces
>
> MIFGraphic
>
>
>
> Changes to existing classes
>
> MIFLayer
I've modified the MIFLayer to take advantage of some of the
OMGraphicHandler functionality built in, namely defining the
ListResetProjectionChangePolicy in the constructor (tells the Layer to
use prepare() to set the list in a different thread), and overriding
the prepare() method to fetch the list from the loader and generate it
with the new projection. This allowed me to delete the overridden
renderDataForProjection and paint methods, they will handle the data
in the right way. I also modified the MIFLoader.getList() method so it
would return the OMGraphicList if it had already been created, and
added a getList(boolean reload) method so you could force it to reload
the data from the file.
I also had to modify your coordinate system check slightly.
> MIFLoader
>
>
>
>
>
> NOTE (The bit I am not happy with)
>
> I have added property values to the layertextVisibleandpointVisible,
> these define the scale value at which any TEXT and POINT graphics
> become visible. Without these at very wide zooms your view can become
> blotted out by text and points, so I've added these properties so that
> the user can define at what scale factor to render text and points.
> Therefore for MIF data files where the user has text info for urban
> areas thetextVisiblecould be around say 300000 or less and for rural
> areas possibly 1000000. It's up to the users to experiment with.
>
>
> A better solution to the above would be to add correct sizing
> ofOMGraphicsetc.. dependingon the actual viewing scale (at runtime),
You still have to define a base scale for the text where it is shown at
normal size, so it's good these properties are there.
> and adddeclutter algorithimsto the rendering process (I'm hoping this
> is to be fully implemented in OpenMapvery soon?????)
We're not working on anything new, there is a DeclutterMatrix object
that could be adapted for use in the layer.
> Performance starts to suffer after about 30MB + ofmif data is loaded
> into memory, mainly during the project/render.
>
> Possible improvements that could be made
>
> The new code will throw aMIFExceptionfrom load file when
> theCoordSysdefinition is not compatible, cannot see an easy way to
> propagate this out of the layer code so that it can be caught in a GUI
It probably will be with the new changes I made, but the clarity of the
error to the user depends on the message in the exception.
>
> Add support for ARC ELLIPSE RECT ROUNDRECT
>
> Enhance the support for TEXT so that it performsdeclutteringand
> correctly sizes the text depending on scale.
The OMText object lets you set a FontSizer object in it, that will
adjust font size based on scale.
>
> Include support for the optional TEXT sections of MIF format (i.e.
> Spacing, Justify, Angle and Label)
>
>
>
> Enhance the support for POINT so that it performsdeclutteringand
> correctly sizes the text depending on scale.
>
> Include support for rendering of the different MIF symbols, rather
> than just a square (as it is at the moment)
>
> Include support for rendering of symbols from TrueType fonts
>
All of these sound great too. Thanks again for spending the time to
send all of your improvements in! I'm going to be checking in those
changes right now to the 4.6 beta cvs tree, so if you want to test out
that version, let me know if you find any problems!
- Don
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick@bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-- [To unsubscribe to this list send an email to "majdart@bbn.com" with the following text in the BODY of the message "unsubscribe openmap-users"]Received on Tue Jan 27 16:00:46 2004
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:37 EDT