https://ee.heavengames.com/cgi-bin/foru ... =17#post18
How to generate EE 2 maps with GDAL:
First we need to install Python and GDAL. An easy to follow guide for this can be found here:
https://sandbox.idre.ucla.edu/sandbox/t ... or-windows
Once installed, we can proceed to acquire the elevation data from which we'll generate the maps. Go to:
https://maps.ngdc.noaa.gov/viewers/grid ... index.html
Select ETOPO1 (bedrock) as data set. Select the area which you want to use for your map with the rectangle tool. You can optimise your selection by altering the coordinates in the Area of Interest field. Once satisfied with your selection download the data. You'll receive a file called exportImage.
Feel free to rename it to something more fitting, e.g. europemap. Just make sure to not use any spaces in the name. Add the file extension .tif to the file. Our example file would thus be europemap.tif. Take note of the directory where the file is located, e.g. your downloads folder.
Open now the windows command line by going to the Start Menu -> Run ->Type in cmd and hit Enter.
Type in cd followed by the directory where the .tif file is located, e.g. your download folder. Thus you should type:
cd C:\Users\User\Downloads
and hit Enter. We're now in the directory with the .tif file. Now type:
gdal_translate europemap.tif europemap.bil
and hit Enter.
A bunch of different files will be generated in the folder. Locate the file with the .bil extension, e.g. europemap.bil. Copy and paste it into your Elevation Maps folder, e.g. at
C:\Users\EE2Player\Documents\Empire Earth II\import
Change the file extension from .bil to .bin
Now create a new file in the Elevation Maps folder and give it the same name that your .bin file has, e.g. europemap.fmt. Paste this Text file now in your EE2 import Folder.
Code: Select all
input_eqv
begin name_equiv
$minimum_value min__value
$maximum_value max__value
end name_equiv
begin constant
data_byte_order text little_endian
file_title text My%Selection
end constant
ASCII_input_file_header_separate_varied "selection header"
create_format 0 0 text 0
binary_input_data "PC binary::elev_m"
elev_m 1 2 ARRAY["lat" 45.000000 to 35.000000 by 0.00833333333]["lon" -8.000000 to 0.000000 by 0.00833333333] OF int16 0
... and put there in the .hdr file for Empire Earth 2.BYTEORDER I
LAYOUT BIL
NROWS 2308
NCOLS 6889
NBANDS 1
NBITS 16
BANDROWBYTES 13778
TOTALROWBYTES 13778
PIXELTYPE SIGNEDINT
ULXMAP -123.983336665687
ULYMAP 55.6500018082917
XDIM 0.0166666686268745
YDIM 0.0166666686268745
If everything was done correctly you should now be able to generate a map in EE2's map editor from the .bin file we created. Have Fun.file_title = europemap.hdr
data_type = raster
grid_cell_registration = center
map_projection = Lat/Lon
left_map_x = -123.983336665687
right_map_x = 55.6500018082917
upper_map_y = 0.0166666686268745
lower_map_y = 0.0166666686268745
number_of_rows = 1846
number_of_columns = 3401
grid_size = 0.00833333333
elev_m_unit = meters
min__value = -30
max__value = 4984
elev_m_min = -30
elev_m_max = 4984
elev_m_missing_flag = -500
number_of_display_colors = 256
data_value_unit = elev_m
data_byte_order = little_endian
At least here is a example file: