It is currently Sat, 21-10-17, 1:08 GMT

All times are UTC




Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: LRO - WAC DEM
PostPosted: Thu, 17-11-11, 22:31 GMT 
Offline
User avatar

Joined: Tue, 04-09-07, 21:55 GMT
Posts: 767
Location: N 42.38846 W 83.45456
there is a new 100M DEM derived from the WAC
see the lroc site
the Nov 15 PDS release is here
http://lroc.sese.asu.edu/data/LRO-L-LRO ... DP/WAC_DTM

there is NO vertical striping

a 32k test

Image


Last edited by John Van Vliet on Sun, 20-11-11, 10:36 GMT, edited 3 times in total.

Top
 Profile  
 
 Post subject: Re: LRO - WAC DEM
PostPosted: Fri, 18-11-11, 0:10 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 7:01 GMT
Posts: 4496
Location: Hamburg, Germany
John Van Vliet wrote:
there is a new 100M DEM derived from the WAC
see the lroc site
the Sept 15 PDS release is here
http://lroc.sese.asu.edu/data/LRO-L-LRO ... DP/WAC_DTM

there is NO stripping


Wow, thanks for telling us!
No chance left for the Moon to hide ;-)

Fridger


Top
 Profile  
 
 Post subject: Re: LRO - WAC DEM
PostPosted: Thu, 19-09-13, 21:54 GMT 
Offline
User avatar

Joined: Tue, 04-09-07, 21:55 GMT
Posts: 767
Location: N 42.38846 W 83.45456
There is a new update out for the DEM
http://lroc.sese.asu.edu/data/LRO-L-LRO ... AC_GLD100/
as of Aug 8

there is also a update to the texture
http://lroc.sese.asu.edu/data/LRO-L-LRO ... AC_GLOBAL/


Top
 Profile  
 
 Post subject: Re: LRO - WAC DEM
PostPosted: Fri, 04-10-13, 19:46 GMT 
Offline
User avatar

