how to create (or transfer)the dem data of *.bdm

15 views
Skip to first unread message

Haiting.Li

unread,
Jul 31, 2009, 4:48:57 AM7/31/09
to ptol...@googlegroups.com
Hi, I 'm a student from China. and I found the ptolemy3d project on the internet. I read the codes several days, it is so nice!
 
    But I have something massed in this project, Could you tell me how to create (or transfer)the dem data of *.bdm? for example , I have the dem data of
 
another format, such as *.dem download from USGS. Thank you .
 
    I also find that the terrain is appeared in applet run in the web html page when I set the terrainScaler and apply . but the terrain is not appeared when
 
the project runs alone even if I modify the terrainScaler to 50. How can I refresh the scene or other something?
 
    Any advices are appreciated.

mwkorver

unread,
Jul 31, 2009, 12:06:31 PM7/31/09
to pTolemy3D
Hi, in the initial release of the ptconsole app there is no facility
to create the .bdm (binary DEM) files that PT needs to render
terrain. So that means that the globe in ptconsole has no bdm files
in the path. normally at /ptconsole/working/dem/. Also if you look
at the html wrapping the viewer there is no pointer to the .bdm path.
if you compare the html for the demo and the one in ptconsole you can
see that it is missing.

Our plan is to add terrain generation to ptconsole, but that is not
ready to go yet.

In the meantime we have a command line java tool (DemCutter) that
allows you to read standard DEM ( I think it was binary float) data
and output .bdm files for ptconsole. Also we have simple script
generation tool that builds the correct command line batch file from
bbox and target .bdm level etc.

FYI, I use Global Mapper to prepare the DEM data I use for .bdm
generation. With the NED30m data for example, which you can download
in 1 arc second tiles, it's faster to regrid to 5 seconds and run that
batch file on that, etc.

If you are interested I will try to get that up on wiki page so that
you can try it out.

If you go to the demo page, which has been recently updated with new
re-factored version, go to California area, you can see some terrain,
there. This is just a test mix of SRTM and NED30m data. I hope to
get the full STRM (or better the new ASTOR DEM data) in near future.

I am at my last day at the GeoWeb conf. in Vancouver. I will look at
the .bdm code when I get back to my desktop machine. :)

Jérôme J.

unread,
Jul 31, 2009, 12:05:59 PM7/31/09
to pTolemy3D
Hi,

I'll answer related to your terrain question. There is two
possibilities:

* Terrain is not enabled
Set Landscape.terrainEnabled to true (which is by default true)

* Not elevation data has been downloaded
First be sure to be synchronized with the last svn code (http://
ptolemy3d.org/browser/pTolemy3DViewer/branches/refactor-0.1.1).
Then in the config xml file, you should have some MapDemStorei
properties pointing to valid DEM data location.
To know if some elevation has been downloaded, you can enable some
debug information (Config.DEBUG=true and
Config.enablePrintConnection=true)

Haiting.Li

unread,
Aug 5, 2009, 3:21:37 AM8/5/09
to ptol...@googlegroups.com, mwko...@gmail.com


Dear PT group, dear mwkorver:

I am so excited when i recived this email , and I real feel that i am one member of this family of PT!

I am very interested in the java tool , DemCutter. I goolge the keyword of "DemCutter" and get nothing. Could you send me that tool with source code ? Cause I eagerly want to

know how it works.

I have found the terrain of California area when i rotate the globe again and again, especially when i set the terrainscaler to 50. But when i compile and run the java source codes in

eclipse , the terrain would not appear ever, even i set the terrainscaler to 100. and I am sure the bdm data are ready , because i download all the bdm data of California area from the

http://ptolemy3d.s3.amazonaws.com/demo-data/dem/. and when i found the terrain in html page, the data download form my own experiment server. But when i run the program in

eclipse , the terrain would not appear ever. They are real use the same data source. Thank God, I could not know whether i tell the truth clearly. So poor my english is!

The attachment is the list of my downloadloading bdm data. and I also have a question of organizing and indexing for tiles. with the map scale bigger, the number of tiles change bigger fast.

Because the number of files is limited in any operating system, how to organzing and index the map tile when the map is zoom in contiunsly. I through splitting the grid according to

map scale to resolve this question , but always feel that my algthrim is not so good, cause it can make some shape deformed and can not express the object's shape correctly.

So happy to hear you attending the GeoWeb conf. in Vancouver. We will be excited again if you bring us some new important things here.

So thankful to Mr. mwkorver, I hope i can devote something to PT project in near future.





Haiting.Lee

2009-08-05
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4293 (20090731) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


bdm.lst

Haiting.Li

unread,
Aug 5, 2009, 3:24:34 AM8/5/09
to ptol...@googlegroups.com

----- Original Message -----
From: "mwkorver" <mwko...@gmail.com>
To: "pTolemy3D" <ptol...@googlegroups.com>
Sent: Saturday, August 01, 2009 12:06 AM
bdm.lst

asantiago

unread,
Aug 5, 2009, 3:48:57 AM8/5/09
to pTolemy3D
Thanks a lot Haiting.

We are working on the next release of pTolemy with lots of internal
improvements. We hope to release it soon.
We'll be very happy to count with your help.

Cheers.
>  bdm.lst
> 4KViewDownload

Jérôme J.

unread,
Aug 5, 2009, 7:25:52 AM8/5/09
to pTolemy3D
Can you tell us which main class you are using (BasicFrame ?), and
also more important which xml file you are running (pTolemy3D.xml,
config/remote_config.xml).
If you change the xml parameters, some fields may be misconfigured. In
that case, attach the file so we can see the option you are using.

Using the code from: http://svn.ptolemy3d.org/pTolemy3DViewer/branches/refactor-0.1.1/
and running the main class: org.ptolemy3d.example.BasicFrame
with arguments: config/remote_config.xml

Dem elevation (from bdm files) is working and enabled.
I don't know if there is elevation on all the globe area one the demo
server, but there is some dem elevation on the west coast of the us.


DemCutter is one of our tool, we'll keep you informed about that.
I think mark can answer you where it is, and will answer to your other
questions.

mwkorver

unread,
Aug 5, 2009, 12:00:19 PM8/5/09
to pTolemy3D
Thank you for your interest in the project Haiting.

Jérôme is preparing the DemCutter tool to upload to svn.

I was just checking svn access. Were you able to get anonymous access
to svn no problem?
>  bdm.lst
> 4KViewDownload

Jérôme J.

unread,
Aug 5, 2009, 1:16:06 PM8/5/09
to pTolemy3D

Jérôme J.

unread,
Aug 5, 2009, 1:19:26 PM8/5/09
to pTolemy3D

Haiting.Li

unread,
Aug 5, 2009, 11:39:28 PM8/5/09
to ptol...@googlegroups.com, J閞鬽e J.

Dear my friends:

I have got the DemCutter, so thanks.

and I will try the dem data of our own country, and figure out how the algrithm works, so appreciated.

The anonymous access to svn was denied before, but it is ok now. I have already download the latest code to study, and so excited.


thank asantiagop, thank mwkorver, thank J閞鬽e J. , Wish you realize your great dream!

Haiting.Lee
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4306 (20090804) __________

Haiting.Li

unread,
Aug 8, 2009, 5:41:11 AM8/8/09
to ptol...@googlegroups.com
 
