On Wed, Jun 11, 2014 at 9:08 AM, Jody Garnett <[email protected]>
wrote:
> Sorry Ian I misunderstood, you are aware of the second well-known-graphic
> trick already.
>
> Most of the fixes I can think of are at the GeoTools level:
>
> 1) Generic GeoTools fix
>
> In SLDStyleFactory getIcon method where most of the magic is happening, we
> could add a "blacklist" here of known external graphics that were unable to
> be found, and return a placeholder graphic.
>
> 2) GeoServer ExternalGraphicFactory fix
>
> A non invasive change we could do from GeoServer is create our own
> BlackListGraphicFactory
> that accepts any external graphic request and returns the placeholder
> "broken" image. The only trick here would be to arrange the factory sort
> order so this factory is checked "last" ...
>
> 3) Specific ImageGraphicFactory fix
>
> The ImageGraphicFactory maintains its own cache (static final). We could
> teach it to note what images could not be found and return a placeholder.
> We can also store the placeholder in the cache resulting in a relatively
> easy to implement blacklist.
>
> Option 3 is quickest to implement, Option 1 handles both PNG and SVG.
>
Hi,
chiming in late, sorry.
Option 3 is no go, it will break the SLD mandated fallback mechanism, if
you have more than one graphic you need to fall back to the next one until
all possibilities are exhausted.
Option 2 would similarly not work, because it would break falling back to
marks
Option 1 is the only real option imho, once you tried _everything_ that was
in the SLD, fell back and found no options, using a mark (because it can be
rescaled) that gives the idea of an error
would be probably a good option.
Again, not sure if we are going to break the compatibility with the SLD
spec doing that, so maybe check, and in case, add a flag of sorts to
control it.
Adding a good ERROR or WARNING level logging stating that we tried all the
graphics and none worked would be probably good.
Cheers
Andrea
--
==
GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.
==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel