RE: [OpenMap Users] RE: Number Of Colors in RPF Layer

From: Chase Barrett <chase.barrett_at_issinc.com>
Date: Fri, 13 Jan 2006 10:43:21 -0700

Thanks Don,

I guess it's good I'm the first to mention it; perhaps our customers won't
be too heartbroken about the missing function ~8^)

Although I _am_ trying to manipulate a given layer's properties at runtime
by means of a UI, the colors are also fixed at 216 when initializing with a
properties file.

For instance, if I launch the OpenMap client and do a "File | Load
Properties" with the following props, the colors effectively remain at 216:

################################
# Scale: zoomed all the way out (1:scale)
openmap.Scale=5000000f
# Mercator projection (try "cadrg", "orthographic", ...)
openmap.Projection=CADRG
# Layers listed here appear on the Map in the order of their names.
openmap.layers=jrpf
# These layers are turned on when the map is first started.
openmap.startUpLayers=jrpf

### Java RPF properties
jrpf.class=com.bbn.openmap.layer.rpf.RpfLayer
jrpf.prettyName=CADRG
# This property should reflect the paths to the RPF directories
jrpf.paths=D:\\geodata\\onctpc;D:\\geodata\\GNCJNCN\\RPF;D:\\geodata\\GNCJNC
S\\RPF
# Number between 0-255: 0 is transparent, 255 is opaque
jrpf.opaque=255
# Number of colors to use on the maps - 16, 32, 216
jrpf.numberColors=16
# Display maps on startup
jrpf.showmaps=true
# Display attribute information on startup
jrpf.showinfo=false
# Scale images to fit the map scale
jrpf.scaleImages=true
jrpf.coverage=true
################################

When loading with the above properties, RpfColortable.setNumColors() will
sometimes have a value of "16" passed to it, (see breakpoints #2 and #3 in
the attached file), but apparently the flow of the code makes these calls
ineffective. I say this because at the time RpfColortable.
parseColorLookUpTable() is called with each new RpfFrame, the value of the
table's numberOfColors field is always 216, and its reducedColorTable field
is always "COLORS_216" (see breakpoint #8). Also, the images appear
identical when setting 16 or 216 in the properties file.



-----Original Message-----
From: Don Dietrick [mailto:dietrick_at_bbn.com]
Sent: Friday, January 13, 2006 9:06 AM
To: Chase Barrett
Cc: openmap-users_at_bbn.com
Subject: Re: [OpenMap Users] RE: Number Of Colors in RPF Layer

It looks like a bug, kinda. It looks like the RpfFrameCacheHandler
gets its RpfColorTable replaced with the frame's version that it last
loaded. The frame's colortable object is created with the default
settings, so you lose the properties settings.

I'm starting to remember why the code does this - originially, a
single colortable was used across all of the frames, and that
colortable was set via the properties. This worked because the
colortable was supposed to be the same across all frames, even though
each frame contains colortable information as well. The problems
started when RPF was being created without a consistent colortable
for a product (GNC, JNC, etc) and you'd get weird colors for some
frames when you mixed and matched data created at different times.
The solution to this was to just have each frame use the colortable
it has, and I think the API made it hard to pass the numberColors
property to the RpfFrame when it's colortable object is created.

And so this is the way it's been for years, and you're the first to
mention it. :)

- Don


On Jan 12, 2006, at 12:24 PM, Chase Barrett wrote:

> Any thoughts?
>
>
>
> From: Chase Barrett [mailto:chase.barrett_at_issinc.com]
> Sent: Thursday, January 05, 2006 2:04 PM
> To: 'openmap-users_at_bbn.com'
> Subject: Number Of Colors in RPF Layer
>
>
>
> Hello all,
>
>
>
> I've been looking at some ONC and JNC charts with the numberColors
> property set to various values. It seems that no matter what value
> I choose, there's no impact on the image appearance. So if I
> select 16, 32, or 216, the chart images appear identical.
>
>
>
> I placed a breakpoint in RpfColortable.setNumColors(), and it seems
> that this method is always passed a value of 216, even though the
> RpfLayer that the color table belongs to has an RpfViewAttributes
> object with a value of 16 in its numberOfColors field.
>
>
>
> Is this a bug?
>
>
>
> Thanks,
>
> Chase
>
>






--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Fri Jan 13 2006 - 12:45:50 EST

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:07 EDT