Joined: Fri, 03-04-09, 8:21 GMT
Posts: 211
A quick test (from another source: http://imbrium.mit.edu/DATA/LOLA_GDR/POLAR/IMG/ ... LDEM_875S_20M.IMG )
Attachment:
LDEM_875S_20M.jpg
LDEM_875S_20M.jpg [ 489.52 KiB | Viewed 3435 times ]

For some reason, it's also necessary to flip and then rotate 90 degrees for the correct orientation.

compare with (click for full size if you wish):
Image


Top
 Profile  
 
 Post subject: Re: LRO - WAC DEM
PostPosted: Fri, 04-10-13, 21:27 GMT 
Offline
User avatar

Joined: Tue, 04-09-07, 21:55 GMT
Posts: 767
Location: N 42.38846 W 83.45456
depending on the software used and your country default and the default set in the data
"0" or "180" may be the CENTER LONGITUDE

in the lower image zero is set as the center long

i am betting the data in the top is set for 180 as the center long

in polarstereographic projection
the center longitude is in the top center

now some software ( isis3) the northpole is top center
the southpole is bottom center

this can get rather confusing and cause all kinds of "fun"


Top
 Profile  
 
 Post subject: Re: LRO - WAC DEM
PostPosted: Sat, 05-10-13, 11:26 GMT 
Offline
User avatar

Joined: Fri, 03-04-09, 8:21 GMT
Posts: 211
As ISIS and other .gov sites are shutdown, I can't rely on any of their software.
Luckily I'm not relying on any 3rd party SW, as the "software" in this case is written by me. :mrgreen:

The remaining issues are simply related to my understanding of the sort-order of the samples in the IMG file, and therefore how to process it. I have now solved this final confusion, by realizing that the image above matches the second one if you imagine that you're looking up at the surface from below, and that the 0 longitude is at the left.

This led me to conclude that the sort-order is the opposite to what I had assumed. I was interpreting these as horizontal lines of pixels, but in fact they are vertical lines. (ie. The first 7584 samples correspond to the leftmost "vertical" line of pixels from top to bottom, rather than the topmost horizontal line.)
This is absolutely trivial to fix in the code, and results in a properly orientated image without additional transformations.

This is why I wrote this program, to deduce the structure of the IMG file, as a first step towards generating an actual 3D mesh (preferably directly from the DEM).

Do you know of any free programs that will produce a mesh, preferably directly from the binary IMG file, or alternatively from the heightmap produced by my code?

Regards,
CC

PS.
FWIW, here are some earlier (reduced in size) test images from earlier code versions when I was still grappling with the mapping of height-values to a sensible RGB range:
Attachment:
test.jpg
test.jpg [ 443.17 KiB | Viewed 3415 times ]
Attachment:
test - Copy.jpg
test - Copy.jpg [ 402.44 KiB | Viewed 3415 times ]
Attachment:
LDEM_875S_20M_sat30-100, bri75.jpg
LDEM_875S_20M_sat30-100, bri75.jpg [ 428.77 KiB | Viewed 3415 times ]


Top
 Profile  
 
 Post subject: Re: LRO - WAC DEM
PostPosted: Sat, 05-10-13, 12:37 GMT 
Offline
User avatar

Joined: Thu, 25-10-07, 15:20 GMT
Posts: 991
Location: NE PA, USA
I used to use Blender. And zfold http://www.shatters.net/forum/viewtopic ... 715#p39715 You probably want a greyscale img for displacement.

Quote:
The remaining issues are simply related to my understanding of the sort-order of the samples in the IMG file


Also, the img file in link also has a lbl file. This file has info you can use to find out "sort-order", etc. It also will have the radius for zfold. But you would probably be better off using the values in the img file and the radius to produce a file from -pi to pi and -pi/2 to pi/2.

cartrite


Top
 Profile  
 
 Post subject: Re: LRO - WAC DEM
PostPosted: Sat, 05-10-13, 13:10 GMT 
Offline
Site Admin
User avatar

Joined: Fri, 31-08-07, 7:01 GMT
Posts: 4496
Location: Hamburg, Germany
And for those disliking Blender (like myself), you can also do very well by means of Perl scripting.

See my various threads for the case of Phobos:

Import Scientific Shape Models to CMOD without Blender!

Fighting the Polar Pinch (ascii CMOD shape models)

Perl scripting is tremendously versatile for a host of different tasks. It is easy to learn, and cross-platform. In Linux, it automatically comes as part of the system installation. Furthermore, Mac OSX guys got a complete UNIX system under the hood, which OF COURSE includes Perl as well. For Windows, Perl may be easily installed freely.

The (triangular) tesselation can be customized and thus be optimized e.g. to eliminate polar pinches etc. Well commented Perl script examples can be downloaded in my above threads.

Fridger


Top
 Profile  
 
 Post subject: Re: LRO - WAC DEM
PostPosted: Sat, 05-10-13, 13:35 GMT 
Offline
User avatar

Joined: Thu, 25-10-07, 15:20 GMT
Posts: 991
Location: NE PA, USA
Quote:
And for those disliking Blender (like myself),

I guess you could count me on this too. I don't really use it anymore. This is why I wrote this.
Quote:
But you would probably be better off using the values in the img file and the radius to produce a file from -pi to pi and -pi/2 to pi/2.

I forgot how to find the perl script you wrote. That's what I had in mind when I wrote the second quote. That would be the best way to go to produce a mesh. But wouldn't it be better to have Celestia or Celestia.sci do it from the original data file? A distance dependent render to keep computing to a minimum?
cartrite


cartrite


Top
 Profile  
 
 Post subject: Re: LRO - WAC DEM
PostPosted: Sat, 05-10-13, 19:50 GMT 
Offline
User avatar

Joined: Tue, 04-09-07, 21:55 GMT
Posts: 767
Location: N 42.38846 W 83.45456
VB's lro/mro blender script dose run on blender 2.67

i have not yet installed the new release of blender
BUT

the lro img files are in fact singed integer ( lsb) RAW images with a detached header
and they are in 0.5 M pixel values SINGED int from the mean height

they are not vicar images with a pds header
to get the height in Meters add to the SINGED int number, the "offset" from the headed file

VB's plugin dose have some issues with small bodied , it assumes the object is a sphere or close to it .


Quote:
Do you know of any free programs that will produce a mesh, preferably directly from the binary IMG file

it is a raw singed integer image so...

a mesh in polar spherical shape
and in the correct curvature of the southpole

or
as a flat plane

this is going to be a VERY VERY VERY BIG FILE !!!!!
everything is in ram so there is a 4 gig ram MAX - 32 bit code
the 20meg mesh in the screen shot is a 512 x512 reduced image !!!
the full image is 7584 x 7584
Code:
cp LDEM_875S_20M.IMG LDEM_875S_20M.raw

gmic -type short LDEM_875S_20M.raw,7584,7584 -type float  -elevation3d 0.001 -o LDEM_875S_20M.off
--- or to remove the 2X in height exaggeration 0.5 M/px value
gmic -type short LDEM_875S_20M.raw,7584,7584 -type float  -elevation3d 0.0005 -o LDEM_875S_20M.off

The "LDEM_875S_20M.off" mesh in the old blender ( .off is not ported over yet )
Image


Top
 Profile  
 
 Post subject: Re: LRO - WAC DEM
PostPosted: Sun, 06-10-13, 10:29 GMT 
Offline
User avatar

Joined: Fri, 03-04-09, 8:21 GMT
Posts: 211
John Van Vliet wrote:
Quote:
Do you know of any free programs that will produce a mesh, preferably directly from the binary IMG file

it is a raw singed integer image so...

a mesh in polar spherical shape
and in the correct curvature of the southpole

or
as a flat plane


The LBL file: http://imbrium.mit.edu/DATA/LOLA_GDR/POLAR/IMG/LDEM_875S_20M.LBL describes the map projection as "POLAR STEREOGRAPHIC", so I'm assuming that all the data contained within the file describes only the circle of radius 2.5 degrees from the south pole, rather than a rectangular swathe of geography centered on the pole, and therefore when we present it as a rectangular image, we're actually stretching it's true geography in the corners.

Therefore, I think in the most accurate representation all points should be contained within that 2.5 degree radius circle, therefore:
Quote:
a mesh in polar spherical shape
and in the correct curvature of the southpole

Strangely, though, I don't see a lot of evidence of distortion in the corners of the image as expected.

I think the correct approach is to place a circular mesh of whatever radius (2.5, 5 degrees, etc) at the pole. In which case it's 3rd dimension elevations should be relative to the lunar radius of 1737.4 km.

I'm not trying to do a complete spherical moon, but rather the idea is to place a patch of geometry at the polar region. (Same idea as what Selden did with his Mt Palomar telescope, IIRC).

PS. My system can handle a 7584 x 7584 image with no problems. A 7584 x 7584 point mesh, remains to be seen. (No 32bit limit though on my machine).


Top
 Profile  
 
 Post subject: Re: LRO - WAC DEM
PostPosted: Sun, 06-10-13, 10:59 GMT 
Offline
User avatar

Joined: Thu, 25-10-07, 15:20 GMT
Posts: 991
Location: NE PA, USA
Quote:
rather than a rectangular swathe of geography centered on the pole, and therefore when we present it as a rectangular image, we're actually stretching it's true geography in the corners.

I don't think "POLAR STEREOGRAPHIC" works the way you describe. All the pixels are mapped not stretched. The corners simply extend beyond -87.5 latitude. Maybe this page of the earth can better describe. http://nsidc.org/data/polar_stereo/ps_g ... _grid.html

cartrite


Top
 Profile  
 
 Post subject: Re: LRO - WAC DEM
PostPosted: Sun, 06-10-13, 11:28 GMT 
Offline
User avatar

Joined: Fri, 03-04-09, 8:21 GMT
Posts: 211
That's good news then as it means we can just generate a cartesian mesh, and the only additional transformations required on the points in the mesh is those needed to fit the geography to the curve of the moon. :)
(This also explains the lack of distortion)

In this case, then the circular line on the image is the actual line of latitude 87.5 degrees: Image

For very small areas of geography (less than 1 degree of arc), we could probably get away with a flat plane mesh, but for larger areas like this, I think it definitely needs to conform to the surface.


Top
 Profile  
 
 Post subject: Re: LRO - WAC DEM
PostPosted: Sun, 06-10-13, 11:47 GMT 
Offline
User avatar

Joined: Thu, 25-10-07, 15:20 GMT
Posts: 991
Location: NE PA, USA
Using the file you mentioned would create a very big file as John said. To create a mesh, One would have to create a file as such,
http://sbn.psi.edu/pds/asteroid/EAR_A_5 ... phobos.tab
For every 16 bit value/pixel of the file, a line is output with lat, long, and (height value or actual pixel value) + "offset" ( lunar radius in meters ).
Then you need to create the vertex coordinates and uv coordinates for all the triangles. (Via Fridger's script he posted above).
cartrite


Top
 Profile  
 
 Post subject: Re: LRO - WAC DEM
PostPosted: Sun, 06-10-13, 14:06 GMT 
Offline
User avatar

Joined: Thu, 25-10-07, 15:20 GMT
Posts: 991
Location: NE PA, USA
Apparently, I did make errors in my assumptions. I was using the Windows calculator in programmer mode along with hexedit. :? Anyhow,
I ran gdallocationinfo on the file with the following command.
Code:
gdallocationinfo LDEM_875S_20M.LBL 1 1

I got this output. value = -6479 Descaled Value = 1734160.5 note* not sure what Descaled Value is?
Possible first line of tab file. The lat/long coords are probably correct. The value still questionable.
Code:
-86.46504 -45.00000 1730.921

Anyhow, the file will need a script for generation.


The lat and long coords I got from running gdalinfo on the file.
This a part of the output.
Code:
Corner Coordinates:
Upper Left ( -75820.000, 75820.000) ( 45d 0' 0.00"W, 86d27'54.16"S)
Lower Left ( -75820.000, -75860.000) (135d 0'54.39"W, 86d27'50.81"S)
Upper Right ( 75860.000, 75820.000) ( 45d 0'54.39"E, 86d27'50.81"S)
Lower Right ( 75860.000, -75860.000) (135d 0' 0.00"E, 86d27'47.46"S)
Center ( 20.0000000, -20.0000000) (135d 0' 0.00"E, 89d59'56.64"S)
Band 1 Block=7584x1 Type=Int16, ColorInterp=Undefined
NoData Value=-32768
Offset: 1737400, Scale:0.5

Adding to the lat/long coordinates, I guess this info can be used.
Quote:
MAP_RESOLUTION = 1516.17 <pix/deg>

cartrite


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group