Re: [OpenMap Users] RPF layer in OpenMap 4.6.2

From: Don Dietrick <dietrick_at_bbn.com>
Date: Fri, 1 Apr 2005 08:21:20 -0500

So, you want to limit the layer to display a subset of the available
coverage types?

On Mar 30, 2005, at 9:48 AM, Ammata Soutdarany wrote:

> I'm trying to add a functionality to allow users to select multiple
> coverages for a CADRG map data. Currently, the RPF layer only allows
> the
> selection of 1 coverage or all coverages via the property file
> (example:
> rpf.chartSeries=ANY). I extended the RpfTocHandler class and
> overwrote the
> getBestCoverageEntry and getCatalogCoverage methods. The
> rpf.chartSeries
> property will now contain a space delimited series of chart code (ex.
> rpf.chartSeries=GN JN MM). Here are the changes I made to
> RpfTocHandler.
>
> public List getBestCoverageEntry(float ullat, float ullon, float
> lrlat,
> float lrlon, CADRG proj,
> RpfViewAttributes viewAtts) { ...
> if (scaleFactor >= lowerScaleFactorLimit
> && scaleFactor <= upperScaleFactorLimit
> &&
> (chartSeries.equalsIgnoreCase(RpfViewAttributes.ANY)
> ||
>
> //chartSeries.equalsIgnoreCase(currentEntry.info.seriesCode))) {
> IsInChartSeries(chartSeries,
> currentEntry.coverage.chartCode))) {
>
>
> public boolean IsInChartSeries(String chartSeries, String
> compareStr)
> {
>
> StringTokenizer Tok = new StringTokenizer(chartSeries);
> while(Tok.hasMoreTokens())
> {
> if(true ==
> Tok.nextToken().equalsIgnoreCase(compareStr))
> {
> return true;
> }
> }
> return false;
> }
>
> I ran into a problem with a TOC entry containing the chart series
> "MM". For
> some reason, an entry containing the chart series "MM" had a
> RpfTocEntry.info.seriesCode value of blank.

MM entries are usually specially-made data sets from NGA, and there are
often missing attributes. You can't even expect them to represent a
certain scale or chart series.

> Therefore, I can only display map data for "MM" chart series if I
> set the rpf.chartSeries=ANY. When I'm comparing the chart series from
> the property file with the one that is available from the RpfTocEntry
> should I use RpfTocEntry.coverage.chartCode
> instead of RpfTocEntry.info.seriesCode?

It looks like the RpfTocEntry.coverage.chartCode is set from the
RpfTocEntry.info.seriesCode at some point, so they are supposed to be
equal. If you can get the MM from the coverage.chartCode, I would
think that would be fine (provided it works).

- Don


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick_at_bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[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 Apr 01 2005 - 08:23:57 EST

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