Once upon a time there was a tutorial called StyleFunctionLab which did exactly 
what I needed to do - call out to a custom function as it iterates over a data 
set, allowing each element to be colored (or outlined or whatever) differently.

I implemented this tutorial a year or two ago, and had it working - then I got 
called away by other things, and now I can't get the tutorial working again.   
Instead, I get this:

SEVERE: Unable to find function Colour
java.lang.RuntimeException: Unable to find function Colour
 at org.geotools.filter.FunctionFinder.findFunction(FunctionFinder.java:205)
 at org.geotools.filter.FunctionFinder.findFunction(FunctionFinder.java:152)
 at org.geotools.filter.FunctionFinder.findFunction(FunctionFinder.java:127)
 at org.geotools.filter.FilterFactoryImpl.function(FilterFactoryImpl.java:723)
 at 
org.geotools.filter.visitor.DuplicatingFilterVisitor.visit(DuplicatingFilterVisitor.java:336)
 at 
org.geotools.filter.FunctionExpressionImpl.accept(FunctionExpressionImpl.java:207)
 at 
org.geotools.styling.visitor.DuplicatingStyleVisitor.copy(DuplicatingStyleVisitor.java:353)
 at 
org.geotools.styling.visitor.DuplicatingStyleVisitor.visit(DuplicatingStyleVisitor.java:606)
 at org.geotools.styling.FillImpl.accept(FillImpl.java:201)
 at 
org.geotools.styling.visitor.DuplicatingStyleVisitor.copy(DuplicatingStyleVisitor.java:384)
 at 
org.geotools.styling.visitor.DuplicatingStyleVisitor.visit(DuplicatingStyleVisitor.java:690)
 at 
org.geotools.styling.visitor.UomRescaleStyleVisitor.visit(UomRescaleStyleVisitor.java:223)
 at 
org.geotools.styling.PolygonSymbolizerImpl.accept(PolygonSymbolizerImpl.java:140)
 at 
org.geotools.styling.visitor.DuplicatingStyleVisitor.copy(DuplicatingStyleVisitor.java:470)
 at 
org.geotools.styling.visitor.DuplicatingStyleVisitor.visit(DuplicatingStyleVisitor.java:277)
 at 
org.geotools.renderer.lite.StreamingRenderer.rescaleFeatureTypeStyle(StreamingRenderer.java:2309)
 at 
org.geotools.renderer.lite.StreamingRenderer.applyUnitRescale(StreamingRenderer.java:2287)
 at 
org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:1932)
 at 
org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:804)
 at org.geotools.swing.RenderingTask.call(RenderingTask.java:106)
 at org.geotools.swing.RenderingTask.call(RenderingTask.java:41)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
 at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)


Is there a plan to update this tutorial (I would be happy to help) or is there 
a better way of showing a geotools hobbyist/dabbler how to write this?   I've 
gotten through the steps of reading a shapefile and displaying a map, but I 
confess when I try to understand the relationship(s) between the seemingly 
infinite numbers of classes in the geotools library, it becomes a bit 
overwhelming.   

Any advice would be welcome - as I said, I'm a hobbyist at the GIS stuff, 
although I am a Java programmer by trade.   I just need a pointer in the right 
direction (to a working example, for instance.)

Thanks - 

Tom
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to