Thanks Andrea; this is the kind of thing I should of looked up :-( >> The Java API is using an Expression there? Darn. Well Andrea we can >> also honestly use ExternalGraphic >> it has the ability to supply vendor specific parameters that are >> expressions (and this is already used in our project). > Sorry, I don't see this possibility in the schema? The method name is: ExternalGraphic.setCustomProperties( Map<String,Object> )
Looking at the call hierarchy SLDParser uses this method to store a paramList .. generated by parsing the Format child. >> Is the core ExternalGraphic limited to a reference or can it be an >> expression? > The official definition of ExternalGraphic is the following: > > <xsd:element name="ExternalGraphic"> > <xsd:annotation> > <xsd:documentation> > An "ExternalGraphic" gives a reference to an external raster or > vector graphical object. > </xsd:documentation> > </xsd:annotation> > <xsd:complexType> > <xsd:sequence> > <xsd:element ref="sld:OnlineResource"/> > <xsd:element ref="sld:Format"/> > </xsd:sequence> > </xsd:complexType> > </xsd:element> Okay; so there is the sld:Format being mentioned; those things show up in the java code often as a Map<String,Object> where the object is often an Expression. > and OnlineResource is: > > <xsd:element name="OnlineResource"> > <xsd:annotation> > <xsd:documentation> > An OnlineResource is typically used to refer to an HTTP URL. > </xsd:documentation> > </xsd:annotation> > <xsd:complexType> > <xsd:attributeGroup ref="xlink:simpleLink"/> > </xsd:complexType> > </xsd:element> > > And finally xlink:simpleLink is: > > <attributeGroup name="simpleLink"> > <attribute name="type" type="string" fixed="simple" > form="qualified"/> > <attribute ref="xlink:href" use="optional"/> > <attribute ref="xlink:role" use="optional"/> > <attribute ref="xlink:arcrole" use="optional"/> > <attribute ref="xlink:title" use="optional"/> > <attribute ref="xlink:show" use="optional"/> > <attribute ref="xlink:actuate" use="optional"/> > </attributeGroup> > <attribute name="href" type="anyURI"/> > > so as you can see, it has to be a literal, there is no allowance for > an expressions. As I stated before, the ExternalResource url is an > attribute, so you cannot stick and Expression in there. Understood; so my idea was to make up a "non" http url - say "internal:mil2525b" and use the format to pass in the code? Theunsgis had this kind of thing as one of his examples he sent me in email. > All in all I still prefer using marks and WellKnownName, given a > certain domain the mil stuff is well known and it's, afaik, > pure lineart graphic that fits well the Mark definition. Okay - that is honestly my preference as well - as a beginner I would find the WellKnownName thing easier to handle - the hard part is figuring out if we can use an Expression to determine the WellKnownName. For things like MIL2525B the actual code to use is sometimes a data field; or at least an function call. > ExternalGraphic seems more geared towards internet accessible > resources and you don't have control on color and painting attributes > of what you're going to draw. Understood; the only remaining attraction I have to the idea is defining a factory so we could intercept requests to external graphics and handle them locally as an optimization I guess. > That is, with ExternalGraphic you have to embed that information > somehow in the url and have the pluggable system recognize them, with > Mark the pluggable system would handle only the shape, and the > standard sld would allow to specify line width, color, filling and > whatnot. Jody ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel