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