[Geoserver-users] SLD Issue - PolygonSymbolizer with Cartographic Symbols on top

Hi All
I tried to post this yesterday and i dont think it worked.

I am trying to use a True Type Font (.tff) symbol to style a polygon. I
followed the post on the Blog and have got it working, however there are
three things that i would like to be able to do or change;
http://www.nabble.com/file/p21855746/symbology.jpg

1. The symbol is upside down (see attached image) - i have since flipped
some of the Fonts in the .tff library and they now appear the correct way
up. Is there a way to do this in the SLD rather than having to flip all my
symbols??

2. The symbol seems to be appear regularly across the polygon, in a grid.
this is too strict so wondering if there was a way for a random amount of
symbols to appear in the polygon?

3. The size of the symbol chnages based on the scale. Can i lock it to just
being a particular size no matter what scale.

This is my SLD rule that i am using

<Rule>
          <Name>0000 Foreshore</Name>
          <Title>0000 Foreshore</Title>
      <!--Filter based on Dotted Eyes Legend Classification -->
          <ogc:Filter>
            <ogc:PropertyIsEqualTo>
              <ogc:PropertyName>LEGEND</ogc:PropertyName>
              <ogc:Literal>0000 Foreshore</ogc:Literal>
            </ogc:PropertyIsEqualTo>
          </ogc:Filter>

      <!-- Max scale to show this layer-->
      <MaxScaleDenominator>7000</MaxScaleDenominator>

          <PolygonSymbolizer>
            <Fill>
              <CssParameter name="fill">#BEFFFF</CssParameter>
            </Fill>
          </PolygonSymbolizer>
          <PolygonSymbolizer>
            <Fill>
                <GraphicFill>
          <Graphic>
                  <Mark>
                    <WellKnownName>ttf://OSMasterMap#0x4F</WellKnownName>
<!-- this will need changing depending on the symbol -->
                    <Fill>
                      <CssParameter name="fill">#0099ff</CssParameter>
                    </Fill>
      <Stroke>
                      <CssParameter
name="stroke-fill">#0099ff</CssParameter>
          <CssParameter name="stroke-width">0.087</CssParameter>
                      <CssParameter name="stroke-opacity">1</CssParameter>
                    </Stroke>
                  </Mark>
                  <Size>1</Size> <!-- this value needs to be altered to give
a random pattern to the symbology -->
                </Graphic>
    </GraphicFill>
            </Fill>

          </PolygonSymbolizer>
        </Rule>

It would be great to solve these as i want to used the OS styling guide

Thanks

Tim

--
View this message in context: http://www.nabble.com/SLD-Issue---PolygonSymbolizer-with-Cartographic-Symbols-on-top-tp21855746p21855746.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

TJMartin ha scritto:

Hi All
I tried to post this yesterday and i dont think it worked.

I am trying to use a True Type Font (.tff) symbol to style a polygon. I
followed the post on the Blog and have got it working, however there are
three things that i would like to be able to do or change;
http://www.nabble.com/file/p21855746/symbology.jpg

1. The symbol is upside down (see attached image) - i have since flipped
some of the Fonts in the .tff library and they now appear the correct way
up. Is there a way to do this in the SLD rather than having to flip all my
symbols??

Hum, yeah, I can confirm this. Can you open a bug report on jira.codehaus.org?

2. The symbol seems to be appear regularly across the polygon, in a grid.
this is too strict so wondering if there was a way for a random amount of
symbols to appear in the polygon?

Nope, the fill is made creating a regular tiling whatever symbol/image
you provide, there is no randomness involved.
Wondering how you would expect to configure such a random behaviour,
and how the result would look like (a truly random generator can give
you all symbols located in 10% of the polygon in one run, and have
the evenly distributed in the next).

3. The size of the symbol chnages based on the scale. Can i lock it to just
being a particular size no matter what scale.

This I cannot reproduce, the dimension of the symbol is the same independent of the scale, always the same number of pixels.
(attached two images filled with the same ttf symbol, which should
be looking upwards as you noticed).

Cheers
Andrea

