[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [udig-devel] Single Band Raster Styling
|
Hi Emily,
testing the new raster part.
I did my testing with a 1Gb tif, so that could work out as a stresstest :)
When opening it opened on my own raster styler. The file already had
an SLD file, so a style loaded.
When I switched to the new styler, I got this:
java.lang.NullPointerException
at net.refractions.udig.style.raster.ui.UniqueValuesPanel$TableColumn.getValue(UniqueValuesPanel.java:145)
at net.refractions.udig.style.raster.ui.UniqueValuesPanel$TableColumn.access$2(UniqueValuesPanel.java:141)
at net.refractions.udig.style.raster.ui.UniqueValuesPanel$TableLabelProvider.getText(UniqueValuesPanel.java:546)
at net.refractions.udig.style.raster.ui.UniqueValuesPanel$TableLabelProvider.update(UniqueValuesPanel.java:554)
at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:152)
at org.eclipse.jface.viewers.AbstractTableViewer.doUpdateItem(AbstractTableViewer.java:399)
at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:485)
...
at net.refractions.udig.style.raster.ui.SingleBandEditorPage.init(SingleBandEditorPage.java:520)
at net.refractions.udig.style.raster.ui.SingleBandEditorPage.createPageContent(SingleBandEditorPage.java:274)
at net.refractions.udig.style.sld.editor.StyleEditorPage.createControl(StyleEditorPage.java:94)
....
Then the gui seemed to load properly anyways for ramps. Maybe a
problem of reading an existing SLD?
In the case of intervals I get:
java.lang.NullPointerException
at net.refractions.udig.style.raster.ui.IntervalValuesPanel$TableColumn.getValue(IntervalValuesPanel.java:149)
at net.refractions.udig.style.raster.ui.IntervalValuesPanel$TableLabelProvider.getText(IntervalValuesPanel.java:489)
at net.refractions.udig.style.raster.ui.IntervalValuesPanel$TableLabelProvider.update(IntervalValuesPanel.java:497)
at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:152)
at org.eclipse.jface.viewers.AbstractTableViewer.doUpdateItem(AbstractTableViewer.java:399)
at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:485)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
and the values are not loaded in the gui.
> I think I addressed most of your problems/requests. I added the ability to
> format the labels, and initialize the formatting based on the raster data
> type, added the one click export, fixed some bugs. Have a look at let me
> know.
Emily, I love this guy, I really love it. Fast to use, with all the
nice features and the formatting works properly along all the modes.
One click export is great.
Really a high quality thing, thank you!
> As for the plugin, I created a new plugin as it was easiest for me at the
> time. I can integrate with an existing plugin.
>
> How about I put it into the net.refractions.udig.style.sld plugin with some
> of the other raster styling pages?
That might be the best idea. Regarding "my" raster stylers. One is for
GRASS rasters (no SLD), so that one needs to be kept where it is. The
other one wanted to serve the same purpose of yours, only yours is a
great deal better now. :)
So I would be keen to retire it, but it still has an important feature
that is necessary in raster styling.
Some of the colortables have coded values.
Let me give you two examples (test them in the old raster styler):
1) Corine Landcover
This is the colormap for the landcover. Its values are ufficially
coded, so for that map I would not even want to calculate the values
of the map, just apply a color to a certain value. In the old styler
if you select it, it ignores the values of the map and creates an sld
based on the coded value inthe colortable.
2) Logarithmic
Sometimes you have maps that range between 1 and very high numbers,
where you might have high presence of low ranges and very few high
values. One example is the total contributing area of a watershed [1].
In that case a equally subdivided ramp would create more or less a map
of just one color, because most of it lies inside a certain range. In
that case it is mandatory to have the possibility to have a
logarithmic scale (the image in [1] is styled in a log way, which is
why it shows nicely). Also that scale is coded to have log breakpoints
(1, 10, 100, 1000, 10000,...) instead of equal intervals. It ignores
the values and applies that colortable.
To summarize:
- there would be the need to apply a colortable straight, with its
contained values (case 1 and partially case 2)
- case two could be better solved with the "quantile function" as
classification function, as already used in the vector styler
I am not sure if this is something you have time/interest to work on
and I am not asking that, you already did a great job here. You asked
for comments and here they came :) I only would like to leave the old
styler active (maybe with the name changed to "legacy" or something
that would use it a second choice) until we do not have such
functionalities, that is all.
About renaming:
- feel free to change the name of the old styler to "Legacy Single
Banded Raster Styler"
- what about changing also the name of the "Simple Raster" editor?
Apart of the fact that I never used it in my life, but it looks like
something that would work only for imagery. Could we switch it off for
single band rasters and enable it only in the multi case? And maybe
change the name to "Imagery"?
What do you think?
Cheers,
Andrea
[1] http://code.google.com/p/jgrasstools/wiki/Tca
>
>
> Emily
>
>
>
>
> On 15/02/2013 10:51 PM, andrea antonello wrote:
>>
>> Hi Emily,
>>
>>> I'll pass on the massive raster for now :) I was able to get a similar
>>> error with something else I was testing. Perhaps when I update you can
>>> test
>>> again for me.
>>
>>
>> Sure thing!
>>
>> [...]
>>>
>>> The "Compute Values" dialog has very little to do with sld. It basically
>>> computes a set of numbers.
>>> For example, for equal intervals it computes the min and max of the
>>> raster
>>> and divides it by the number of intervals you requested. The "values to
>>> ignore" are values that are not taken into account when computing the min
>>> and max.
>>>
>>> So if your raster has the value -9999,0-10 and you don't put anything in
>>> the
>>> "values to ignore" dialog you'll get breaks of -9999, -8998, -7997, ...
>>> 10.
>>> If you put -9999 in the "values to ignore" box then you will get breaks
>>> of
>>> 0,1,2....10.
>>
>>
>> ok, which sounds reasonable. So when it comes to style, they are
>> indeed ignored and no longer available.
>>
>>> For your issue of the collar when reprojection orthophotos, you will need
>>> to
>>> add an extra row to the map theming table (on the main page) with an
>>> opacity
>>> of 0, value of the "collar" value, and a label of "-no data-" (if you
>>> don't
>>> want it to show up in the legend).
>>
>>
>> Ok. In the ortophoto case it is a bit more complicated, since it is
>> not single banded, but that is not the topic here, since the styler is
>> single banded.
>>
>>> At one point in the past you mentioned NaN numbers in rasters - I get the
>>> impression the geotools styling engine does not support this? As soon as
>>> I
>>> put a NaN value in the sld, all other styling is ignored. Perhaps I am
>>> doing
>>> something wrong.
>>
>>
>> No, you are right, geotools already handles them and ignores them when
>> rendering.
>> So they simply do not appear.
>> The problem I found sometimes, is that in the case of adf esri
>> binaries, the novalue is not handled properly, being (from memory) a
>> Float.MAX_VALUE or something similar. In that case it is handy to be
>> able to set it. That applies to styling, if you are doing processing,
>> then you will need to remove them anyways with some mapalgebra.
>>
>> One more question. I see you created a new plugin, which is a bit
>> against the try we are having to merge plugins instead of adding new.
>> Is this bound to the need of the plugin's namespace? Your styler
>> should really replace my single band raster styler, since it is
>> better. Let's discuss how to best proceed.
>>
>> Cheers,
>> Andrea
>>
>>
>>
>>>
>>>
>>> Emily
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> User-friendly Desktop Internet GIS (uDig)
>>> http://udig.refractions.net
>>> http://lists.refractions.net/mailman/listinfo/udig-devel
>>
>> _______________________________________________
>> User-friendly Desktop Internet GIS (uDig)
>> http://udig.refractions.net
>> http://lists.refractions.net/mailman/listinfo/udig-devel
>>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel