Graham there is another suggestion; Andrea has started (and I am struggling to follow up with) introducing a way to preprocess a geometry on either a FeatureTypeStyle basis or Symbolizer basis. I had imagined this offering an alternative to a point symbolizer rendering a line basted on the centroid (you could ask for the start or end of the line). I had also imagined being able to ask for a substring (produce a line between 10%-40%). If we introduce this facility, and we should, you could use it to provide a line offset.
I had hoped to use a Function for this work (changing Symbolizer.getGeometryName(): String to Symbolizer.getGeometry(): Expression); however we are unable to reverse this function (needed to figure out what BBOX area to pull geometries from in cases like buffer; or cases like offset). Jody On Fri, Apr 17, 2009 at 1:36 AM, Graham Davis <[email protected]> wrote: > Thanks Andrea, that all makes sense. Currently we are in the research > phase to try and determine various ways we could accomplish our desired > result. This was one possible way, but it does seem unsatisfactory. I > now understand the problem of the different ways and uses that could be > used to draw symbols at end points, and that is useful. If our client > decides to go the SLD route, we might be able to help you with this SLD > change, or even do it for you. I appreciate the response, thanks. > > Graham. > > > Andrea Aime wrote: >> Graham Davis ha scritto: >>> This may not be the best place to ask this question, but I'm trying >>> to do something with SLD in uDig which I believe uses GeoTools for >>> SLD stuff. >>> >>> I'm looking at ways to display multiple routes that overlap so that >>> each route is visible side-by-side. One idea was to use SLD to style >>> the lines with images that have transparent offsets in them. For >>> instance, line 1 would be red and be drawn as normal, line 2 would be >>> green and would have 2 transparent pixels above the green part the >>> line graphic (so that the red line still appeared and so the green >>> line appeared displaced by 2 pixels). I have this idea working >>> somewhat in my examples, however, I am not satisfied with how the >>> graphicstroke draws graphics along a line. There are gaps/spaces at >>> every vertex. I've tried searching for various cssparameters and >>> other rules to prevent this, but nothing seems to work. No matter >>> what I do, there are always gaps. Here is an example linesymbolizer >>> from my SLD. >> >> You don't say which version of GeoTools you're using. >> Anyways, I've been playing with this topic a bit in my spare time some >> months ago and I could not find any satisfactory solution. >> The renderer is playing blind here, it has a square/rectangular >> block that has to be painted along a line and when a corner is reached >> there are various policies that can be taken: >> - stop at the last full image that can be drawn along the line >> - have the image be full drawn even if it extends past the end >> of the line >> - cut the image and reach the end of the block >> - keep on following the line and just find a point that's far enough >> from the last one reached to draw a full image block, forgetting >> about the corner itself >> >> Basically each policy works in some cases but not in others. In >> your case you are trying to fake a continuous line so approach >> 3 seems to be the one that works best, but other times you're >> trying to depict a line with circles or other symbols that you >> don't want to get partially drawn or superimposed at corners, >> so approach 1 or 4 work better. >> >> This would need to be handled using some vendor parameter controlling >> how the graphics is being stroked along the line, which is doable, >> and I would like to implement before FOSS4G 2009. Maybe I'll tackle >> this problem during summer vacations. >> >>> Also, I notice various email threads and forum postings about maybe >>> having a displacement/offset attribute added for lines. Is this >>> already part of the 1.1.0 SLD spec, or something new? Does GeoTools >>> implement 1.0.0 or 1.1.0 of the SLD spec? >> >> StreamingRenderer/ShapefileRenderer implements version 1.0.0 of the >> spec. Implementing v1.1.0 is beyond reach for a weekend project, it >> would take quite some time and thus needs some sponsoring. >> >> Cheers >> Andrea > > > -- > Graham Davis > Refractions Research Inc. > [email protected] > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Geotools-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-devel > ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
