Matthew Kerle ha scritto:
> Hi guys!
> 
> geotools newbie here so apologies in advance if this is a silly question 
> or if I abuse terminology...
> 
> I'm writing a custom layer engine for a 3rd party application that uses 
> geotools to draw custom rendering. I have data that occurs multiple 
> times per single location (fire unit responses) over many addresses, so 
> I'm drawing a TextSymbolizer of the integer count on top of the address 
> to indicate how many incidents occured there. this is all good, but the 
> problem I'm having is that as you zoom out the labels start to cluster 
> together and then geotools stops drawing some of the symbols as they 
> overlap, so it looks like there are fewer points of interest overall.
> 
> eg at max zoom you might see 20 addresses with incidents and associated 
> counts. zoom out to double, they move together and half the labels 
> disappear, double again and another half disappear, and so on til only 
> one remains.
> 
> I understand the technical reasons for this happening, but I know the 
> client is going to insist they see all incidents, even if they overlap 
> or occlude. I can manually change the drawing styles (not using SLDs, 
> directly doing this in Java) to use a different style at higher scales 
> (eg just a small circle), but I'm wondering if there's a way I can tell 
> geotools not to perform this optimisation so that even at high scale you 
> can still see overlapping symbols?

You're probably looking for:
<VendorOption name="conflictResolution">false</VendorOption>

See:
http://geoserver.org/display/GEOSDOC/LabelingOptions
(it's GeoServer docs, but GeoServer uses the GeoTools renderer)

Cheers
Andrea

-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to