[Geoserver-devel] [GSIP - 81] call for vote

Hi all,
this is a call for vote for the GSIP 81 (getLegendGraphic as test):
http://geoserver.org/display/GEOS/GSIP+81+-+GetLegendGraphic+as+text+(JSON)

This is the main thread discussion:
http://osgeo-org.1560.n6.nabble.com/getLegendGraphic-as-text-td5006142.html#a5010028

I have not a pull request for the official geoserver, currently I'm working on a geoserver fork which adds this extension, if some PSC is interested to see changes I can provide a branch to discuss changes over it.

You are kindly invited to vote.
Cheers,
Carlo Cancellieri

+0.

Looks well-thought-out, but I do not know enough WMS or JSON to understand the implications. My only request is that this spends some time on master before backporting to 2.2.3 (as indicated in the proposal).

On 13/11/12 01:20, Carlo Cancellieri wrote:

Hi all,
  this is a call for vote for the GSIP 81 (getLegendGraphic as test):
http://geoserver.org/display/GEOS/GSIP+81+-+GetLegendGraphic+as+text+(JSON)

This is the main thread discussion:
http://osgeo-org.1560.n6.nabble.com/getLegendGraphic-as-text-td5006142.html#a5010028

I have not a pull request for the official geoserver, currently I'm working on a geoserver fork which adds this extension, if some PSC is interested to see changes I can provide a branch to discuss changes over it.

You are kindly invited to vote.
Cheers,
Carlo Cancellieri
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

Ben,
Thanks for your vote

understand the implications. My only request is that this spends some
time on master before backporting to 2.2.3 (as indicated in the proposal).

No problem we can start working with the master branch then backport it to the stable one when ready.

Regards,
Carlo

+0

Regards,
Simone Giannecchini

Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

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

On Tue, Nov 13, 2012 at 9:31 AM, Carlo Cancellieri
<ccancellieri@anonymised.com> wrote:

Ben,
Thanks for your vote

understand the implications. My only request is that this spends some
time on master before backporting to 2.2.3 (as indicated in the proposal).

No problem we can start working with the master branch then backport it to the stable one when ready.

Regards,
Carlo

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

On Mon, Nov 12, 2012 at 6:20 PM, Carlo Cancellieri <ccancellieri@anonymised.com…> wrote:

Hi all,
this is a call for vote for the GSIP 81 (getLegendGraphic as test):
http://geoserver.org/display/GEOS/GSIP+81±+GetLegendGraphic+as+text+%28JSON%29

So, long story short, it seems that you are returning out of GetLegendGraphic a summary
of the SLD in JSON format with some modifications:

  • the graphics are not referred to, but are embedded in the representation instead.
    What do you do with dynamic symbolizers that do have attributes in the symbol path,
    SVG, or Mark objects, or graphic fills and graphic strokes?
  • only the active parts of the style at the specified scale at returned

Anything else?

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.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


Andrea,

- the graphics are not referred to, but are embedded in the
representation instead.

I think this should be an option. By default the response should be a really simple string representation of the rules.
(see below)

What do you do with dynamic symbolizers that do have attributes in
the symbol path,

This is interesting case... mmm ... I think here the unique option will be resolving the url for each feature and serialize the list of obtained external graphic as a list of rules with the name initialized to the value of the resolved attribute.
For example:
<FeatureTypeStyle>
<Rule>
<Name>Flags</Name>
<Title>USA state flags</Title>
<PointSymbolizer>
<Graphic>
<ExternalGraphic>
<OnlineResource xlink:type="simple"
xlink:href="http://www.usautoparts.net/bmw/images/states/tn_$\{strToLowerCase\(STATE\_ABBR\)\}\.jpg&quot; />
<Format>image/gif</Format>
</ExternalGraphic>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>

