[EMAIL PROTECTED] ha scritto:
> Hi!!
> 
> First of all, thanks to everybody for being so helpful. I am new in 
> Geotools environment. I am changing an application from SVG to geotools.
> Currently I have two problems.
> 
> 1)I have a basic SVG map file that need to be rendered on Geotool 
> canvas. Is it possible? I will highly appreciate if somebody can give 
> any hint of regarding it.

Not thru Geotools, at least in a scalable manner.
Geotools renderer need Features, which you can think as records, containing
attributes and geometries.
We do have various DataStore implementations that allow to turn some data
formats, such as shapefiles, oracle databases and the like, into features.
SVG in not in the same leagues as Features thought, since it's not data usually,
but a way to render it into a vector format. So no, we don't have at the
moment any way to turn SVG into features.

With the new pluggable renderer subsystem you will be able to add new
layers types other than feature based ones, such as SVG layers, but at the
moment any modification requires you to alter the rendering code.

Btw, the current renderer code in trunk and 2.2.1-SNAPSHOT is able to
render SVG as icons, but it's not the same thing, as a icon is used
to depict a point usually, and you have to provide a fixed dimension
in pixels for the icon in the layer style descriptor, so I guess it won't
handle your case properly.

> 2) I have some information on cities in an xml format. Is it possible 
> to render it as a layer on top by Geotools.

Provided that the XML file can be turned into a feature collection, yes,
you can render it. There are two ways to do that:
a) interpret the XML by yourself and do build feature out of them, then
    store them into a feature collection you'll use as the data for your map
    layer
b) turn the XML into something a geotools datastore can interpret, for
    example by applying an XSLT transform on it to turn it into standard
    GML.

Btw, both solutions could be applied to the SVG file as well. There
are talks about GML to SVG transforms on the web, but it's not trivial stuff,
and you would need the opposite transform anyway (something hard to find
since usually you go from content to representation, not the opposite).

Cheers
Andrea Aime

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to