GeoServer
  1. GeoServer
  2. GEOS-434

Patch to add Label Shields to geotools literenderer

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.0 RC4.SC1
    • Fix Version/s: None
    • Component/s: WMS
    • Labels:
      None
    • Number of attachments :
      3

      Description

      This is a patch to the 1.3.0RC4.SC1 geotools subversion tag, which enables "Label Shields" in the SLD renderer.

      Here are a few examples.

      This textsymbolizer:
      <TextSymbolizer>
      <Label>
      <PropertyName xmlns="http://www.opengis.net/ogc/filter">RT_NUMBER</PropertyName>
      </Label>
      <Fill>
      <CssParameter name="fill">#000000</CssParameter>
      q</Fill>
      <Font>
      <CssParameter name="font-family">/usr/lib/j2sdk1.5-sun/jre/lib/fonts/LucidaSansDemiBold.ttf</CssParameter>
      <CssParameter name="font-weight">medium</CssParameter>
      <CssParameter name="font-style">bold</CssParameter>
      <CssParameter name="font-size">18</CssParameter>
      </Font>
      <Graphic>
      <Mark>
      <WellKnownName>circle</WellKnownName>
      <Fill>
      <CssParameter name="fill">#BBBBBB</CssParameter>
      </Fill>
      </Mark>
      <Opacity>.5</Opacity>
      <Size>30</Size>
      </Graphic>
      </TextSymbolizer>
      will produce the standard labeling, but with a gray circle of radius 30 pixels UNDERNEATH the label.

      The following textsymbolizer
      <TextSymbolizer>
      <Label>
      <PropertyName xmlns="http://www.opengis.net/ogc/filter">RT_NUMBER</PropertyName>
      </Label>
      <Fill>
      <CssParameter name="fill">#FFFFFF</CssParameter>
      </Fill>
      <Font>
      <CssParameter name="font-family">/usr/lib/j2sdk1.5-sun/jre/lib/fonts/LucidaSansDemiBold.ttf</CssParameter>
      <CssParameter name="font-weight">medium</CssParameter>
      <CssParameter name="font-style">bold</CssParameter>
      <CssParameter name="font-size">18</CssParameter>
      </Font>
      <Graphic>
      <ExternalGraphic>
      <OnlineResource xlink:href="http://<myip>/~sfarber/images/Interstate_shield.gif"/>
      <Format>image/gif</Format>
      </ExternalGraphic>
      <Size>30</Size>
      </Graphic>
      </TextSymbolizer>
      will produce the standard labeling, but with a 30x30pixel scaled instance of the graphic at the referenced URL UNDERNEATH the label.

      1. labelshields-geoserver-1.3.0.RC4.SC1.patch
        13 kB
        Saul Farber
      2. labelshields-geoserver-2.1-r17645.patch
        96 kB
        Saul Farber
      3. labelshields-r18876.patch
        13 kB
        Saul Farber

        Activity

        Hide
        dblasby added a comment -

        Patch application was voted down by geotools.

        There has been some recent talk about it using TextSymbolizer2, but the parser doesnt make textSymbolizer2's and the renderer doesnt know anything about them.

        Show
        dblasby added a comment - Patch application was voted down by geotools. There has been some recent talk about it using TextSymbolizer2, but the parser doesnt make textSymbolizer2's and the renderer doesnt know anything about them.
        Hide
        Saul Farber added a comment -

        Same patch, just keeping it up-to-date with the 2.1.x branch of geotools.

        Last patch failed on one chunk on latest revision. This patch is in-sync with revision
        17645

        Show
        Saul Farber added a comment - Same patch, just keeping it up-to-date with the 2.1.x branch of geotools. Last patch failed on one chunk on latest revision. This patch is in-sync with revision 17645
        Hide
        Saul Farber added a comment -

        Keeping patch in-sync with 2.1.x branch. Will forward-port (even though it's never going to be applied to the trunk!) to 2.2.x when geoserver moves there.

        I know this has been voted down, but I figure this is the place to keep the patch since most folks will find it here and it's centrally hosted/available.

        Show
        Saul Farber added a comment - Keeping patch in-sync with 2.1.x branch. Will forward-port (even though it's never going to be applied to the trunk!) to 2.2.x when geoserver moves there. I know this has been voted down, but I figure this is the place to keep the patch since most folks will find it here and it's centrally hosted/available.
        Hide
        Jody Garnett added a comment -

        Suel we seem to have a miss understanding, I voted -1 because geotools was not ready (did not have a convention in place) to support patches that extended functionality defined by a standard. -1 means not yet but I will help, and in response to your patch we have set up geotools to allow for this.

        I would love to see your patch applied to 2.2.x and included in a future geoserver release. The part we needed to do is completed and I would now vote +1. (The only negative vote is +0).

        Jody

        Show
        Jody Garnett added a comment - Suel we seem to have a miss understanding, I voted -1 because geotools was not ready (did not have a convention in place) to support patches that extended functionality defined by a standard. -1 means not yet but I will help, and in response to your patch we have set up geotools to allow for this. I would love to see your patch applied to 2.2.x and included in a future geoserver release. The part we needed to do is completed and I would now vote +1. (The only negative vote is +0). Jody
        Hide
        dblasby added a comment -

        I'm planning on moving this to 2.2.x quite soon. A Geoserver 1.3.0a-experimental should be out soon that is based on 2.2.x.

        I just finished processing a tonne of highway data, so I'll probably get to this in the next 2 weeks. I'm planning on basically taking saul's ideas and generalizing them a wee bit.

        Saul - I'll be contacting you when i get to it. Perhaps you could give me some feedback and do a bit of testing for me?

        Show
        dblasby added a comment - I'm planning on moving this to 2.2.x quite soon. A Geoserver 1.3.0a-experimental should be out soon that is based on 2.2.x. I just finished processing a tonne of highway data, so I'll probably get to this in the next 2 weeks. I'm planning on basically taking saul's ideas and generalizing them a wee bit. Saul - I'll be contacting you when i get to it. Perhaps you could give me some feedback and do a bit of testing for me?
        Hide
        Chris Holmes added a comment -

        This must have gotten in, no? We have shields on http://sigma.openplans.org

        Show
        Chris Holmes added a comment - This must have gotten in, no? We have shields on http://sigma.openplans.org

          People

          • Assignee:
            dblasby
            Reporter:
            Saul Farber
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: