Jody Garnett ha scritto:
> Alessio Fabiani wrote:
...
> But really this just seems to be a problem of generating the document
> want based on the resulting categorization object right? Do we need to
> change the generated ranges? or just how we interpret them...
I had to do both. The end user found anyting other than closed intervals
too difficult to understand, so I had to change the way we generated
the rules out of the classification output (this is presentation changes
only).
Yet, I also had to work around intervals like {0 0} {0 0} that do
not make sense once you try to apply them, since the first rule you
generate will catch all the features whose attribute is 0.
In the end my code just ignores subsequent intervals that do match
the rule maxInterval(i) == maxInterval(i-1). This could have been done
in the quantile function, but as I noted in gt2, this initial suggestion
did not seem to find good feedback so I just gave up.
> As for closing intervals or not we could make separate function names;
> so it is really explicit what is going on (rather than having a magic
> boolean flag). I have have suggested we check what the "offical"
> function does for this work as recently defined in the SE 1.1
> specification; but thus far nobody has done it...
This is not a matter of what is official, it's a matter of what the
customer wants. They don't give a damn to OGC standards, I already
tried, and they found WMS calls (the simplest example of OGC standard)
way too complex.
> So let me look it up, and tag in Eclesia who actually cares about this
> stuff...
> They have:
> - Categorization: The transformation of continuous values to distinct
> values. This is for example needed to generate choropleth maps from
> continuous attributes. Another example would be the stepwise selection
> of different text heights or line widths in dependence from such an
> attribute.
> - Interpolation: Transformation of continuous values by a function
> defined on a number of nodes. This is used to adjust the value
> distribution of an attribute to the desired distribution of a continuous
> symbolization control variable (like size, width, color, etc).
> - Recoding: Transformation of discrete values to any other values. This
> is needed when integers have to be translated into text or, reversely,
> text contents into other texts or numeric values or colors.
>
> So it looks like "Categoriation" is the one we care about ... here is
> the example:
>> <SvgParameter name="stroke-width">
>> <Categorize fallbackValue="1">
>> <LookupValue>
>> <ogc:PropertyName>vehiclesPerHour</ogc:PropertyName>
>> </LookupValue>
>> <Value>1</Value>
>> <Threshold>5000</Threshold>
>> <Value>2</Value>
>> <Threshold>15000</Threshold>
>> <Value>3</Value>
>> <Threshold>40000</Threshold>
>> <Value>4</Value>
>> <Threshold>75000</Threshold>
>> <Value>5</Value>
>> </Categorize>
>> </SvgParameter>
> To be interpreted as (4999 or less: 1 pixel; 5000..14999: 2 pixel;
> 15000..39999: 3 pixel; 40000..74999: 4 pixel; 75000+: 5 pixel).
Interesting, I did not know SE allowed for this. Wow, this means
in SE it's possible to make crosstab like maps easily, that is, for
example, have the line width depend on one attribute, and the line color
depend on another.
> So the function we currently have should be called renamed
> "categorization", and we can make up a new function for the "closed"
> intervals?
> Thinking ...
>
> if we really want to represent closed intervals I would generate the
> same data structure and produce something like this ...
>
> x <= 0 no data
> 0 <= x <= 10 yellow
> 10 < x <= 20 orange
> 20 < x <= 30 red
> 30 < x no data
Nope, when the user saw the open intervals for the first and last rules
he thought the meaning was exactly like the one you proposed and asked
us to remove the useless rules (first and last). What he wants is
exactly this:
0 <= x <= 10 yellow
10 < x <= 20 orange
20 < x <= 30 red
The first implementation of the sldService by FAO used to output this
instead and confused the hell out of the users:
x <= 10 yellow
10 < x <= 20 orange
20 < x red
But as we both noted, this is just a matter of interpreting the
classification function outputs.
Cheers
Andrea
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel