Discussion:
[Geoserver-users] Adding/creating new Shape symbols
Raif S. Naffah
2017-07-24 02:35:07 UTC
Permalink
hi all,

i'm looking at adding few new Shape Symbols [1] to the current default
set to allow some shapes (the first 7) to appear _denser_ than the
current ones at the same Mark's Size.

i understand that i can obtain the same effect by using smaller Size
values (e.g. 8 instead of 16) however and b/c my SLDs are generated w/
FreeMarker and already use Transformation Functions [2] for selecting
the Shape to use as the WellKnownName value i believe i need to use the
same Size value for all resulting shapes.

here is a fragment of such SLD to illustrate what i'm talking about:

...
<sld:GraphicFill>
<sld:Graphic>
<sld:Mark>
<WellKnownName>
<ogc:Function name="Recode">
<ogc:PropertyName>V</ogc:PropertyName>
<#list vfValues as paint>
<ogc:Literal>${thresholds[paint_index]}</ogc:Literal>
<ogc:Literal>${paint}</ogc:Literal>
</#list>
</ogc:Function>
</WellKnownName>
<sld:Stroke>
<CssParameter name="stroke">#d3d3d3</CssParameter>
<CssParameter name="stroke-width">1</CssParameter>
</sld:Stroke>
</sld:Mark>
<sld:Size>16</sld:Size>
</sld:Graphic>
</sld:GraphicFill>
...

would appreciate any pointers to where i can add those new graphics or
the module/class where they are (programmatically) created and
registered.

TIA + cheers;


[1]
http://docs.geoserver.org/stable/en/user/styling/sld/extensions/pointsymbols.html
[2]
http://docs.geoserver.org/stable/en/user/styling/sld/tipstricks/transformation-func.html#categorize
--
rsn

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

Geoserver-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Andrea Aime
2017-07-24 07:05:35 UTC
Permalink
Post by Raif S. Naffah
hi all,
i'm looking at adding few new Shape Symbols [1] to the current default
set to allow some shapes (the first 7) to appear _denser_ than the
current ones at the same Mark's Size.
i understand that i can obtain the same effect by using smaller Size
values (e.g. 8 instead of 16) however and b/c my SLDs are generated w/
FreeMarker and already use Transformation Functions [2] for selecting
the Shape to use as the WellKnownName value i believe i need to use the
same Size value for all resulting shapes.
I don't see why? The same size means the spacing will be the same, size
is absolute, it's not a scaling factor.

Mind, shapes are commonly normalized to size 1 and then scaled from there
to the size specified in the so unless you're taking special measures you
probably won't get the desired result.
Post by Raif S. Naffah
would appreciate any pointers to where i can add those new graphics or
the module/class where they are (programmatically) created and
registered.
http://docs.geotools.org/stable/javadocs/org/geotools/renderer/style/MarkFactory.html
http://docs.geotools.org/stable/userguide/library/render/icon.html

(and then look in the code for implementors of that interface).

Regards,

Andrea Aime

==
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.

Continue reading on narkive:
Loading...