IPB
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

PDS data format?
Yadgar
post Jan 21 2015, 02:49 AM
Post #1


Newbie
*

Group: Members
Posts: 14
Joined: 6-April 11
From: Cologne, Germany
Member No.: 5951



Hi(gh)!

I would like to generate POV-Ray meshes from PDS altimetry data files (for example the global Vesta file from Dawn Public Data) - but I have no clue what data format they contain... obviously, its binary, simple cylindrical projection, based on a 255 x 255 x 255 kms sphere (Vesta), 32 bits per data point. But what data format - int or float? Signed or unsigned? Big or little endian? Where do I get detailed information on the format of these PDF files?

See you in Khyberspace!

Yadgar
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
djellison
post Jan 21 2015, 02:56 AM
Post #2


Founder
****

Group: Chairman
Posts: 14457
Joined: 8-February 04
Member No.: 1



Probably better to link to a web-page rather than directly to a 500+,mb .pds file.
http://dawndata.igpp.ucla.edu/tw.jsp?secti...Ms/DLR_HAMO_DTM

Simply opening the file in a text editor reveals.....
CODE
PDS_VERSION_ID                    = PDS3

/* FILE DATA ELEMENTS */

RECORD_TYPE                       = FIXED_LENGTH
RECORD_BYTES                      = 69124
FILE_RECORDS                      = 8644
LABEL_RECORDS                     = 2

/* POINTERS TO DATA OBJECTS */

^IMAGE_HEADER                     = 3
^IMAGE                            = 4

/* DATA OBJECT DEFINITIONS */

OBJECT                            = IMAGE
  INTERCHANGE_FORMAT              = BINARY
  LINES                           = 8641
  LINE_SAMPLES                    = 17281
  SAMPLE_TYPE                     = IEEE_REAL
  SAMPLE_BITS                     = 32
  BANDS                           = 1
  BAND_STORAGE_TYPE               = BAND_SEQUENTIAL
  MINIMUM                         = -21527
  MAXIMUM                         = 19005
END_OBJECT                        = IMAGE

/* MAP OBJECT DEFINITIONS */

OBJECT                            = IMAGE_MAP_PROJECTION
  A_AXIS_RADIUS                   = 255.0
  B_AXIS_RADIUS                   = 255.0
  C_AXIS_RADIUS                   = 255.0
  CENTER_LATITUDE                 = 0.0
  CENTER_LONGITUDE                = 180.0
  COORDINATE_SYSTEM_NAME          = PLANETOCENTRIC
  EASTERNMOST_LONGITUDE           = 359.9999991462263
  LINE_PROJECTION_OFFSET          = 4320.0
  MAP_PROJECTION_TYPE             = SIMPLE_CYLINDRICAL
  MAP_RESOLUTION                  = 48.00000026515721
  MAP_SCALE                       = 0.09272061600000001 <km/pixel>
  MAXIMUM_LATITUDE                = 90.0
  MINIMUM_LATITUDE                = -90.0
  POSITIVE_LONGITUDE_DIRECTION    = EAST
  SAMPLE_PROJECTION_OFFSET        = 8640.0
  WESTERNMOST_LONGITUDE           = 0.0
END_OBJECT                        = IMAGE_MAP_PROJECTION

/* MISCELLANEOUS */

TARGET_NAME                       = VESTA
PRODUCER_INSTITUTION_NAME         = "German Aerospace Center (DLR)"
PRODUCT_CREATION_TIME             = 2013-05-24T13:27:30.000
MISSING_CONSTANT                  = -32768
DESCRIPTION                       = "DTM: Height [m] equals DN. Vertical
                                     reference: Height above
                                     sphere/ellipsoid (as defined by map
                                     axis)."

/* IMAGE HEADER DATA ELEMENTS */

OBJECT                         = IMAGE_HEADER
HEADER_TYPE                   = VICAR2
INTERCHANGE_FORMAT            = ASCII
BYTES                         = 69124
^DESCRIPTION                  = "VICAR2.TXT"
END_OBJECT                     = IMAGE_HEADER
END



That data is enough to open it as a raw file in Photoshop, Gimp or ImageJ etc. and then use it as a displacement map on a mesh.
Go to the top of the page
 
+Quote Post
Yadgar
post Jan 21 2015, 03:54 AM
Post #3


Newbie
*

Group: Members
Posts: 14
Joined: 6-April 11
From: Cologne, Germany
Member No.: 5951



QUOTE (djellison @ Jan 21 2015, 03:56 AM) *
INTERCHANGE_FORMAT = BINARY


O.k., it's binary...

QUOTE (djellison @ Jan 21 2015, 03:56 AM) *
LINES = 8641
LINE_SAMPLES = 17281


...17281 by 8641 sample points...

QUOTE (djellison @ Jan 21 2015, 03:56 AM) *
SAMPLE_BITS = 32


...4 bytes per sample, which would be either standard-precision float or int...

QUOTE (djellison @ Jan 21 2015, 03:56 AM) *
MINIMUM = -21527
MAXIMUM = 19005


Obviously, the sample values range from -21527 to 19005 metres relative to the rotation ellipsoid - which means that they are in fact integer! But why do they use signed int rather than signed short int? And which bit order - big oder small endian?

QUOTE (djellison @ Jan 21 2015, 03:56 AM) *
A_AXIS_RADIUS = 255.0
B_AXIS_RADIUS = 255.0
C_AXIS_RADIUS = 255.0


...the underlying ellipsoid, here a perfect sphere...

QUOTE (djellison @ Jan 21 2015, 03:56 AM) *
MAP_PROJECTION_TYPE = SIMPLE_CYLINDRICAL


...so spacing of points can be calculated from the x and y dimensions of the data array...

QUOTE (djellison @ Jan 21 2015, 03:56 AM) *
SAMPLE_PROJECTION_OFFSET = 8640.0


Is this a value to be added to or subtracted from the sample values?

QUOTE (djellison @ Jan 21 2015, 03:56 AM) *
MISSING_CONSTANT = -32768


Missing data code...

QUOTE (djellison @ Jan 21 2015, 03:56 AM) *
That data is enough to open it as a raw file in Photoshop, Gimp or ImageJ etc. and then use it as a displacement map on a mesh.


When I try to open it, I just get a strange noisy thing which, when zoomed in, appears like vague rastered interference shapes...
perhaps I better should try writing a C++ program which extracts the sample data and stores them as an uncompressed TGA image file!

See you in Khyberspace!

Yadgar
Go to the top of the page
 
+Quote Post
mcaplinger
post Jan 21 2015, 05:59 AM
Post #4


Senior Member
****

Group: Members
Posts: 2558
Joined: 13-September 05
Member No.: 497



QUOTE (Yadgar @ Jan 20 2015, 08:54 PM) *
...4 bytes per sample, which would be either standard-precision float or int...
Obviously, the sample values range from -21527 to 19005 metres relative to the rotation ellipsoid - which means that they are in fact integer!

Nope. It says SAMPLE_TYPE = IEEE_REAL, that's a single-precision float.


--------------------
Disclaimer: This post is based on public information only. Any opinions are my own.
Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic

 



RSS Lo-Fi Version Time is now: 13th December 2024 - 08:44 PM
RULES AND GUIDELINES
Please read the Forum Rules and Guidelines before posting.

IMAGE COPYRIGHT
Images posted on UnmannedSpaceflight.com may be copyrighted. Do not reproduce without permission. Read here for further information on space images and copyright.

OPINIONS AND MODERATION
Opinions expressed on UnmannedSpaceflight.com are those of the individual posters and do not necessarily reflect the opinions of UnmannedSpaceflight.com or The Planetary Society. The all-volunteer UnmannedSpaceflight.com moderation team is wholly independent of The Planetary Society. The Planetary Society has no influence over decisions made by the UnmannedSpaceflight.com moderators.
SUPPORT THE FORUM
Unmannedspaceflight.com is funded by the Planetary Society. Please consider supporting our work and many other projects by donating to the Society or becoming a member.