This is my SLD rule that i am using

<Rule>
          <Name>0000 Foreshore</Name>
          <Title>0000 Foreshore</Title>
      <!--Filter based on Dotted Eyes Legend Classification -->
          <ogc:Filter>
            <ogc:PropertyIsEqualTo>
              <ogc:PropertyName>LEGEND</ogc:PropertyName>
              <ogc:Literal>0000 Foreshore</ogc:Literal>
            </ogc:PropertyIsEqualTo>
          </ogc:Filter>

      <!-- Max scale to show this layer-->
      <MaxScaleDenominator>7000</MaxScaleDenominator>

          <PolygonSymbolizer>
            <Fill>
              <CssParameter name="fill">#BEFFFF</CssParameter>
            </Fill>
          </PolygonSymbolizer>
          <PolygonSymbolizer>
            <Fill>
                <GraphicFill>
          <Graphic>
                  <Mark>
                    <WellKnownName>ttf://OSMasterMap#0x4F</WellKnownName>
<!-- this will need changing depending on the symbol -->
                    <Fill>
                      <CssParameter name="fill">#0099ff</CssParameter>
                    </Fill>
      <Stroke>
                      <CssParameter
name="stroke-fill">#0099ff</CssParameter>
          <CssParameter name="stroke-width">0.087</CssParameter>
                      <CssParameter name="stroke-opacity">1</CssParameter>
                    </Stroke>
                  </Mark>
                  <Size>1</Size> <!-- this value needs to be altered to give
a random pattern to the symbology -->
                </Graphic>
    </GraphicFill>
            </Fill>

          </PolygonSymbolizer> </Rule>

It would be great to solve these as i want to used the OS styling guide

Thanks

Tim

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

ttfSymbolZoom2.png

ttfSymbolZoom1.png

Hi Andrea

I have posted the first issue as a bug on Codehaus. Hope i did it right
(first time)

Would it be possible to change the way it does the symbol - maybe not
randomly then but with greater spaces. Could i use

<VendorOption name="group">no</VendorOption>
        
         <!-- add a little extra space around the labels so the map isnt
cluttered -->
        <VendorOption name="spaceAround">5</VendorOption>

taken from the ComplexLabelling tutorial. This seems to make sure there is
space around text i wonder if it could be applied in my problem.

I will test the size of the symbol and if it does seem to be scaling i will
give your some examples

thanks

Tim

Andrea Aime-4 wrote:

TJMartin ha scritto:

Hi All
I tried to post this yesterday and i dont think it worked.

I am trying to use a True Type Font (.tff) symbol to style a polygon. I
followed the post on the Blog and have got it working, however there are
three things that i would like to be able to do or change;
http://www.nabble.com/file/p21855746/symbology.jpg

1. The symbol is upside down (see attached image) - i have since flipped
some of the Fonts in the .tff library and they now appear the correct way
up. Is there a way to do this in the SLD rather than having to flip all
my
symbols??

Hum, yeah, I can confirm this. Can you open a bug report on
jira.codehaus.org?

2. The symbol seems to be appear regularly across the polygon, in a grid.
this is too strict so wondering if there was a way for a random amount of
symbols to appear in the polygon?

Nope, the fill is made creating a regular tiling whatever symbol/image
you provide, there is no randomness involved.
Wondering how you would expect to configure such a random behaviour,
and how the result would look like (a truly random generator can give
you all symbols located in 10% of the polygon in one run, and have
the evenly distributed in the next).

3. The size of the symbol chnages based on the scale. Can i lock it to
just
being a particular size no matter what scale.

This I cannot reproduce, the dimension of the symbol is the same
independent of the scale, always the same number of pixels.
(attached two images filled with the same ttf symbol, which should
be looking upwards as you noticed).

Cheers
Andrea

This is my SLD rule that i am using

