Hi Glenn,

> I got ShapeLab working I used it to open one of the shape files we are using
> with our C application.  It took over a minute for ShapeLab/JMapPane to
> generate the map.  Using our application it renders so quickly it's
> difficult to time.  I need to have a better start.
>

It's no surprise that C code runs much faster than Java of course, but
it does sound like things were very sluggish for you.  Is it a large
shapefile and/or does it use complex style elements ?

Without knowing your data I suspect that most of the time is being
taken up in the geotools renderer rather than JMapPane. The latter
class is essential just a panel to display a buffered image that is
drawn into. It doesn't do any time-consuming processing itself.

> I am trying to learn by example.  Obviously JMapPane is not the place for me
> to start learning GeoTools.  Can someone suggest some sample code that I can
> study that will lead me in the right direction?

At the moment we are in the process of a big house-keeping effort with
library's modules and demos.  This is happening on the 2.6
(development) branch of the library. As part of this we are re-working
the existing Swing widget classes (presently a bit of a muddle across
several modules) and the rendering module.  Some of this work will be
accompanied by new learning materials being prepared for this year's
FOSS4G conference.

I don't know whether it would be acceptable for you and your
colleagues to work with the 2.6x code, but you might like to take a
look at it to see where things are heading.  There is already a
re-worked version of JMapPane and friends there:

http://svn.osgeo.org/geotools/trunk/demo/mapwidget/

In any case, it would be great for us to have your use cases and
feedback on the code and learning resources as they're being
developed.  And hopefully, this would prove useful for you too :)

Apart from rendering and display, if you specify some areas of
particular interest then folks here can point you to useful docs,
examples and other code.

> Since the contents of the map is fixed, as is the various zoom levels, would
> it be possible to improve performance by pre-building the maps and storing
> them on the hard drive instead of rendering them in real-time?  That's just
> a thought I had as I have started looking into GeoTools.

Yes, that's a good idea.  The existing (2.5x) and new (2.6x) JMapPane
classes draw into a BufferedImage that is then displayed by the
widget.  I can add an option to cache some number of previous images
to allow for rapid undo/redo of zooming and panning.

Michael

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to