Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] points of different sizes and lines ofdifferentthicknesses

Dan Putler wrote:
Hi Jody,

I've leaned something. Much better than my approach. Jody, does this
approach allow for the inclusion of customized point markers in either
an svg or png file?
Yes it does. uDig uses the full "Style Layer Descriptor" specification for our styles; so you can go and read the OGC document for the details on what is possible. Here is what I remember on how to do it ...
- For your PointSymbolizer
- Use an "ExternalGraphic" (rather than a WellKnownName like uDig does by default), the external graphic has a URL to the PNG or SVG to draw

But yeah SLD is very flexible; you can repeat your svg graphics along a line if you want, or have text labels follow roads etc... it is pretty crazy. For the next round of the specification (already out and called Symbology Encoding 1.1 ) you can do inline SVG point markers. A volunteer is working on Symbology Encoding 1.1 over on GeoTools so we can try out his work on trunk as it is made available.

Jody
Dan

On Fri, 2008-05-09 at 09:25 -0700, Jody Garnett wrote:
Chang, Elizabeth wrote:
Hi, I am new to UDIG and a very new newbie. I have a question about UDIG capabilities. Is it possible to show points of different sizes and colors for objects (like a small dot for a small city and a large circle for a large city)and create lines of different thicknesses or colors (ideally be able to change the thickness of a single line at different points) using the style/theme window

This is the kind of thing you need to do "by hand" using the advanced tab of the Style Editor Dialog ...

The line width right now is a number:
...
   <LineSymbolizer>
	<Stroke>
	    <CssParameter name="stroke">#319738</CssParameter>
            <CssParameter name="stroke-width">2</CssParameter>
        </Stroke>
   </LineSymbolizer>
...
You need to change it to an expression:
e width right now is a number:
...
   <LineSymbolizer>
	<Stroke>
	    <CssParameter name="stroke">#319738</CssParameter>
            <CssParameter name="stroke-width"><PropertyName>ATTRIBUTE_NAME</PropertyName></CssParameter>
        </Stroke>
   </LineSymbolizer>
...
Do do more complicated expressions (say based on your city population) you can get creative.

<Add><Div><PropertyName>population</PropertyName><Literal>10000</Div><Literal>1</Literal></Add>


For some additional fun examples check this out:
- http://geoserver.org/display/GEOSDOC/SLD+Intro+Tutorial

For the one about changing width along a single Line you may be out of luck, I can think of some bad ways to do it ... but you are starting to get into "Linear Referencing System" problems; so the Geometry stores X, Y, Z and M (for measure) and thus far only Oracle is supporting that out of the DataStores uDig uses.
If not, I was wondering if you have considered adding this feature and how hard it would be for me to try to add this feature. Where would I start?

You can certaintly write your own renderer (for the line width problem), have a look at the sameple code in the developers guide; there is an example renderer checked into svn.
I also have a second question about the save/save As feature. Have you considered adding this feature and is this something a newbie like me could do?

Actually we used to always do an Open / Save / Save As lifecycle; but people hated it so now we auto save. You are more than welcome to add a Save As command; it should be able to duplicate the open Map, change the name and save the result...

Cheers,
Jody
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel



Back to the top