Dear Jérôme J."
 
   Could you send me the gml_test.xml and new.png file which included in your source code of refactor-0.1.1/?
  
   thank you.
 
 
 
 
  CityGmlPlugin cgp = new CityGmlPlugin();
  cgp.setAltitude(100000);
  cgp
    .setFileUrl("
file:///opt/servers/jetty-6.1.14/webapps/Ptolemy_test/gml_test.xml");
  Ptolemy3D.getScene().getPlugins().addPlugin(cgp);
 
  IconPlugin ip = new IconPlugin();
  ip
    .setFileUrl("
file:///opt/servers/jetty-6.1.14/webapps/Ptolemy_test/new.png");
 
 
 
 
Regards.
 
Haiting.Lee
 
 
 
 
 
 
 
 
----- Original Message -----
From: "Jérôme J." <jerome...@gmail.com>
To: "pTolemy3D" <ptol...@googlegroups.com>
> wrote:
Information from ESET NOD32 Antivirus, version of virus signature database 4304 (20090804) __________


The message was checked by ESET NOD32 Antivirus.

asantiago

unread,
Aug 8, 2009, 9:19:49 AM8/8/09
to pTolemy3D
Hi Haiting,
the png isn't important, it is simply an image to be used by the Icon.
Next lines are an exmaple config file, supposing you have images in
the local machine (acting as sever):

<entity>

<Orientation>39.010000,-98.730000,460000,0,-15</Orientation>



<Server>localhost:8080</Server>

<NumMapDataServers>1</NumMapDataServers>

<MapDataSvr1>localhost:8080</MapDataSvr1>

<MapJp2Store1>/Ptolemy_test/jp2base/</MapJp2Store1>

<MapDemStore1>/Ptolemy_test/jp2base/</MapDemStore1>

<MUrlAppend1>&amp;streamID=class64</MUrlAppend1>

<MServerKey1></MServerKey1>



<TileColor>47,47,86</TileColor>

<Area>00</Area>

<Horizon>10000</Horizon>

<FlightFrameDelay>200</FlightFrameDelay>

<TIN>0</TIN>

<FollowDEM>0</FollowDEM>

<BackgroundColor>0,0,0</BackgroundColor>



<NumLayers>5</NumLayers>



<LayerWidth_1>52428800</LayerWidth_1>

<LayerDEM_1>9</LayerDEM_1>

<LayerMin_1>400000</LayerMin_1>

<LayerMax_1>10000000</LayerMax_1>

<LayerDivider_1>0</LayerDivider_1>



<LayerWidth_2>6553600</LayerWidth_2>

<LayerDEM_2>9</LayerDEM_2>

<LayerMin_2>200000</LayerMin_2>

<LayerMax_2>5000000</LayerMax_2>

<LayerDivider_2>0</LayerDivider_2>



<LayerWidth_3>819200</LayerWidth_3>

<LayerDEM_3>9</LayerDEM_3>

<LayerMin_3>100000</LayerMin_3>

<LayerMax_3>250000</LayerMax_3>

<LayerDivider_3>0</LayerDivider_3>



<LayerWidth_4>102400</LayerWidth_4>

<LayerDEM_4>9</LayerDEM_4>

<LayerMin_4>20000</LayerMin_4>

<LayerMax_4>100000</LayerMax_4>

<LayerDivider_4>0</LayerDivider_4>



<LayerWidth_5>12800</LayerWidth_5>

<LayerDEM_5>9</LayerDEM_5>

<LayerMin_5>0</LayerMin_5>

<LayerMax_5>10000</LayerMax_5>

<LayerDivider_5>0</LayerDivider_5>



<NumPlugins>0</NumPlugins>



<!--

<PluginType_1>org.ptolemy3d.plugin.IconPlugin</PluginType_1>

<PluginParam_1>http://localhost:8080/Ptolemy_test/new.png,40,0</
PluginParam_1>



<PluginType_2>org.ptolemy3d.plugin.CityGmlPlugin</PluginType_2>

<PluginParam_2>100000,http://localhost:8080/openbd/CFML/pseudoWFS/
wfs.cfm?SERVICE=wfs&amp;REQUEST=GetFeature&amp;bbox=-180,-90,180,90</
PluginParam_2>

-->



</entity>

The IconPlugin is easy to use, simply put some image URL path. For the
CityGML you need to specify a URL that returns a CityGML doc, it coudl
be something like http://some_server/my_doc.gml.

We know one important task is document very much the project docs and
API, please be patient.

Cheers.
> __________ Information from ESET NOD32 Antivirus, version of virus signature database 4304 (20090804) __________

Haiting.Li

unread,
Sep 28, 2009, 5:26:29 AM9/28/09
to ptol...@googlegroups.com
Dear Jerome:
 
        Today, When I visit http://www.ptolemy3d.org/wiki, I found the pic
 
 
    I was so surprised and excited. ooh, Great behaviour of open source!
 
    Could you tell me how i can reach that palace with so many buildings on . and did the refactor-0.1.1 have been updated and had these functions ?
 
    So poor my English is, Hope you can catch my words. and congraduations for your did.
 
 
 
    I study the codes of pt in my spare time and meet lots of trouble, but i believe that i can get the whole process soon. and if you have some technical documents about this ptolemy3d, especially including some algrithms , could you send me some , and i will be very appreciated. so thanks.
 
    Wish you Happy everyday and get a large success after!
 
Haiting Li
 
2009-09-28
 
pTolemy3Dpng.png

asantiago

unread,
Sep 28, 2009, 5:46:43 AM9/28/09
to pTolemy3D
Very nice to read your comments again Haiting.

That image corresponds to a ptolemy "plugin" which implements some
parts of CityGML. Very initial stage but works :)
You can see the code here (http://www.ptolemy3d.org/browser/
pTolemy3DViewer/branches/refactor-0.1.1/src/org/ptolemy3d/plugin)
starting in the CityGmlPlugin.java.

That code depends on the library citygml4j (http://opportunity.bv.tu-
berlin.de/software/wiki/citygml4j).


On Sep 28, 11:26 am, "Haiting.Li" <haiting...@163.com> wrote:
> Dear Jerome:
>
>         Today, When I visithttp://www.ptolemy3d.org/wiki, I found the pic
>
>     I was so surprised and excited. ooh, Great behaviour of open source!
>
>     Could you tell me how i can reach that palace with so many buildings on . and did the refactor-0.1.1 have been updated and had these functions ?
>
>     So poor my English is, Hope you can catch my words. and congraduations for your did.
>
>     I study the codes of pt in my spare time and meet lots of trouble, but i believe that i can get the whole process soon. and if you have some technical documents about this ptolemy3d, especially including some algrithms , could you send me some , and i will be very appreciated. so thanks.
>
>     Wish you Happy everyday and get a large success after!
>
> Haiting Li
>
> 2009-09-28
>
>  pTolemy3Dpng.png
> 215KViewDownload

Haiting.Li

unread,
Oct 14, 2009, 2:25:45 AM10/14/09
to ptol...@googlegroups.com

Dear asantiago:

i want to create the .bdm files myself, but how i get the sample data file as need, such as *.hdr and *.dat.

i download sors of data from the internet, but i can't be converted to that format. i noticed the codes in Demcutter.java like this:

case 0:
ncols = Integer.parseInt(demdata.substring(5, demdata.length()).trim());
break;
case 1:
nrows = Integer.parseInt(demdata.substring(5, demdata.length()).trim());
break;
case 2:
xllcorner = Double.parseDouble(demdata.substring(9, demdata.length()).trim()) * mult;
break;
case 3:
yllcorner = Double.parseDouble(demdata.substring(9, demdata.length()).trim()) * mult;
break;
case 4:
cellsize = Double.parseDouble(demdata.substring(8, demdata.length()).trim()) * mult;
break;
case 5:
NODATA_value = Double.parseDouble(demdata.substring(12, demdata.length()).trim());
break;
case 6:
if (isBinary) {
byteorder = demdata.substring(9, demdata.length()).trim();


but i can't find the dem file format as above mentioned. so could you give me some advices ?

so thanks ,
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4314 (20090807) __________

Haiting.Li

unread,
Oct 14, 2009, 9:49:30 PM10/14/09
to ptol...@googlegroups.com

Dear ptolemy3d :

I had got the file format of .hdr and .dat, it is real the ESRI ASCII FILE FORMAT.

It is just divided to 2 parts. one is .hdr, and the other is .dat.

so thanks everyone. I hope i can resolve the next problem when i meet.



Haiting. LEE

2009-10-15



----- Original Message -----
From: "asantiago" <asant...@gmail.com>
To: "pTolemy3D" <ptol...@googlegroups.com>
Sent: Saturday, August 08, 2009 9:19 PM
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4314 (20090807) __________

Mark Korver

unread,
Oct 14, 2009, 11:57:01 PM10/14/09
to pTolemy3D
It has been a some time since I worked on this but I have a tool that
helps to generate the batch files formatted correctly for the
demcutter tool.

http://ptolemy3d.org.s3.amazonaws.com/demCutter.cfm

as you can see its a cfml template file. You will have to fix the
static file paths in the code but it will write to screen or to file
and make it easier to adjust values etc. I used this tool and USA NED
30 meter to create the bdm files.

If you have the ptconsole app running you should be able to place that
file under [some drive]:\ptconsole\webroot_cfmlapps\cfmlWebContext_1
or you can just get the more recent version of the OpenBD engine from
http://www.openbluedragon.org/download.cfm.
> be something likehttp://some_server/my_doc.gml.
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages