Re: [OpenMap Users] watershed area, dem

From: Don Dietrick <dietrick_at_bbn.com>
Date: Tue, 30 Nov 2004 09:33:37 -0500

Hi Andrea,

You probably don't have to write a DEM driver unless you really need to
access DEM data. There are DEM java packages out on the web. If you
just want an array of elevation points, you can use the DTEDFrameCache
to get that now (DTEDFrameCache.getElevations()). The main difference
is that DTED elevation posts will be based on decimal degree lat/lon
posts, and a frame covers a 1x1 degree area. DEM posts are laid out on
a meters grid (distance), so when you go to render your data you'll
have to deal with the projection transformation between how the posts
are laid out to on the map. With DTED, and using the OMGrid, you can
stick to using the CADRG or LLXY projections, and you won't have to
deal with projection issues.

If I were you, I'd simply implement an OMGridGenerator (using your
algorithm below, there are examples in com.bbn.openmap.omGraphics.grid
package) that looks at OMGrid data and creates an OMRaster image of the
watershed area. You can ask the DTEDFrameCache for an int[][] to use
in an OMGrid. You can also just get a DTEDFrame object from a DTED
file, and ask it for an OMGrid object. In both cases, you would set
your OMGridGenerator in the OMGrid object, and then treat it like any
other OMGraphic. Remember to use the CADRG/LLXY projections, though,
to make it look right on the map.

- Don

On Nov 30, 2004, at 8:47 AM, Andrea Leone wrote:

> Hi,
> Thank you for all your information.
> The usual algorithm it is used to calculate slope and flow path is the
> 8
> point method.
> http://www.gishydro.umd.edu/documents/train_manual/old/dems.pdf
>
> You've just to Loop though each Point in the grid to calculate first
> the
> slope and then, the direction of the flow (from your point to the
> lowest of
> the eighth surrounding it). Usually you give a value to each point of
> the
> grid according to the flow path direction 1,2,5,8,16,32,64,128 from
> East to
> North East. The watershed is made by all the point that flow trough the
> others to the main outlet point. I guess that stating from the outlet
> point
> you go backwards to the points that flow directly or indirectly in it.
> The problem in the algorithm is when there is a sink (or horizontal
> area),
> and you can not know the real flow path, then there are quite few
> models for
> correction of the horizontal areas, like TOPAZ
> http://gcmd.nasa.gov/records/TOPAZ.html (also free).
> In the Grass project they have alredy implemented a similar algorithm,
> but I
> would like to try to do it in OpenMap, to have a java based one.
> As you suggest to start I'll try to write a DEM driver for OpenMap,
> but I'm
> not a very experienced programmer, so it will take a while.
> Please, let me know if you find out something else.
>
> Cheers,
> Andrea
>
> -----Original Message-----
> From: Chapman, Martin [mailto:MChapman_at_sanz.com]
> Sent: 30 November 2004 06:35
> To: Andrea Leone; openmap-users_at_bbn.com
> Subject: RE: [OpenMap Users] watershed area
>
> Andrea,
>
> Now that I think about it harder, the strategy I gave you was more of a
> flood plane solution I guess. In order to calculate slope and a
> descending
> path you will need more of a mesh object or scene graph class. Once
> it was
> in a structure like that you could traverse the mesh and run tests on
> the
> edge of each triangulated face.
>
> Martin
>
>
> -----Original Message-----
> From: Andrea Leone [mailto:andrea.leone_at_postgrad.manchester.ac.uk]
> Sent: Mon 11/29/2004 5:12 PM
> To: openmap-users_at_bbn.com
> Cc:
> Subject: [OpenMap Users] watershed area
> Hi Don,
> The algorithms to calculate watershed area are based on elevation
> data. I
> would need a grid of elevation data to perform slope, flow paths and
> draining area calculations.
>
> Cheers,
> Andrea
>
> -----Messaggio originale-----
> Da: owner-openmap-users_at_bbn.com [mailto:owner-openmap-users_at_bbn.com]
> Per
> conto di Don Dietrick
> Inviato: luned́ 29 novembre 2004 22.03
> A: Andrea Leone
> Cc: openmap-users_at_bbn.com
> Oggetto: Re: [OpenMap Users] FW: distance along set of lines
>
> Hi Andrea,
>
> What's your criteria for designating a watershed area based on
> elevation data?
>
> Just so you know, the TerrainLayer uses DTED data instead of DEM, but
> that should be OK, too.
>
> - Don
>
>
> On Nov 28, 2004, at 11:45 AM, Andrea Leone wrote:
>
>> Hi people,
>>
>> Does somebody have some idea on how to delineate watershed areas using
>> DEM data in OpenMap.
>>
>> I guess that the Terrain layer could be a good starting point.
>>
>>
>>
>>
>>
>> Thank you,
>>
>> Cheers, Andrea.
>>
>>
>>
>>
>>
>>
>>
>
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> 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"]
>
>
> --
> [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"]
>
>
>
> --
> [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"]
>
>


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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 Tue Nov 30 2004 - 09:34:49 EST

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