Please review the style layer descriptor specification from the OGC - it documents the abilities of the rendering system.
What you are trying to do is visualize linear reference system data; I think you will actually need to pre-process your data into appropriate line Segments for rendering and then work from there. I have thought about this concept in the past (oralce spatial does something like this) it would amount to a new kind of stroke where rather than a single Color (or icon) a list would be provided matching the vertexes in the geometry. But you are actually asking for something beyond that; the creatation of an artificial split a specific distance along a line. Normally LRS systems work in a percentage along the line (so they don;t break as the geometry is updated over time. But really you are trying to save data volume by modeling your data as an approximation; I don't know of a good trick to help you. I can think of some bad tricks; such as making a glyph the legnth of the line colored according to the percentages you describe and then using the glph as part of the stroke. But really this is just a bad idea ...it may work but I am not sure what kind of accuracy you are trying for here? There are more bad ideas like using dash array and multiple line symbolizers - but really it will just drive you crazy. So here is a good recommendation; sort out an extension to LineSymbolizer where you can provide an Color[] used to color goemetry in a geometry collection. We have done a TextSymbolizer2 extension if you want an example of how to go beyond the specificaiton. Process your data into a goemetry colleciton - this way we get a real vertex at each one of these divisions (you could even do this on the fly using a custom function.... something like LRS( the_geom, 0.1, 0.5, 0.4 ); to create a GeometryCollection with three LineStrings ranging from 10%, 60% and 100% percent of the original. Jody Thomas Remmert wrote: > Hi everyone, > > I am looking at geotools, because of a specific requirement for > rendering, that I have found difficult to implement with other solutions. > > What I want to do is this: > > Let's imagine I have roads and roadjunctions, where the roads are > represented by a link with a polygone/polyline geometry and where > junctions are represented as a node, with a point geometry. What I am > trying to do now, is to colour and/or label part of such a link (road) > differently depending on attribute values like surface material, > surface damages, age of surfaces, or even based on adhoc calculated > values, like load on a road-link which might depend on things such as > speed limits. > > The attributes will be defined in a way like, from 1.23 km to 1.94 km > an attributes value might be 3, and from 1.94 km to 2.31 km the > attribute value might be 6. For simulation purposes this data might be > calculated ad-hoc and persisted into a database. > > I have though about 2 ways to do this. > > 1) (which would obviously work, but be neither nice, nor fast) would > be to turn the sub-section of a link (which is a shape) into seperate > shapes, by running a spatial query (eg. in Oracle Spatial) splitting > up an entire link's shape, storing it in a temporary table, and having > a layer that paints those shapes, with a proper Styler. I know this > would work, but it would require cleaning up the temporary tables. But > I am happy to be told that this would be the easier solution and not > even to attempt the other one. > > 2) Considering the fact that I would have attributes defined in a > database, using an unique ID for a link, and two measures on the link > and an attribute, to in some way mess with the renderer or the > painter, to apply a style on the fly when painting a shape on to the > graphics canvas. > > If anyone thinks that 2) could be done, I would be happy to attempt > this, and to contribute a solution back into the codebase if desired. > I am also happy to hear that there is already a way to do this, that > there is a 3rd way to do this, or how it could be best done with option 1) > > Thanks to everybody in advance > > Cheers > > Thomas > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > ------------------------------------------------------------------------ > > _______________________________________________ > Geotools-gt2-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
