On Fri, Dec 10, 2010 at 9:46 AM, Frank Gasdorf
<[email protected]> wrote:

>> I don't know what you mean by overlay images. The result of a
>> ExternalGraphicFactory
>> is an Icon, if you built it internally by overlaying images (since mil
>> symbols
>> are a composition, right?) it's just an implementation detail.
>> I would expect such factory to create a ImageIcon backed by a buffered
>> image that you created by repeatedly painting all of the necessary
>> elements
>> of the composite symbol on top of it.
>
> Oh inconsistent description, initially i thought every factory that returns
> not null for the icon add it to the map. But after I  had a look into
> SLDStyleFactory I understood, that it takes the first and stops querying the
> others. Means to me, that the first registered that would return an icon
> wins the race ...

Indeed, that's how it's meant to work. Each factory should deal with a unique
url pattern


>> The opacity is not the business of the graphic factory and would
>> require changes down in the renderer in all parts that paint an image.
>> The size is already provided.
>
> but if the image service would have an attribute to return transparent icons
> the information would be nessesary...

In that case you should put as part of the image url, the SLD opacity
is post processing on top of it. I would expect most symbols returned by
a graphic factory to indeed have a transparent background (well, unless
they are square and fill the entire image area).

>> As a rule of thumb I'm not going to accept any change in the interfaces
>> that just make up for a different code aesthetics sense without providing
>> any extra functionality.
>> But I'm more than willing to accommodate anything that will make the
>> interfaces easier to implement or that allow to provide extra
>> functionality.
>>
>> Btw, wondering, are you going to donate back that new external graphic
>> factory implementation to GeoTools? There has been quite some interest
>> on militar symbols in the past around here.
>>
> Right now it is an implementation based on (single threaded) ArcGIS Engine
> Runtime in combination with the free mole extension (supports app6a and
> 2525b). I guess the code from the project can not be donated back BUT I can
> change it to use the free mil2525b png jar file from openmap project:
>
>
> http://openmap.bbn.com/cgi-bin/viewvc.cgi/trunk/lib/milStd2525_png.jar?root=openmap&view=log

Wow, that's big. By my (weak) understanding of the mil symbols when
one provides a symbol spec the resulting image would actually have
to be an overlay of some of those icons, right?

> in the sld document the OnlineResource would look like
>
> mil2525b://${symbolid}
>
> But it is not an ExternalGraphicFactory it is a implementation of
> URLStreamHandlerFactory and URLStreamHandler to extend the protocol. I
> started first using the ExternalGraphicFactory but if no URLStreamHandler it
> leads into MalformedUrlExceptions (unknown protocol) and if implemented it's
> not required to extend using the geotools interface.

Sorry, confused. So you already went ahead and implemented the protocol handlers
instead?

Cheers
Andrea

-----------------------------------------------------
Ing. Andrea Aime
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584962313
fax:     +39 0584962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-----------------------------------------------------

------------------------------------------------------------------------------
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to