HistWar Change the forum language :
*
Bienvenue, Invité. Veuillez vous connecter ou vous inscrire.
Avez-vous perdu votre courriel d'activation?

Connexion avec identifiant, mot de passe et durée de la session
Nouvelles: [Facebook] Notre page de fan / Our fan page : http://www.facebook.com/pages/HistWar/173511033275
 
Auteur Fil de discussion: Elevation on maps  (Lu 5886 fois)
0 Membres et 1 Invité sur ce fil de discussion.
brucepos
Caporal

Hors ligne Hors ligne

Messages: 15


« Répondre #45 le: 21 Mars 2010, 22:22:19 »

Hi,

Sorry you're having such a bother - I know how frustrating these things can be!

I've tidied up the guide a bit and I've also produced a script file that will automate some of the SciLab stuff. I've just uploaded onto the mods server, so it may take a little time to appear.

The version 2 guide you're looking for is the PDF file - I manage to upload the old Word Document as the version 2 file by mistake!

Brucepos
Journalisée
Broadsword
Capitaine
**
Hors ligne Hors ligne

Messages: 110


« Répondre #46 le: 22 Mars 2010, 01:25:11 »

Hi Brucepos,
Thanks again for the updated manual and the macro.
I wasn't sure how to use the macro -- do I just substitute my filename and path for "filename" in the Line 2, and then hit the "execute" command?
I tried that, but it hung up at one point with an error message:

for i=1:76;for j=1:101;remap(i,j)=linear_interpn(i,j,x1,x2,mapdata);end;end;
                                                                    !--error 999
linear_interpn: Wrong size for input argument #3.
at line       7 of exec file called by :   
exec('C:\Documents and Settings\Gina\Desktop\Histwar downloads\LG files\Altmacro.sce', -1)

Then I tried executing each command manually one by one, and all seemed OK until this:
->for i=1:76;for j=1:101;remap(i,j)=linear_interpn(i,j,x1,x2,mapdata);end;end;
                                                                    !--error 999
linear_interpn: Wrong size for input argument #3.

Suggestions? Also, your manual states: "Hook told us that the histwar maps use elevation data files 101 cells wide by 76 cells high." Would this be true for every size of HW map? I'm making a campaign map.
 
Journalisée
Hook
Chevalier d'HistWar
Modérateurs
****
Hors ligne Hors ligne

Messages: 1763


« Répondre #47 le: 22 Mars 2010, 01:52:46 »

Suggestions? Also, your manual states: "Hook told us that the histwar maps use elevation data files 101 cells wide by 76 cells high." Would this be true for every size of HW map? I'm making a campaign map.

The 6 km map is 61 by 46 cells.  All the rest, including the campaign map, are 101 by 76.

Hook
Journalisée
brucepos
Caporal

Hors ligne Hors ligne

Messages: 15


« Répondre #48 le: 22 Mars 2010, 07:22:13 »

Hi Broadsword,

It sounds as if something is going wrong at the data stage of things - if you put the file names left and right, top and bottom positions in correctly, then the macro should work. Could you tell me exactly what you put into the SciLab variables?
Journalisée
brucepos
Caporal

Hors ligne Hors ligne

Messages: 15


« Répondre #49 le: 22 Mars 2010, 13:29:13 »

Hi folks,

Time for some humble pie - I've found an error in the instructions and macro that meant the last five lines of data weren't transferred to the histwar file. A new set of instructions (Version 3) and a new macro (version 3) have been uploaded to the mods depot.

If you are going to use the macro, remember to set the two filenames, and the left, right, top and bottom values BEFORE you execute the macro.

Good luck (and sorry for using you all as Alpha testers!)
Journalisée
Tirailleur
Lieutenant
**
Hors ligne Hors ligne

Messages: 50



« Répondre #50 le: 22 Mars 2010, 19:54:36 »

Hi brucepos,

there is no problem to use us as alpha testers. This is really great work from you and it makes it so easy to have real height files for the napoleonic battlefields. It's the "dot on the i" for Les Grognards.

Thanks a lot
Journalisée
spec10
Officier d'HistWar
Lieutenant
**
Hors ligne Hors ligne

Messages: 80



WWW
« Répondre #51 le: 22 Mars 2010, 20:11:12 »

Only thing we gotta be careful about, or at least have them in mind: Some elevations might have changed over the years, so it's always good to check the sattelite data against historic maps when possible. (Famous example that comes to mind is the Waterloo battlefield where they moved an awful lot of soil to create that artificial hill that's standing there now, but of course that one's quite obvious. There might be more subtle changes on other Battlefields, I'm no expert on that, just some thought I just had)

But I'm sure many if not most battlefields haven't changed that much. At least that's what I hope, because this way of getting elevation data is simply awesome
« Dernière édition: 23 Mars 2010, 01:13:22 par spec10 » Journalisée

brucepos
Caporal

Hors ligne Hors ligne

Messages: 15


« Répondre #52 le: 22 Mars 2010, 20:57:16 »

That's a good point - after playing with the OOB editor I think it's like the published OOBs - hardly anything seems to agree and judgement is required. I had a bit of fun with the data visualising a bit of terrain I know - Arthur's Seat in Edinburgh!
Journalisée
brucepos
Caporal

Hors ligne Hors ligne

Messages: 15


« Répondre #53 le: 22 Mars 2010, 20:58:51 »

....and here's the google Earth version
Journalisée
Broadsword
Capitaine
**
Hors ligne Hors ligne

Messages: 110


« Répondre #54 le: 22 Mars 2010, 21:43:14 »

Thanks again for the V3 updates, Brucepos!
Tried again, but still no joy. I'm going to show you my inputs, so you can see where I might have gone wrong:
1. After deriving all the top, right, etc., numbers, I input them as follows:
-->size(alt1)
 ans  =
 
    6001.    6001. 
 
-->left=2108
 left  =
 
    2108. 
 
-->right=2714
 right  =
 
    2714. 
 
-->top=7608
 top  =
 
    7608. 
 
-->bottom=7560
 bottom  =
 
    7560. 

Then  I ran the macro, having changed my terms according to the name and path of my file (my master file is called "alt1"):
stacksize('max');
alt1=fscanfMat("C:\temp\alt1.txt");
mapdata=alt1(top:bottom,left:right);
[nr nc]=size(mapdata);
x1=1:75/(nr-1):76;
x2=1:100/(nc-1):101;
for i=1:76;for j=1:101;remap(i,j)=linear_interpn(i,j,x1,x2,mapdata);end;end;
remap=remap-min(remap);
iremap=iconvert(remap,2);
mopen(fileoutput,'wb');
for i=1:76; mput(iremap(i,:),'sl');end;
mclose();

The Console gave this error result:

-->exec('C:\Documents and Settings\Gina\Desktop\Histwar downloads\LG files\Altmacro3.sce', -1)
for i=1:76;for j=1:101;remap(i,j)=linear_interpn(i,j,x1,x2,mapdata);end;end;
                                                                    !--error 999
linear_interpn: Wrong size for input argument #3.
at line       7 of exec file called by :   
exec('C:\Documents and Settings\Gina\Desktop\Histwar downloads\LG files\Altmacro3.sce', -1)
 
Any ideas?
Journalisée
brucepos
Caporal

Hors ligne Hors ligne

Messages: 15


« Répondre #55 le: 22 Mars 2010, 22:43:40 »

Hi Broadsword,

Try switching the numbers for top and bottom - the index is from the top of the map, so you'd expect the bottom number to be bigger.
Journalisée
Broadsword
Capitaine
**
Hors ligne Hors ligne

Messages: 110


« Répondre #56 le: 23 Mars 2010, 00:33:44 »

Hi Broadsword,

Try switching the numbers for top and bottom - the index is from the top of the map, so you'd expect the bottom number to be bigger.

Tried switching top and bottom, but now I got this error:

-->exec('C:\Documents and Settings\Gina\Desktop\Histwar downloads\LG files\Altmacro3.sce', -1)
mapdata=alt1(top:bottom,left:right);
                                    !--error 21
Invalid index.

at line       3 of exec file called by :   
exec('C:\Documents and Settings\Gina\Desktop\Histwar downloads\LG files\Altmacro3.sce', -1)
 
Journalisée
brucepos
Caporal

Hors ligne Hors ligne

Messages: 15


« Répondre #57 le: 23 Mars 2010, 07:17:32 »

Hi Broadsword,

If you send me your datafiles and your scilab environment file (use the save option in the menus at the top), I'll have a look at them for you. My Email address is on the instructions.
Journalisée
Hook
Chevalier d'HistWar
Modérateurs
****
Hors ligne Hors ligne

Messages: 1763


« Répondre #58 le: 23 Mars 2010, 10:57:37 »

Just a guess here, but does bottom-top need to be 76 or greater?

The ratio between left to right and top to bottom isn't anywhere near what you'd expect... I suspect there's a math error calculating top and bottom.

Hook
Journalisée
Tirailleur
Lieutenant
**
Hors ligne Hors ligne

Messages: 50



« Répondre #59 le: 23 Mars 2010, 11:01:50 »

Hi Broadsword,

at my first try, i had the same error as you.

The problem seems to be if you only use the big data file (you can see this on your size(alt1) 6001). You have to look at your adjustments for Google Earth (the checkmarks), so you can see the sub data files, too.

One sub data file has a matrix of 1200 x 1200, so if you use only one data file you should see size(alt1) 1200 1200, or by two 2400 1200.

The big file is for example: srtm_39_03
The sub file: srtm_39_03_3_1
(as you see in the fantastic guide from brucepos)

All went well after i used the sub data files.
Journalisée
Pages: 1 2 3 [4] 5 6   Haut de page
  Imprimer  
 
Aller à:  

Propulsé par MySQL Propulsé par PHP Powered by SMF 1.1.16 | SMF © 2006-2008, Simple Machines
Intégration graphique : e-Déaliz Webdesign : Studio Poids Plume
XHTML 1.0 Transitionnel valide ! CSS valide !