<Rule>
          <Name>0000 Foreshore</Name>
          <Title>0000 Foreshore</Title>
      <!--Filter based on Dotted Eyes Legend Classification -->
          <ogc:Filter>
            <ogc:PropertyIsEqualTo>
              <ogc:PropertyName>LEGEND</ogc:PropertyName>
              <ogc:Literal>0000 Foreshore</ogc:Literal>
            </ogc:PropertyIsEqualTo>
          </ogc:Filter>

      <!-- Max scale to show this layer-->
      <MaxScaleDenominator>7000</MaxScaleDenominator>

          <PolygonSymbolizer>
            <Fill>
              <CssParameter name="fill">#BEFFFF</CssParameter>
            </Fill>
          </PolygonSymbolizer>
          <PolygonSymbolizer>
            <Fill>
                <GraphicFill>
          <Graphic>
                  <Mark>
                    <WellKnownName>ttf://OSMasterMap#0x4F</WellKnownName>
<!-- this will need changing depending on the symbol -->
                    <Fill>
                      <CssParameter name="fill">#0099ff</CssParameter>
                    </Fill>
      <Stroke>
                      <CssParameter
name="stroke-fill">#0099ff</CssParameter>
          <CssParameter name="stroke-width">0.087</CssParameter>
                      <CssParameter
name="stroke-opacity">1</CssParameter>
                    </Stroke>
                  </Mark>
                  <Size>1</Size> <!-- this value needs to be altered to
give
a random pattern to the symbology -->
                </Graphic>
    </GraphicFill>
            </Fill>

          </PolygonSymbolizer>
        </Rule>

It would be great to solve these as i want to used the OS styling guide

Thanks

Tim

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with
Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code
to
build responsive, highly engaging applications that combine the power of
local
resources and data with the reach of the web. Download the Adobe AIR SDK
and
Ajax docs to start building applications
today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context: http://www.nabble.com/SLD-Issue---PolygonSymbolizer-with-Cartographic-Symbols-on-top-tp21855746p21856452.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

TJMartin ha scritto:

Hi Andrea

I have posted the first issue as a bug on Codehaus. Hope i did it right
(first time)

Yep, it was ok, thank you.

Would it be possible to change the way it does the symbol - maybe not
randomly then but with greater spaces. Could i use

<VendorOption name="group">no</VendorOption>
                 <!-- add a little extra space around the labels so the map isnt
cluttered -->
        <VendorOption name="spaceAround">5</VendorOption>

taken from the ComplexLabelling tutorial. This seems to make sure there is
space around text i wonder if it could be applied in my problem.

Ah, I see. The SLD specification has no way to deal with spacing of
symbols. The way they designed it, it only allows a very small number
of markers, the ability to use ttf and other symbols sets is our own
extension.
So I guess the SLD committee thought that if you want more spacing, you
should create a gif/png to be used as an external graphics, and put the
extra spacing directly in the image.

To do so we'd need to carve another hole into the SLD schema and add
a place for VendorOption under Graphic or GraphicFill as well.
This is annoying as our SLD gets more and more distant from the
specification one, but if enough people require it I'll consider
doing it.

In the meantime, can you open another jira issue to ask for this
new feature?

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

I found this old thread as I was searchin for a solution to my problem.

Did this feature ever emerge in geoserver? (did not find it in the
documentation).

I have a need to fill polygons with (small) symbols (small compared to the
size of the polygon). I want there to be a spacing between the symbols,
around 10 times the size of symbol.

Is this possible? or is the best solution to include that spacing into the
symbol (svg)?

thank you in advance,

Jakob

aaime wrote

TJMartin ha scritto:

Hi Andrea

I have posted the first issue as a bug on Codehaus. Hope i did it right
(first time)

Yep, it was ok, thank you.

Would it be possible to change the way it does the symbol - maybe not
randomly then but with greater spaces. Could i use

<VendorOption name="group">no</VendorOption>
        
        <VendorOption name="spaceAround">5</VendorOption>

taken from the ComplexLabelling tutorial. This seems to make sure there
is
space around text i wonder if it could be applied in my problem.

Ah, I see. The SLD specification has no way to deal with spacing of
symbols. The way they designed it, it only allows a very small number
of markers, the ability to use ttf and other symbols sets is our own
extension.
So I guess the SLD committee thought that if you want more spacing, you
should create a gif/png to be used as an external graphics, and put the
extra spacing directly in the image.

