Luca Morandini ha scritto: > On 27/04/10 18:54, Andrea Aime wrote: >> Luca Morandini ha scritto: >>> On 26/04/10 19:09, Andrea Aime wrote: >>>> Just curious if you looked into the question at all. A WKT based mark >>>> factory is fine by me ;-) >>> That I did, including some tests (patches at the end of this message); of >>> course, >>> some user doc will have to be written too. By the way, the source code >>> includes >>> some more well-known shapes that I've found useful. >> Ah, thanks for the patch. Can you attach it to a jira in Geotools? > > Done (http://jira.codehaus.org/browse/GEOT-3058). > > >> Btw, I did not think about using a WKT literal, but yeah, it's a simple >> solution (I was thinking more or a property file, but in that case you >> also have to make the property file location pluggable and so on, which >> might be annoying). > > My first idea was indeed to use an URL to fetch the WKT file, but the option > of > having the WKT in-lined makes the SLD self-contained and the whole process > easier > for the user... on the other hand, it might be useful to have an external > "library" of WKTs to re-use.
Right, was thinking the same. Looking at your patch I was thinking of doing the following: - keeping the well known extra shapes in the shape factory - make a new wkt factory that only does wkt - have it recognize a wktlib:// prefix too that points to a file, something like "wktlib://path#name" Possibly so that the path can be a relative reference into the GeoServer data dir, would be nice to have wktlib://mylib#star where the data dir contains $data_dir/styles/mylib.properties. Should be doable by allowing for pluggable path resolvers of some kind... or to make it easier, just do the abstract class in GeoTools and then make a subclass in GeoServer that has the lookup logic. What do you think? > >>> As per SVG, I've found out some "orphan" code that may be of interest >>> (http://www.mail-archive.com/[email protected]/msg04729.html). >>> >>> If you deem it worthy, I may try to adapt it to GeoTools. >> Sounds interesting, but also seems to duplicate part of Batik work. >> This suggestion: >> http://www.mail-archive.com/[email protected]/msg04718.html > > I've considered Batik too... but that piece of code (the "orphan" one) does > exactly what's needed, doesn't it ? > > Anyway, the links you quoted is broken... but I've found out some code, on > batik-users, under the thread named "Roundtrip Java2D Shape -> SVG File -> > Java2D > Shape": is this the one you are referring to ? Err... no, I was just refererring to an idea, which is to let Batik draw to a Graphics (which it can do) and have a special Graphics implementation that steals the Shape objects passed down to it Cheers Andrea -- Andrea Aime OpenGeo - http://opengeo.org Expert service straight from the developers. ------------------------------------------------------------------------------ _______________________________________________ Geoserver-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-devel
