Hi to all
Here you can find my script for Blender 2.5. Script
Now is on SVN
#***********************************************************************
#ver. 0.0.1: -First version
#ver. 0.0.2: -Add check on path and file
# -Check on selected coordinates more complete
#ver. 1.1.0: -Optimized for less memory
#ver. 1.1.1: -Correct bug for real value of the High (bad error).
# now it's less artistic, bat more real Always possible use
# the old formula. check Magnify (x4)
# -Correct the bug for directory with dot in the name
# -Add some warning and more information
# -Add slider for the scale and info on it
#ver. 1.1.2: -Word correction
# -Correct the problem for Unix (Upper lower case)
# If the Ext of the file selected from user is upper
# than the second file is Upper and Viceversa.
# (I can't verify because i have Win)
#ver. 1.1.3: -Little fix for previous fix on upper/lower case
#ver. 1.1.4: -Fix for recent API changes. Thanks to Filiciss.
# -Some code cleaning (PEP8)
#ver. 1.1.5: -Fix for recent API changes. Thanks to Filiciss.
#ver. 1.1.6: -Fix for API changes, and restore Scale factor
#ver. 1.1.7: -Fix for API changes. Move some code out of draw
#ver. 1.1.8: --Add a reset button to reset the UI
#************************************************************************
With this script you can import alimetric data of the Moon and Mars at different resolutions.
You can found the data for the Moon here: MOON PDS
You must download the IMG file and the LBL file with the same name. Use the file that starting with LDEM no LDEC.
The first number after LDEM is the resolution: 4=4 pixel/deg16 =16 pix/deg and so on
You can found the data for Mars here: MARS PDS
Always you must download the IMG and the LBL file and keep in the same directory.
Interface:
You must choice the file that you want imported (IMG or LBL is the same)
Then you must select the coordinates that you want import (latitude and longitude). Northernmost Lat must be > Southernmost Lat Westernmost Long must be < Easternmos Long
All the coordinates are in decimal format.
Before that you press Import check the number of vertex that you import.
the Import button is visible only when all is OK
North-South axis is set on Blender Y axis.
East-West axis is set on Blender X axis.
Some Esxample-All these examples are exaggerated in heigh: Tycho crater on the Moon
ValterVB just curios to know when you import a (IMG or LBL is the same) normally how much vertices are imported i,m looking at your screen shot for It Says number of vertices to be imported 2165633 thats huge des it also have a option to import in low res?
For superhero: My record is 36,869,760, (I have used 18.4 GB of RAM).
Option for import Low res (for now :eyebrowlift:): use low density file, for example LDEM 4
Example for the moon:
LDEM 4 Global map: 1,036,800 vertex, File=2 MB
LDEM 16 Global map: 16,562,889 vertex, File=31.6 MB
LDEM 64 Global map: 264,902,625 vertex, File=506.3 MB
LDEM 128 Global map: 1,059,541,441 vertex, File=1,98 GB
LDEM 256 1/4 map: 10616832 vertex, File=1,98 GB
LDEM 512 1/16 map: 10616832 vertex, File=1,98 GB
TODO: Now I read all the the file, I must change it for reading only the data that i need.
For RickyBlender: for the full Moon, I have used all the point of LDEM 64, with multple rendering and then I merged the image Here you can found the full resolution (4000x4000 pix)
where can we find the craters names with coordinates for moon or other bodies ?
the first pic of moon is awsome but not certain it can be done on 32 bits vista!
the craters looks almost real !
also how much time did this take to render?
i did a test in 256 this morning
and i can load the ldem4 fro the moon
but then at thebottom of panel when i try to change the long lat coordiantes
it goes back to 0!
so should i be able to change theses coordinates to get area i want ?
also can you put back here in this thread how DWG showing how the coordinates works like you had in the old thread!
i added the 2 files IMG and LDEM 4 in same folder with blend file
but now i run it again and get the following error
location:<unknown location>:-1
Traceback (most recent call last):
File “nasaLOR1.py”, line 406, in draw
NameError: global name ‘MINIMUM_LATITUDE’ is not defined
what did i do wrong here?
by the way i use the same old maps from the old folder of 2.49
unless theses maps format have changed !
Coordinates: Latitude (on the left) and Longitude (on the right).
User interface Explanation:
With 1, 2, 3, and 4 you choose the region that you want import.
1 Must be higher (northern most) of 2
4 Must be higher (eastern most) of 3
Valid values for 1 and 2 are shown in top of the user interface (first row after Import File):
Minimum Latitude and Maximum Latitude
Valid values for 3 and 4 are shown in top of the user interface (second row after Import File):
Westernmost Longitude, Easternmost Longitude
The extreme values are automatically setting. If the values are not consistent with these rule the Import button is not displayed.
Quote from old thread
ValterVB: So if you want from North pole to Equator you must set Northernmost=90 and Southernmost=0
if you want from South pole to Equator you must set Northernmost=0 and Southernmost=-90
Longitude are in the other side From 0 to 360
If you want from North Pole to South pole but only 1 half of the planet, set
Northernmost=90 Southernmost=-90 and for ex. Westernmost=0 Easternmost=180 RickyBlender: so for latitude
North pole is at + 90 degrees
Equator is at 0 degrees
South Pole is at - 90 degrees
longitude
goes from 0 to 360 degrees
so to get a full sphere
from latitude +90
to latitude -90
C:\Users\RJ\moonmapping\ filename
all files are located in this folder
old lbl file
PDS_VERSION_ID = “PDS3”
/*** This label describes three data files along with map projection /
/** information. The files described have the same name as this label /
/** but different extensions. They are: /
/** .IMG - PDS image file, stored as a binary two-dimensional array /
/** .JP2 - The same image stored with JPEG2000 compression /
/** .XML - An auxiliary text file in XML, provided to aid display of /
/** the JPEG2000 image with certain image processing software /
/** The map projection information includes parameters that are specific /
/** to this image. They are intended to be used with the general map /
/** projection descriptions in the file indicated by the keyword /
/** ^DATA_SET_MAP_PROJECTION. That file is found in the CATALOG directory /
/** of this archive. /
/** GENERAL DATA DESCRIPTION PARAMETERS ***/
PRODUCT_VERSION_ID = “V1”
DATA_SET_ID = “LRO-L-LOLA-4-GDR-V1.0”
PRODUCT_ID = “LDEM_4”
INSTRUMENT_HOST_NAME = “LUNAR RECONNAISSANCE ORBITER”
INSTRUMENT_NAME = “LUNAR ORBITER LASER ALTIMETER”
INSTRUMENT_ID = “LOLA”
COORDINATE_SYSTEM_NAME = “MEAN EARTH/POLAR AXIS OF DE421”
MISSION_PHASE_NAME = {“COMMISSIONING”,“NOMINAL MISSION”}
TARGET_NAME = MOON
START_TIME = 2009-07-13T17:33:17.246
STOP_TIME = 2009-12-17T23:59:59.193
PRODUCT_CREATION_TIME = 2010-03-15T00:00:00
PRODUCER_ID = LRO_LOLA_TEAM
PRODUCER_FULL_NAME = “DAVID E. SMITH”
PRODUCER_INSTITUTION_NAME = “GODDARD SPACE FLIGHT CENTER”
DESCRIPTION = "This data product is a shape map (radius)
of the Moon at a resolution of 4 pixels per degree, based on altimetry
data acquired by the LOLA instrument. The preliminary LOLA Laser data are
the source for this data set. Since the altitude of the LRO spacecraft was
higher than the 30-70 km orbit for which LOLA was designed, many of the
ranges are noise. The ground tracks were interpolated using the Generic
Mapping Tools programs ‘surface’ and ‘grdblend’. Map values are referred
to a radius of 1737400 m.
This label describes three objects. The first is an IMG file in the form
of a binary table with one row for each 0.25 degree latitude. The second is
a JP2 file of the same filename, that uses a jpeg 2000 compression to
render the image. The third is an auxiliary xml file that contains
extensible markup language that is interpreted by GDAL readers (www.gdal.org)
"
OBJECT = UNCOMPRESSED_FILE
FILE_NAME = “LDEM_4.IMG”
RECORD_TYPE = FIXED_LENGTH
FILE_RECORDS = 720
RECORD_BYTES = 2880
^IMAGE = LDEM_4.IMG
OBJECT = IMAGE
NAME = HEIGHT
DESCRIPTION = “Each sample represents height relative to a
reference radius (OFFSET) and is generated using preliminary LOLA data
produced by the LOLA team.”
LINES = 720
LINE_SAMPLES = 1440
SAMPLE_TYPE = LSB_INTEGER
SAMPLE_BITS = 16
UNIT = METER
SCALING_FACTOR = 0.5
OFFSET = 1737400.
hope this is still good as file data !
when running script i get only the script name no fields in panel!
i did another test here
open a new file pass script into text editor and ran it
and now i get all the fields
but get this error when loading up the LBL file
location:<unknown location>:-1
Traceback (most recent call last):
File “Text”, line 456, in draw
File “Text”, line 133, in RealLat
File “Text”, line 116, in LineToLat
ZeroDivisionError: int division or modulo by zero
location:<unknown location>:-1
note don’t understand why the old file is not working anymore !
ok tested the last version and still get the same last error for Zero division!
location:<unknown location>:-1
Traceback (most recent call last):
File “nasaLOR2.py”, line 462, in draw
File “nasaLOR2.py”, line 139, in RealLat
File “nasaLOR2.py”, line 122, in LineToLat
ZeroDivisionError: int division or modulo by zero