Hi JLuis,
On Tuesday, August 12, 2003, at 04:29 AM, JLuis Laborda wrote:
>
> ----- Original Message -----
> From: JLuis Laborda
> To: openmap@bbn.com
> Sent: Tuesday, August 12, 2003 10:28 AM
> Subject: [OpenMap Users] DTED tiles
>
>
> ----- Original Message -----
> From: JLuis Laborda
> To: openmap@bbn.com
> Sent: Tuesday, August 12, 2003 10:25 AM
> Subject: DTED tiles
>
> Hi
>
> I'm trying to show a colection of USGS DTED level 0 tiles, stored in a
> directory aka (f:/usgs/dems/w01_n3); the name of the USGS files are in
> the format: w010_n30.avg, w010_n30.avg.dt0, w010_n30.max,
> w010_n30.nim, w010_n30.mmm,...,w010_n31.avg,...,w017_n33.avg,... and
> so on.
Are you sure these are DTED files? I notice there is a dems directory
in the path. DEM is different from DTED.
You can test this out by running the
com.bbn.openmap.layer.dted.DTEDFrame directly on the .dt0 file.
> The code i used for this is:
>
> public class dteds
> {
> public dteds()
> {
> }
>
> public static void main(String[] args)
> {
> // Create a Swing frame
> JFrame frame = new JFrame("Tiled DTED");
>
> // Size the frame appropriately
> frame.setSize(640, 480);
>
> // Create a MapBean
> BufferedMapBean mapBean = new BufferedMapBean();
>
> // Create a Map Handler
> MapHandler mapHandler = new MapHandler();
> try{ mapHandler.add(mapBean);}
> catch (MultipleSoloMapComponentException ex){
> ex.printStackTrace();}
>
> ToolPanel toolPanel = new ToolPanel();
> mapHandler.add(toolPanel);
> mapHandler.add(new OMToolSet());
> frame.getContentPane().add(toolPanel,
> java.awt.BorderLayout.NORTH);
> String[] mypath = {"f:/usgs/dems/w00_n3"};
I don't think the paths are going to match up with what the DTEDLayer
is expecting them to be, even if these are DTED files. The DTEDLayer
is expecting the files to be stored in some directory structure that
follows this regular expression:
dted/[e|w]XXX/[n|s]YY.dt[0|1]
>
> //Create a DTEDLayer to display simple DTED data
> DTEDLayer dtedLayer = new DTEDLayer(mypath, null);
>
> Properties dtedLayerProps = new Properties();
> dtedLayerProps.put ("level", "0");
>
>
> dtedLayer.setProperties(dtedLayerProps);
>
> //Create projection
> Projection proj = mapBean.getProjection() ;
> System.out.println( proj.getName());
>
> //Create CADRG projection
> CADRG cadrg = new CADRG(proj.getCenter(), 10000000 ,
> proj.getWidth() , proj.getHeight() );
> mapBean.setProjection(cadrg);
> //dtedLayer.renderDataForProjection(cadrg,dtedLayer.getGraphics());
> dtedLayer.setOpaque(true);
> //Add the dted layer to the map
> mapBean.add(dtedLayer);
>
> // Add the map to the frame
> frame.getContentPane().add(mapBean);
> frame.setVisible(true);
>
> }
>
> when i run the class i cant see nothing. My asks are the follows:
> -What's the wrong
> - the parameter mypath ot the constructor 'new DTEDLayer()' accept a
> path where the files are and get all the dt0 files or i need to
> construct a diferent DTEDLayer for every file that i want to show in
> the frame.
It should be to the top level 'dted' directory.
> - If i can manage all the dt0 files whit an unique DTEDLayer, how can
> i manage the visibility of the tiles (sublayers maybe?)
N/A
> -and finally, about the class DTEDCoverageLayer what is his role in
> the representation of the tiles; I need to use one before instantiate
> de DTEDLayer? how. Sample code will be very apreciate.
The DTEDCoverageLayer simply draws rectangles on the map over where the
data is. It helps zooming in over the data.
- Don
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, BBN Technologies, dietrick@bbn.com
10 Moulton Street, Cambridge, MA 02138
617-873-3031 [fax]-2794
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-- [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 Tue Aug 12 10:00:07 2003
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:36 EDT