[geotk] [Newbie] Image download and polygon drawing
Martin Desruisseaux
martin.desruisseaux at geomatys.fr
Fri Aug 21 04:10:03 EDT 2009
Hello Sam
Sam B a écrit :
> What I would like to do, is getting a map from a WMS server, store it on
> my harddisk (maybe via a serializable class) and display it on the
> screen. Then I would like to draw some polygons on it, and finally
> calculate their area.
>
> Here are my questions :
>
> - Is there a small example for getting an image from a WMS server ?
> - What is the best way to draw some polygons and shape on it ? Just to
> use simple AWT objects ? I saw there's a org.geotoolkit.display.shape
> <http://www.geotoolkit.org/apidocs/org/geotoolkit/display/shape/package-summary.html>
> package*, *but it looks much more like an extension to some existing
> (AWT?) objects
Before attempting to suggest an approach, I need to explain an important aspect
of the Geotoolkit project. This project is splitted in two parts (both of them
open-source and available at http://hg.geotoolkit.org):
* Geotoolkit
* Geotoolkit-pending
The javadoc available online is the one of Geotoolkit only. They are the most
stable parts, polished, careful on compatibility (if a methods need to be
removed, if it first deprecated for at least one release cycle), released every
month with a list of API changes, etc.
Geotoolkit-pending is in a much more flux state, under high development
activity, with more frequent API changes, its javadoc is not yet published on
the web. Anyone is welcome to use geotoolkit-pending, but should be aware that
the risk (compatibility break, etc.) is slightly higher than when using the
stable geotoolkit part.
The plan is to gradually move code from Geotoolkit-pending to Geotoolkit when
they mature.
We actually provide a full renderer engine much more powerfull than what the
above-cited org.geotoolkit.display package javadoc show. This renderer engine
does not show up in the javadoc because it lives in Geotoolkit-pending for now.
The easiest way to get the binary JARs is through Maven:
http://maven.geotoolkit.org/org/geotoolkit/pending/
In order to get the code (which is currently the only form of documentation),
for now there is only the Mercurial way. Mercurial is an open-source Distributed
Versioning System than you can get from http://mercurial.selenic.com/wiki/. Once
installed, executing the following command-line will give you a copy of all the
geotoolkit-pending code (you can also browse the link on-line if you prefer):
hg clone http://hg.geotoolkit.org/geotoolkit-pending/
The renderer is maintained by Johan Sorel, who is in vacation for the next 2 or
3 weeks. If you are lucky, he reads his email during his vacation and can give
you some hints :).
For the WMS part, I will ask to my co-worker and get back later.
Regards
Martin
More information about the Geotoolkit
mailing list