[Qgis-developer] FOSS4G code sprint idea: improving SLD export and GeoServer compatibility
René-Luc Dhont
rldhont at gmail.com
Fri Sep 2 09:57:48 PDT 2016
Hi Andrea,
I have backported your works:
https://github.com/qgis/QGIS/pull/3448
It needs some tests and reviews.
Regards,
René-Luc
Le 01/09/2016 à 21:41, Andrea Aime a écrit :
> Hi Anita,
> sorry for the late reply, busy times, and I knew the response would be
> long.
>
> The update is ... complicated :-)
> So, around the sprint a few issues were fixed and have code merged in
> master (QGis 3.x):
>
> * Export of ogc:Filter in places where an expression is required,
> used to happen for any non zero rotation and any non fully opaque
> alpha, making the SLD invalid/unreadable. Pull request here,
> merged on master: https://github.com/qgis/QGIS/pull/3366
> * The styling works by default in "on screen mm", but SLD does not
> have such notion (has on screen pixel, on ground meter, on ground
> feet), and QGis did not rescale the values, making for very thin
> lines and tiny symbols. Fixed in this pull request, merged on
> master: https://github.com/qgis/QGIS/pull/3414
> * Scale based visibility declared at the layer level was not
> exported in SLD, making for layers that would show up at all zoom
> levels. Pull request here, merged as well:
> https://github.com/qgis/QGIS/pull/3436
> * GeoServer/GeoTools could not handle the way font based marks were
> exported. The syntax was actually valid, so I decided to build
> support for QGis own convention in GeoTools. This is the only bit
> already available in all supported GT/GS branches (develop,
> stable, maintenance): https://osgeo-org.atlassian.net/browse/GEOT-5496
> * QGis exports as "well known mark" names values that are not
> actually "well known", this one in being solved in
> GeoTools/GeoServer by adding support for the same names. Pull
> request pending, still haven't had the time to check it out:
> https://github.com/geotools/geotools/pull/1288
> * Labels are not exported at all as TextSymbolizer, during the
> spring Raymond Nijssen started working on that, he's got a
> promising work in progress, not yet turned into a pull request
>
> Kudos to the QGis developers that helped me with discussion,
> suggestions, and pull request reviews :-)
>
> Yet, there is still quite a lot of work to be done. Off the top of my
> head:
>
> * Backporting some/all of the above to QGis 2.16 and maybe 2.14
> * QGis has a nice support for "parametric" SVG based on a draft SVG
> extension that never became "official", basically, it allows to
> have SVG with parameters for stroke color, width and opacity, fill
> color and opacity. GeoTools does not recognize such extension and
> always renders SVG symbols full black. I intend to add this
> support to GT/GS, see
> http://osgeo-org.1560.x6.nabble.com/Adding-support-for-parametric-SVGs-td5282722.html
> , and then enrich the QGis export to add said params in the SLD.
> Mind, right now the export QGis is doing is also invalid, it's
> adding tags trying to support the stroke related params that are
> not part of the SLD standard. I hope to be able to build this on
> the GeoTools side before September 18th, the feature freeze date
> for the next GT/GS release, but no promises.
> * Alignment (top/bottom/left/right) is well supported in SLD, but
> the current QGis exported does not write the appropriate tags.
> Should not be too hard to fix, but there might be several places
> in the code to change.
> * There is no support to export symbology where values are gathered
> from a property, or an expression based on properties. SLD
> supports this from day 0, but the SLD export code has no ability
> to support that. It would be nice to have basic support for
> property names, arithmetic, maybe some mapping between QGis own
> functions and GT/GS functions usable in SLD (full list here, can
> be easily extended:
> http://docs.geoserver.org/stable/en/user/filter/function_reference.html
> ). This would be a massive undertaking, I'm afraid it won't be
> feasible without funding, but we'll see (note, all the work I did
> so far was unfunded).
> * There is no support for exporting raster symbology, colormaps,
> contrast stretch and the like. GeoServer also does not understand
> SLD 1.1 raster symbology (it's quite different from the SLD 1.0
> one), so work will have to be done on both sides. Seems another
> large undertaking.
> * x/y translation/offset for lines and polygons is not implemented
> in GeoServer (only for points and labels instead), that would
> require some work, but not too much
> * Compositing/blending is supported in GeoServer as a SLD extension,
> could be thus exported (cannot promise all single
> compositing/blending modes are a match on the two sides)
> * Pseudo 3D buildings are supported as an extension in GeoServer
> SLD, so this kind of layer is probably exportable. Might need some
> work on the GeoServer side to render the same way as QGis though
> (as far as I know QGis is doing some sorting). Example style for
> GeoServer and map here:
> https://github.com/charleyglynn/Extruded-buildings-SLD
> * z-stacked symbols like "highway" roads (paint all roads orange
> thick, go back, paint all roads white thin) are supported on both
> sides, but the export does not support it, and some change in the
> overall export logic would be required to actually support it, as
> SLD requires multiple FeatureTypeStyle elements, one per z level,
> to be generated in order to get the same effect. Right one there
> is just one FTS with many rules and symbolizers in it.
> * Geometry generators can probably be partially translated as
> "geometry transformations" in SLD, except in our case they do work
> in real world coordinates, not on screen:
> http://docs.geoserver.org/stable/en/user/styling/sld-extensions/geometry-transformations.html
> * Some types of symbology like shapeburst and inverted polygons are
> simply not available in SLD, nor in GeoServer own extensions, so
> one would have to first implement those in GeoServer, create
> appropriate SLD extensions, and then have QGis implement them in
> the output
>
> I'm probably forgetting something, and likely unaware of other QGis
> mapping capabilities I did not mention above :-)
>
> In any case, my target for the sprint was to show that exporting
> _basic_ styling is feasible, and does not require months of work. To
> some extent that was achieved (especially when we get the text
> symbolizer support). Hopefully it will make more people interested,
> maybe some devs will pitch in, and some sponsoring organizations can
> fill in the blanks.... an open source developer can dream, right? :-p
>
> Cheers
> Andrea
>
>
> On Tue, Aug 30, 2016 at 8:42 PM, Anita Graser <anitagraser at gmx.at
> <mailto:anitagraser at gmx.at>> wrote:
>
> Hi everyone!
>
> Hope you made it back home safe after Bonn. Could you give a short
> update on this topic, what was discussed / decided / worked on in
> Bonn?
>
> Thank you and best wishes,
> Anita
>
>
>
>
> On Sat, Jul 9, 2016 at 10:56 AM, Andrea Aime
> <andrea.aime at geo-solutions.it
> <mailto:andrea.aime at geo-solutions.it>> wrote:
>
> On Tue, Jun 28, 2016 at 7:42 PM, Andrea Aime
> <andrea.aime at geo-solutions.it
> <mailto:andrea.aime at geo-solutions.it>> wrote:
>
> I'll be at the code sprint after the conference, Saturday
> and Sunday.
>
>
> Change of plans, I'll be there the Sunday before the
> conference, and due to flight
> arrangements, also most of Saturday (in case anyone's
> interested we can find
> a place to start hacking)
>
> Cheers
> Andrea
>
>
> --
> ==
> GeoServer Professional Services from the experts! Visit
> http://goo.gl/it488V for more information.
> ==
>
> Ing. Andrea Aime
> @geowolf
> Technical Lead
>
> GeoSolutions S.A.S.
> Via di Montramito 3/A
> 55054 Massarosa (LU)
> phone: +39 0584 962313 <tel:%2B39%200584%20962313>
> fax: +39 0584 1660272 <tel:%2B39%200584%201660272>
> mob: +39 339 8844549 <tel:%2B39%20%C2%A0339%208844549>
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
> <http://twitter.com/geosolutions_it>
>
> *AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*
>
> Le informazioni contenute in questo messaggio di posta
> elettronica e/o nel/i file/s allegato/i sono da considerarsi
> strettamente riservate. Il loro utilizzo è consentito
> esclusivamente al destinatario del messaggio, per le finalità
> indicate nel messaggio stesso. Qualora riceviate questo
> messaggio senza esserne il destinatario, Vi preghiamo
> cortesemente di darcene notizia via e-mail e di procedere alla
> distruzione del messaggio stesso, cancellandolo dal Vostro
> sistema. Conservare il messaggio stesso, divulgarlo anche in
> parte, distribuirlo ad altri soggetti, copiarlo, od
> utilizzarlo per finalità diverse, costituisce comportamento
> contrario ai principi dettati dal D.Lgs. 196/2003.
>
> The information in this message and/or attachments, is
> intended solely for the attention and use of the named
> addressee(s) and may be confidential or proprietary in nature
> or covered by the provisions of privacy act (Legislative
> Decree June, 30 2003, no.196 - Italy's New Data Protection
> Code).Any use not in accord with its purpose, any disclosure,
> reproduction, copying, distribution, or either dissemination,
> either whole or partial, is strictly forbidden except previous
> formal approval of the named addressee(s). If you are not the
> intended recipient, please contact immediately the sender by
> telephone, fax or e-mail and delete the information in this
> message that has been received in error. The sender does not
> give any warranty or accept liability as the content, accuracy
> or completeness of sent messages and accepts no responsibility
> for changes made after they were sent or for other risks which
> arise as a result of e-mail transmission, viruses, etc.
>
>
> -------------------------------------------------------
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> <mailto:Qgis-developer at lists.osgeo.org>
> List info:
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
> <http://lists.osgeo.org/mailman/listinfo/qgis-developer>
> Unsubscribe:
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
> <http://lists.osgeo.org/mailman/listinfo/qgis-developer>
>
>
>
>
>
> --
> ==
> GeoServer Professional Services from the experts! Visit
> http://goo.gl/it488V for more information.
> ==
>
> Ing. Andrea Aime
> @geowolf
> Technical Lead
>
> GeoSolutions S.A.S.
> Via di Montramito 3/A
> 55054 Massarosa (LU)
> phone: +39 0584 962313
> fax: +39 0584 1660272
> mob: +39 339 8844549
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> *AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*
>
> Le informazioni contenute in questo messaggio di posta elettronica e/o
> nel/i file/s allegato/i sono da considerarsi strettamente riservate.
> Il loro utilizzo è consentito esclusivamente al destinatario del
> messaggio, per le finalità indicate nel messaggio stesso. Qualora
> riceviate questo messaggio senza esserne il destinatario, Vi preghiamo
> cortesemente di darcene notizia via e-mail e di procedere alla
> distruzione del messaggio stesso, cancellandolo dal Vostro sistema.
> Conservare il messaggio stesso, divulgarlo anche in parte,
> distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità
> diverse, costituisce comportamento contrario ai principi dettati dal
> D.Lgs. 196/2003.
>
> The information in this message and/or attachments, is intended solely
> for the attention and use of the named addressee(s) and may be
> confidential or proprietary in nature or covered by the provisions of
> privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New
> Data Protection Code).Any use not in accord with its purpose, any
> disclosure, reproduction, copying, distribution, or either
> dissemination, either whole or partial, is strictly forbidden except
> previous formal approval of the named addressee(s). If you are not the
> intended recipient, please contact immediately the sender by
> telephone, fax or e-mail and delete the information in this message
> that has been received in error. The sender does not give any warranty
> or accept liability as the content, accuracy or completeness of sent
> messages and accepts no responsibility for changes made after they
> were sent or for other risks which arise as a result of e-mail
> transmission, viruses, etc.
>
>
> -------------------------------------------------------
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20160902/ba3947ca/attachment-0001.html>
More information about the Qgis-developer
mailing list