Re: DTED, RPF woes

From: Donald Dietrick <dietrick@bbn.com>
Date: Mon Oct 08 2001 - 18:28:21 EDT

Hi Jeremy,

The DTEDCoverage layer is for displaying where data is - it just draws
rectangles over the areas where the dted data resides. The DTEDLayer
actually renders the terrain images. Still, you should be able to see
the rectangles for each DTED frame.

I tried your code out, and there was a problem, which I've corrected in
the code below:

On Monday, October 8, 2001, at 05:28 PM, Jeremy Zacker wrote:

> Hello, I am new to OpenMap, so forgive me if this question has been
> answered.
>
> I am trying to display DTED and Rpf coverage. I have tried everything I
> can think of, but with
> no success. When loading DTED, the code seems to work fine (progress
> indicator displays,
> loading takes time). But no DTED coverage is displayed. I tried to zoom
> in on the area so that
> the scale was less than 20M, but it did not work. I was also told I
> need to use a CADRG projection, but that
> didn't work either.
>
> Then with Rpf data, it also seems to load with no problems (no error
> messages). But again when I zoom
> in on the area, nothing displays.
>
> I have tried both DTED and Rpf using the GUIs provided (Layer.getGUI()),
> but that doesn't seem to do anything.

getGUI() is a standard layer method that provides a component to use to
adjust the layer parameters. It's used by an application to provide a
control palette.

> I am sure my data is the correct format and that my paths are correct
> Can anyone else make a suggestion, heres my code:
>
> public class OpenMapTest extends JFrame
> {
> public OpenMapTest(String[] args)
> {
> super("TEST");
> MapBean mapBean = new BufferedMapBean();
>
> Projection proj = mapBean.getProjection();
> CADRG cadrg = new CADRG(proj.getCenter(),
>
> proj.getScale(),
>
> proj.getWidth(),
>
> proj.getHeight());
> mapBean.setProjection(cadrg);
>
> DTEDCoverageLayer dtedLayer = new TestDtedLayer();

I had to use new DTEDCoverageLayer() ...

> Properties dtedLayerProperties = new Properties();
> dtedLayerProperties.put("dtedcov1.prettyName", "Coverage Solid");
> dtedLayerProperties.put("dtedcov1.paths",
> "/raid/MapData/Terrain/DTED1/tcd_dted101/dted");
> dtedLayerProperties.put("dtedcov1.coverageFile",
> "/home/zacker/OPENMAP/test.dat");
> dtedLayerProperties.put("dtedcov1.level0.showcov", "true");
> dtedLayer.setProperties("dtedcov1", dtedLayerProperties);
>
> mapBean.add(dtedLayer);
>
> RpfLayer rpfLayer = new RpfLayer();
> Properties rpfLayerProperties = new Properties();
> rpfLayerProperties.put("rpf1.paths",
> "/cdrom/cdrom0/cib/cib1/rpf");
> rpfLayer.setProperties("rpf1", rpfLayerProperties);
>
> mapBean.add(rpfLayer);
>
> MouseDelegator md = new MouseDelegator(mapBean);
> NavMouseMode2 nmm = new NavMouseMode2();
> md.setActiveMouseMode(nmm);

You need to add:

        this.getContentPane().add(mapBean);

otherwise, the mapbean never gets added to the frame.

>
> pack();
> setSize(500, 500);
> setVisible(true);
> }
>
> static public final void main(String[] args)
> {
> new OpenMapTest(args);
> }
> }
>

Also, to see the CIB data, you'll have to zoom in to at least ~ 1:240k.
1:66.66k is the actual scale for the images.

Cheers,

Don

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Mon Oct 8 18:28:54 2001

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:31 EDT