To do so we'd need to carve another hole into the SLD schema and add
a place for VendorOption under Graphic or GraphicFill as well.
This is annoying as our SLD gets more and more distant from the
specification one, but if enough people require it I'll consider
doing it.

In the meantime, can you open another jira issue to ask for this
new feature?

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with
Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code
to
build responsive, highly engaging applications that combine the power of
local
resources and data with the reach of the web. Download the Adobe AIR SDK
and
Ajax docs to start building applications
today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Geoserver-users mailing list
Geoserver-users@anonymised.com
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/SLD-Issue-PolygonSymbolizer-with-Cartographic-Symbols-on-top-tp3806385p4999935.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Jakob,

For your confirmation, I typically address this use case by adding the space around the symbol in the ExternalGraphic.

Regards,

Edward

Date: Wed, 5 Sep 2012 07:29:08 -0700
From: jventin@anonymised.com
To: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] SLD Issue - PolygonSymbolizer with Cartographic Symbols on top

I found this old thread as I was searchin for a solution to my problem.

Did this feature ever emerge in geoserver? (did not find it in the
documentation).

I have a need to fill polygons with (small) symbols (small compared to the
size of the polygon). I want there to be a spacing between the symbols,
around 10 times the size of symbol.

Is this possible? or is the best solution to include that spacing into the
symbol (svg)?

thank you in advance,

Jakob

aaime wrote

TJMartin ha scritto:

Hi Andrea

I have posted the first issue as a bug on Codehaus. Hope i did it right
(first time)

Yep, it was ok, thank you.

Would it be possible to change the way it does the symbol - maybe not
randomly then but with greater spaces. Could i use

no

5

taken from the ComplexLabelling tutorial. This seems to make sure there
is
space around text i wonder if it could be applied in my problem.

Ah, I see. The SLD specification has no way to deal with spacing of
symbols. The way they designed it, it only allows a very small number
of markers, the ability to use ttf and other symbols sets is our own
extension.
So I guess the SLD committee thought that if you want more spacing, you
should create a gif/png to be used as an external graphics, and put the
extra spacing directly in the image.

To do so we’d need to carve another hole into the SLD schema and add
a place for VendorOption under Graphic or GraphicFill as well.
This is annoying as our SLD gets more and more distant from the
specification one, but if enough people require it I’ll consider
doing it.

In the meantime, can you open another jira issue to ask for this
new feature?

Cheers
Andrea


Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.


Create and Deploy Rich Internet Apps outside the browser with
Adobe(R)AIR™
software. With Adobe AIR, Ajax developers can use existing skills and code
to
build responsive, highly engaging applications that combine the power of
local
resources and data with the reach of the web. Download the Adobe AIR SDK
and
Ajax docs to start building applications
today-http://p.sf.net/sfu/adobe-com


Geoserver-users mailing list
Geoserver-users@anonymised.com
https://lists.sourceforge.net/lists/listinfo/geoserver-users


View this message in context: http://osgeo-org.1560.n6.nabble.com/SLD-Issue-PolygonSymbolizer-with-Cartographic-Symbols-on-top-tp3806385p4999935.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


Live Security Virtual Conference
Exclusive live event will cover all the ways today’s security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/


Geoserver-users mailing list
Geoserver-users@anonymised.comet
https://lists.sourceforge.net/lists/listinfo/geoserver-users

On Wed, Sep 5, 2012 at 4:29 PM, obtin <jventin@…95…> wrote:

I found this old thread as I was searchin for a solution to my problem.

Did this feature ever emerge in geoserver? (did not find it in the
documentation).

It was never implemented, still waiting for someone to either fund it or
to code it in his/her spare time

I have a need to fill polygons with (small) symbols (small compared to the
size of the polygon). I want there to be a spacing between the symbols,
around 10 times the size of symbol.

Is this possible? or is the best solution to include that spacing into the
symbol (svg)?

What Edward said, you have to encode the space in the symbol

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 962313
mob: +39 339 8844549

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