will be resolved as:

 &lt;FeatureTypeStyle&gt;
    &lt;Rule&gt;
      &lt;Name&gt;alaska&lt;/Name&gt;
      &lt;Title&gt;USA state flags&lt;/Title&gt;
      &lt;PointSymbolizer&gt;
        &lt;Graphic&gt;
          &lt;ExternalGraphic&gt;
            &lt;OnlineResource xlink:type=&quot;simple&quot;
              xlink:href=&quot;http://www.usautoparts.net/bmw/images/states/tn_alaska.jpg&quot; /&gt;
            &lt;Format&gt;image/gif&lt;/Format&gt;
          &lt;/ExternalGraphic&gt;
        &lt;/Graphic&gt;
      &lt;/PointSymbolizer&gt;
    &lt;/Rule&gt;
    \.\.\.
    &lt;Rule&gt;
      &lt;Name&gt;wyoming&lt;/Name&gt;
      &lt;Title&gt;USA state flags&lt;/Title&gt;
      &lt;PointSymbolizer&gt;
        &lt;Graphic&gt;
          &lt;ExternalGraphic&gt;
            &lt;OnlineResource xlink:type=&quot;simple&quot;
              xlink:href=&quot;http://www.usautoparts.net/bmw/images/states/tn_wyoming.jpg&quot; /&gt;
            &lt;Format&gt;image/gif&lt;/Format&gt;
          &lt;/ExternalGraphic&gt;
        &lt;/Graphic&gt;
      &lt;/PointSymbolizer&gt;
    &lt;/Rule&gt;
  &lt;/FeatureTypeStyle&gt;

Then serialized as json.

If the OnlineResource is a relative path we have 2 ways to proceed:
- generate a base64 encoded string to encode and send the image.
- use getLegendGraphic with image output format to be able to serve images from the FileSystem (selecting them using the RULE parameter and probably the CQL_FIlter to select the feature by FeatureID f.e.). I think this (cql_filter) can be another good improvement if it is not supported.

SVG, or Mark objects, or graphic fills and graphic strokes?

As said the graphical objects can be: [default]
- serialized as is (json style representation) [I will provide this]

This will minimize the data transfer and the load on the target geoserver delegating render operation to the client library this make sense for standard Mark objects (ttf://, shape://, ...)

- rendered all graphic objects as embedded images into the response encoded as base64 string (json with graphic embedded). [resolve as embedded]

- provide links to external graphic using geoserver url(s):

F.e.:
http://localhost:80///geoserver/wms?REQUEST=GetLegendGraphic&VERSION=....&FORMAT=image/png&LAYER=layerName&RULE=RuleName&LEGEND_OPTIONS=forceLabels:off

NOTE: For dynamic symbolizers we need the cql_filter improvement

- only the active parts of the style at the specified scale at returned

Anything else?

Yes, there's another question regarding the outputFormat and the format parameter, currently the unique way to add as add on (without modify the current getLegendGraphic output format) is implementing another response handler and a new output format which may results in query like:

http://localhost:8080/geoserver/topp/wms?service=WMS&version=1.1.0&request=GetLegendGraphic&layer=topp:states&styles=population2&bbox=-124.73142200000001,24.955967,-66.969849,49.371735&width=780&height=330&srs=EPSG:4326&format=application/json&outputFormat=application/json

For a better integration of the getLegendGraphic I think we may define if we want to switch using different responseHandlers or continue working with outputFormats.

Carlo

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 87<<
054 Massarosa (LU)
Italy
phone: + 84 2313<<
fax: + 84 60272<<
mob: + 9 44549<<

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

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

+1

  This looks like something I would actually use though I have some
question marks about the json implementation. Its very hard to evaluate
without writing some code to actually use it. For instance, it is not
clear to me what the advantage of serialising the image versus supplying
a URL is.

Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.

+0

2012/11/13 Phil Scadden <p.scadden@anonymised.com>

+1

This looks like something I would actually use though I have some
question marks about the json implementation. Its very hard to evaluate
without writing some code to actually use it. For instance, it is not
clear to me what the advantage of serialising the image versus supplying
a URL is.

Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.


Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Phil,

thank you for your vote.

This looks like something I would actually use though I have some
question marks about the json implementation. Its very hard to evaluate
without writing some code to actually use it. For instance, it is not

Currently the javascript library we are using is under development but it will not be released until 12/12/12.

clear to me what the advantage of serialising the image versus supplying
a URL is.

Let's analyse differences:

Embedded URL advantages:
1. small and quick response body.
2. You can selectively download only really needed graphical resources.

Embedded URL disadvantages:
1. To show the graphic resources into the legend, multiple getLegendGraphic (filtered) requests to the GeoServer should be performed.

Embedded graphic resource advantages:
1. Get all the legend resources in one shot.
2. No other request are needed.

Embedded graphic resource disadvantages:
1. For some style you may have many external resources in some case this may result in a really big response.

So depending on the style you are using and the legend you want to generate, (sometime you only want to show the first (lower?) and the last (higher?) values), users may prefer the embedded url or the embedded graphic resource version.

Cheers,
Carlo Cancellieri

Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel