Re: [Qgis-developer] Displacement and SLD's
Hi Andrea, sorry for the delay, I was abroad. On Wed, May 8, 2013 at 5:41 PM, Andrea Aime andrea.a...@geo-solutions.itwrote: we already have a graphic-margin option [...] The name seems suitable for the fill as well, since in the end we're talking about a graphic again. Is it something QGis could use? Otherwise I could have GeoServer interpret distance as an alias of graphic-margin. I guess QGIS could use graphic-margin as well. Let me have a look at the code, whether our distance option is ever worked (it doesn't work at the moment on QGIS 1.9, probably due to API breaks), to understand if we should handle both the options. Cheers. Cheers Andrea -- == GeoServer training in Milan, 6th 7th June 2013! Visit http://geoserver.geo-solutions.it 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 --- -- Giuseppe Sucameli ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Displacement and SLD's
Hi Jonathan On Tue, May 7, 2013 at 7:42 PM, Jonathan Moules jonathanmou...@warwickshire.gov.uk wrote: So my question is - how should that style be created with SLD's? Does QGIS does it properly? no way in this moment, you could use Displacement tag with SVG images created ad-hoc, i.e. with some empty space around the original image. Andrea (who's implementing it), has noted that displacement alone can't do this, so has proposed a solution which would work, but would require an SLD file different from the one that QGIS 1.8 exported. His proposed solution is: https://jira.codehaus.org/browse/GEOS-5794?focusedCommentId=324800#comment-324800 IMHO the displacement shouldn't be used in that way, as empty space between graphics, though the SE1.1 specs doesn't define a proper tag to do that... In fact the Graphic-Displacement tag is already used in other contexts with the meaning of distance in pixels from the hot-spot, not as space around the graphic symbol neither as offset between neighbour graphics. What is the QGIS solution to this? Does it implement it at all from an SLD file? I would define 2 new tags as GraphicFill tag's children, like it's already done in the GraphicStroke tag. GraphicStroke has Gap and InitialGap, we should use the same approach. I ask because I think one common implementation concept would be better than multiple divergent incompatible ones as QGIS is used by some people to style SLD's for GeoServer. I agree, could you report my thoughts to the GeoServer ticket? Regards. Thanks, Jonathan This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer -- Giuseppe Sucameli ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Displacement and SLD's
On Wed, May 8, 2013 at 12:33 PM, Giuseppe Sucameli brush.ty...@gmail.comwrote: Andrea (who's implementing it), has noted that displacement alone can't do this, so has proposed a solution which would work, but would require an SLD file different from the one that QGIS 1.8 exported. His proposed solution is: https://jira.codehaus.org/browse/GEOS-5794?focusedCommentId=324800#comment-324800 IMHO the displacement shouldn't be used in that way, as empty space between graphics, though the SE1.1 specs doesn't define a proper tag to do that... In fact the Graphic-Displacement tag is already used in other contexts with the meaning of distance in pixels from the hot-spot, not as space around the graphic symbol neither as offset between neighbour graphics. Right, but at the same time, the SE does not say how to use it in GraphicFill, so one is free to interpret. For example, GeoServer does not need SE 1.1 gap and InitialGap in graphic strokes because it uses the dasharray for that, another thing that is already in the SLD 1.0 spec and that had no proper definition of usage in combination with graphicstroke (moreover, it's more flexible than the simple gap syntax, one can create irregular symbol along lines, something like two circle, space, one circle, space, repeat). What is the QGIS solution to this? Does it implement it at all from an SLD file? I would define 2 new tags as GraphicFill tag's children, like it's already done in the GraphicStroke tag. GraphicStroke has Gap and InitialGap, we should use the same approach. Extending SLD is a minefield, what happens if OGC releases a corrigendum that adds the same tags, but with a slightly different semantic? Also, every extension done that way needs modifications to the parsers and modification to the programming interfaces, something that in GeoTools/GeoServer is allowed only on the devel series (the one that spawns a new stable branch every six months) The way we handle extensions in GeoServer is to use a VendorOptions tag, which can accomodate key/value pairs, for example, in this case we could have something like: PolygonSymbolizer ... VendorOption key=gapAbove10/VendorOption VendorOption key=gapBelow5/VendorOption VendorOption key=gapRight5/VendorOption VendorOption key=gapLeft15/VendorOption /PolygonSymbolizer Cheers Andrea -- == GeoServer training in Milan, 6th 7th June 2013! Visit http://geoserver.geo-solutions.it 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 --- ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Displacement and SLD's
Hi Andrea, On Wed, May 8, 2013 at 12:57 PM, Andrea Aime andrea.a...@geo-solutions.itwrote: On Wed, May 8, 2013 at 12:33 PM, Giuseppe Sucameli brush.ty...@gmail.comwrote: IMHO the displacement shouldn't be used in that way, as empty space between graphics, though the SE1.1 specs doesn't define a proper tag to do that... In fact the Graphic-Displacement tag is already used in other contexts with the meaning of distance in pixels from the hot-spot, not as space around the graphic symbol neither as offset between neighbour graphics. Right, but at the same time, the SE does not say how to use it in GraphicFill, so one is free to interpret. Not at all, it says: The GraphicFill element both indicates that a stipple-fill repeated graphic will be used and specifies the fill graphic. [...] A “graphic” can be defined very informally as “a little picture”. The appearance of the graphic is defined with the embedded Graphic element, which is discussed in Subclause 11.3.2. so the meaning of Graphic elements is supposed to be the same for both GraphicFill and GraphicStroke. For example, GeoServer does not need SE 1.1 gap and InitialGap in graphic strokes because it uses the dasharray for that, another thing that is already in the SLD 1.0 spec and that had no proper definition of usage in combination with graphicstroke (moreover, it's more flexible than the simple gap syntax, one can create irregular symbol along lines, something like two circle, space, one circle, space, repeat). It's surely more flexible, but I've few inventiveness. For me a dash is a dash, so those dash-something elements should be used to render dashes, not graphic strokes. From my side I would draw both a graphic stroke and a dash line, BTW the XML schema allows to put GraphicStroke and SvgParameters toghether without explain how it must behave. I would define 2 new tags as GraphicFill tag's children, like it's already done in the GraphicStroke tag. GraphicStroke has Gap and InitialGap, we should use the same approach. Extending SLD is a minefield, what happens if OGC releases a corrigendum that adds the same tags, but with a slightly different semantic? The same that would happen if OGC defines what dasharray/dashoffset elements must be used for. I agree with you extending SLD should be avoided, additions to GraphicFill tag could happen soon: Additional parameters for the GraphicFill may be provided in the future to provide more control the exact style of filling. The way we handle extensions in GeoServer is to use a VendorOptions tag, which can accomodate key/value pairs, We do the same in QGIS, and even the tag name it's the same! ;) in this case we could have something like: PolygonSymbolizer ... VendorOption key=gapAbove10/VendorOption VendorOption key=gapBelow5/VendorOption VendorOption key=gapRight5/VendorOption VendorOption key=gapLeft15/VendorOption /PolygonSymbolizer s/key/name/ We already have a VendorOption name=distance20,15/VendorOption that handle the distance between graphics in fill, but we are open to a shared naming convention, as far as possible. Cheers. Cheers Andrea -- == GeoServer training in Milan, 6th 7th June 2013! Visit http://geoserver.geo-solutions.it 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 --- -- Giuseppe Sucameli ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Displacement and SLD's
On Wed, May 8, 2013 at 5:30 PM, Giuseppe Sucameli brush.ty...@gmail.comwrote: The way we handle extensions in GeoServer is to use a VendorOptions tag, which can accomodate key/value pairs, We do the same in QGIS, and even the tag name it's the same! ;) in this case we could have something like: PolygonSymbolizer ... VendorOption key=gapAbove10/VendorOption VendorOption key=gapBelow5/VendorOption VendorOption key=gapRight5/VendorOption VendorOption key=gapLeft15/VendorOption /PolygonSymbolizer s/key/name/ Doh, I'm having a bad day, it's name in GeoServer as well We already have a VendorOption name=distance20,15/VendorOption that handle the distance between graphics in fill, but we are open to a shared naming convention, as far as possible. Now that I think about it, we already have a graphic-margin option that is used in labelling + label shield, to set the distance between elastic shields and the label, which has a very similar syntax and allows 1 to 4 values, like css margin does: http://www.w3schools.com/css/css_margin.asp The name seems suitable for the fill as well, since in the end we're talking about a graphic again. Is it something QGis could use? Otherwise I could have GeoServer interpret distance as an alias of graphic-margin. Cheers Andrea -- == GeoServer training in Milan, 6th 7th June 2013! Visit http://geoserver.geo-solutions.it 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 --- ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] Displacement and SLD's
Hi List, We've contracted some work on GeoServer to try and get the SLD 1.1 displacement tag implemented, because we wanted to replicate the sort of results you can get in QGIS 1.8 here with the SVG filled green areas: http://hub.qgis.org/wiki/quantum-gis/OS_Styles Those are QML files, but QGIS allows them to be exported as SLD. So my question is - how should that style be created with SLD's? Does QGIS does it properly? Andrea (who's implementing it), has noted that displacement alone can't do this, so has proposed a solution which would work, but would require an SLD file different from the one that QGIS 1.8 exported. His proposed solution is: https://jira.codehaus.org/browse/GEOS-5794?focusedCommentId=324800#comment-324800 What is the QGIS solution to this? Does it implement it at all from an SLD file? When I try and load the SLD it saves back into QGIS, I encounter a QGIS bug (http://hub.qgis.org/issues/7759), so can't actually confirm it. I ask because I think one common implementation concept would be better than multiple divergent incompatible ones as QGIS is used by some people to style SLD's for GeoServer. Thanks, Jonathan -- This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer