kohlenklau Posted December 10, 2022 Share Posted December 10, 2022 (edited) As a service to the community I have gotten Butschi's thumbs up to post this thread and you all can see me struggle or whatever to try and successfully use Butschi's Map Elevation tool. Butschi calls it "CMAutoEditor" but I may tend to call it Butschi's Map Elevation Tool, sorry! Butschi already has a second tool in the works and he has a thread on that as it progresses. I think I have seen his continued discussion. I will post links to the forum thread. So to be fully clear, I am just gonna tackle the first tool that helps set elevations in your CM scenario/map. I have a few hours now and will put out some effort to get the juices flowing. Let me go grab the thread links. Butschi's initial post where he mentions developing the map elevation tool. He gives a great sample right there in the first post with the real data, the CM elevation grid and then the screenshot IN the game. It looks stupendous. 7 hours of a machine cranking away is no worry. "CMAutoEditor works while you sleep and dream of your completed map served with coffee in the morning!" Edited December 10, 2022 by kohlenklau 3 Quote Link to comment Share on other sites More sharing options...
kohlenklau Posted December 10, 2022 Author Share Posted December 10, 2022 (edited) Step 1 is to go download some stuff that supports Butschi's python script. The script can only run in a "python environment"... I will go to conda.io to grab miniconda3 for my windows 64 bit OS. Got it, I think. Installed I think. Now I go to github... Quote right, I uploaded the script: https://github.com/DerButschi/CMAutoEditor It is still somewhat of a beta version, meaning it works for me but I only tested it with a screen resolution of 1920x1080. Quote Once in github, if you don't care about all the git-related stuff, issue tracking and what not, you can get the code with just 2 clicks: click "code"->click "Download ZIP". I must go and study the simple running of the script in python environment. I honestly don't know how to do it yet. Give me a few days. Edited December 11, 2022 by kohlenklau 0 Quote Link to comment Share on other sites More sharing options...
kohlenklau Posted December 11, 2022 Author Share Posted December 11, 2022 (edited) Nothing is ever easy that will be worthwhile! I am getting an install error for miniconda "Failed to Create Menus"...so let me go and see how to resolve that. EDIT: OK, I had Windows 7 on the PC my son built me for my 50th birthday. Almost 58 so it is an old system! I had to go to the archives for a version that might work for me. I picked one that seemed to STILL be python 3.* but a few years old. It installed with no warnings. I went to the command prompt for the first time ever in my life and it says I have a python environment. What an accomplishment for tonight! I think I will call it a day and this week I try to actually get the CMAutoEditor to run... Edited December 11, 2022 by kohlenklau 3 Quote Link to comment Share on other sites More sharing options...
Butschi Posted December 11, 2022 Share Posted December 11, 2022 9 hours ago, kohlenklau said: Nothing is ever easy that will be worthwhile! I am getting an install error for miniconda "Failed to Create Menus"...so let me go and see how to resolve that. EDIT: OK, I had Windows 7 on the PC my son built me for my 50th birthday. Almost 58 so it is an old system! I had to go to the archives for a version that might work for me. I picked one that seemed to STILL be python 3.* but a few years old. It installed with no warnings. I went to the command prompt for the first time ever in my life and it says I have a python environment. What an accomplishment for tonight! I think I will call it a day and this week I try to actually get the CMAutoEditor to run... Thank you very much for your efforts! At this stage there is only so much I can do myself to find all the possible pitfalls and I'm also still learning how to do such a community project. I admit I had never thought of Windows 7... 1 Quote Link to comment Share on other sites More sharing options...
kohlenklau Posted December 11, 2022 Author Share Posted December 11, 2022 Don't worry at all Butschi. This thread is just showing folks my journey. I think I can get there eventually. Today I am outside building a roof so tonight I will continue onward. 0 Quote Link to comment Share on other sites More sharing options...
Aragorn2002 Posted December 11, 2022 Share Posted December 11, 2022 (edited) What a superb intitiative, Phil. For sure going to try this. Thanks to both you and Butschi, the father of this very promising tool. As it happens I'm also using Windows 7. Edited December 11, 2022 by Aragorn2002 0 Quote Link to comment Share on other sites More sharing options...
kohlenklau Posted December 11, 2022 Author Share Posted December 11, 2022 For the Windows 7 issue, this is the version of the exe that I found in the conda archives last night...it installed with no errors and I have a python environment. Miniconda3-py37_4.8.2-Windows-x86_64 dot exe (not a link, just stating the version filename) 0 Quote Link to comment Share on other sites More sharing options...
kohlenklau Posted December 11, 2022 Author Share Posted December 11, 2022 @Butschi Hi Nico, I watched your CMAutoEditor tutorial video and at 2:35 or so you have the Command Window but I cannot see exactly what you type to get the additional packages from anaconda powershell. The letters are so small and hard to read. I am in the countryside and have a bad connection. Maybe other folks do see it perfect but not me. Could you please give me those several entries here in this "CMAutoEditor for Dummies" thread? Thanks! I know this low level of my knowledge probably amuses you as a programmer. But I feel the audience to best utilize this effort of yours might be guys like me that need instructions at a very basic level. Or maybe I am the only dummy. hahaha 0 Quote Link to comment Share on other sites More sharing options...
Aragorn2002 Posted December 11, 2022 Share Posted December 11, 2022 (edited) 7 minutes ago, kohlenklau said: @Butschi Hi Nico, I watched your CMAutoEditor tutorial video and at 2:35 or so you have the Command Window but I cannot see exactly what you type to get the additional packages from anaconda powershell. The letters are so small and hard to read. I am in the countryside and have a bad connection. Maybe other folks do see it perfect but not me. Could you please give me those several entries here in this "CMAutoEditor for Dummies" thread? Thanks! I know this low level of my knowledge probably amuses you as a programmer. But I feel the audience to best utilize this effort of yours might be guys like me that need instructions at a very basic level. Or maybe I am the only dummy. hahaha You're not, I'm sorry to say. I really would like to master this, but someone has to spell it out for me. Edited December 11, 2022 by Aragorn2002 0 Quote Link to comment Share on other sites More sharing options...
kohlenklau Posted December 11, 2022 Author Share Posted December 11, 2022 For the Windows 7 issue, here is the "archive" for finding the older versions to download. https://repo.anaconda.com/miniconda/ 1 Quote Link to comment Share on other sites More sharing options...
kohlenklau Posted December 11, 2022 Author Share Posted December 11, 2022 (edited) In this same thread, as a parallel path to this effort to learn the Butschi CMAutoEditor, I will also explore how to use Google Earth Pro to extract data to feed into the CMAutoEditor. Edited December 11, 2022 by kohlenklau 1 Quote Link to comment Share on other sites More sharing options...
Butschi Posted December 11, 2022 Share Posted December 11, 2022 1 hour ago, kohlenklau said: @Butschi Hi Nico, I watched your CMAutoEditor tutorial video and at 2:35 or so you have the Command Window but I cannot see exactly what you type to get the additional packages from anaconda powershell. The letters are so small and hard to read. I am in the countryside and have a bad connection. Maybe other folks do see it perfect but not me. Could you please give me those several entries here in this "CMAutoEditor for Dummies" thread? Thanks! I know this low level of my knowledge probably amuses you as a programmer. But I feel the audience to best utilize this effort of yours might be guys like me that need instructions at a very basic level. Or maybe I am the only dummy. hahaha No worries. If I thought this so trivial, I wouldn't have done the video. And you are right, I had to zoom in all the way to be able to read the text. It says: cd E:\Spiele\CMAutoEditor (the path where my version of CMAutoEditor is). pip install -r requirements.txt 1 Quote Link to comment Share on other sites More sharing options...
kohlenklau Posted December 11, 2022 Author Share Posted December 11, 2022 (edited) Thanks Nico! OK, I will go to my directory where I have miniconda3 and "shift-right click" to open a window to get my command prompt in the proper directory. I put miniconda3 in C:\Users\Phil Calling Doctor Butschi...I did something wrong. I am thinking (very dangerous) I must first get into this python environment by getting the command prompt in my directory that has miniconda3 and THEN do your entries for the extra stuff? But I got a dreaded syntax error. hmmm Edited December 11, 2022 by kohlenklau 0 Quote Link to comment Share on other sites More sharing options...
Butschi Posted December 11, 2022 Share Posted December 11, 2022 I think you are in a python interactive terminal. (You started that by entering just "python" as command). So the system expects python code not Windows command line stuff. Try to exit python (ctrl d) or just open a new command prompt. Then do "cd ..." again. Btw. if depending on how you set things up you want to do "conda activate base" first (so that warning there doesn't appear). Do "python" only in combination with something after it, like e.g. "python cmautoeditor.py -i input.csv". 1 Quote Link to comment Share on other sites More sharing options...
kohlenklau Posted December 11, 2022 Author Share Posted December 11, 2022 I will come up with a spoonfed list of EXACT command lines and steps. 1 Quote Link to comment Share on other sites More sharing options...
kohlenklau Posted December 12, 2022 Author Share Posted December 12, 2022 ok, I had the code from github and it was in a folder IN another folder. I went ahead and placed the inner folder in C:\Users\Phil for my test of the elevation only version of CMAutoEditor the folder was called "CMAutoEditor-master" so, got to C:\Users\Phil and shift-right click to see a window with an option for "Open command window here" You get the black command window with C:\Users\Phil> The command window opened and I successfully changed directory and installed the requirements. cd C:\Users\Phil\CMAutoEditor-master then it shifts directory and you see C:\Users\Phil\CMAutoEditor-master> then type pip install -r requirements.txt It scrolls a bunch of code stuff as it loads things I guess it is done just once and you never do it again. @Butschi, correct Herr Doktor? 0 Quote Link to comment Share on other sites More sharing options...
Butschi Posted December 12, 2022 Share Posted December 12, 2022 12 minutes ago, kohlenklau said: ok, I had the code from github and it was in a folder IN another folder. I went ahead and placed the inner folder in C:\Users\Phil for my test of the elevation only version of CMAutoEditor the folder was called "CMAutoEditor-master" so, got to C:\Users\Phil and shift-right click to see a window with an option for "Open command window here" You get the black command window with C:\Users\Phil> The command window opened and I successfully changed directory and installed the requirements. cd C:\Users\Phil\CMAutoEditor-master then it shifts directory and you see C:\Users\Phil\CMAutoEditor-master> then type pip install -r requirements.txt It scrolls a bunch of code stuff as it loads things I guess it is done just once and you never do it again. @Butschi, correct Herr Doktor? Correct, as long as you don't update CMAutoEditor (in which case the requirements file may change so you would have to run pip install -r requirements.txt again)... which, of course, you will want to do eventually, I hope. 1 Quote Link to comment Share on other sites More sharing options...
kohlenklau Posted December 12, 2022 Author Share Posted December 12, 2022 2 minutes ago, Butschi said: Correct Thank you sir. You are very patient with the non-coder slackers you are making this tool for! 1 Quote Link to comment Share on other sites More sharing options...
Butschi Posted December 12, 2022 Share Posted December 12, 2022 5 hours ago, kohlenklau said: Thank you sir. You are very patient with the non-coder slackers you are making this tool for! The customer is king. I promise your suffering won't be in vain. I've thought about it and I guess I should prioritize user friendliness over adding and tweaking new features - for what good are is all that shiny stuff if you need a PhD in CM-toology to use it. I just can't promise much. 2 Quote Link to comment Share on other sites More sharing options...
kohlenklau Posted December 12, 2022 Author Share Posted December 12, 2022 I have 2 somewhat parallel paths going on. 1. The one is to learn how to use Butschi's CMAutoEditor to help me make a CM map. 2. The other is how to best find and prepare the formatted data in *.csv file for the areas I want to make a CM map. https://gisgeography.com/free-global-dem-data-sources/ I thought I had found a source of the raw data but maybe it is just the tops of trees and buildings? 1 Quote Link to comment Share on other sites More sharing options...
kohlenklau Posted December 13, 2022 Author Share Posted December 13, 2022 10 hours ago, kohlenklau said: then it shifts directory and you see C:\Users\Phil\CMAutoEditor-master> then type pip install -r requirements.txt It scrolls a bunch of code stuff as it loads things @Butschi please sir, the command window was still difficult for me to read the tiny letters in the video for later when you give the commands... I think I see python .\cmautoeditor.py then -i example_height_map.csv then it starts the 5 second countdown? oh, question... at this point my CM game is open already to the editor in the new scenario file with other settings established and the scenario is a saved file already? I ASSUME with just 5 seconds to alt-tab to the CM game, right? 0 Quote Link to comment Share on other sites More sharing options...
Aragorn2002 Posted December 13, 2022 Share Posted December 13, 2022 10 hours ago, Butschi said: The customer is king. I promise your suffering won't be in vain. I've thought about it and I guess I should prioritize user friendliness over adding and tweaking new features - for what good are is all that shiny stuff if you need a PhD in CM-toology to use it. I just can't promise much. Personally I always put too much energy and time into map making and I'm usually exhausted before I get to making the scenario itself. This amazing tool will perhaps ensure more scenarios are made. 0 Quote Link to comment Share on other sites More sharing options...
Butschi Posted December 13, 2022 Share Posted December 13, 2022 Let's make the most of @kohlenklau's effort. This whole python business appears to be rather complicated for Average Joe so I've tried to put together a pre-built standalone version. Could someone please download this and check if cmautoditor.exe works? https://www.dropbox.com/s/goth529mnvxwkoh/cmautoeditor-1.0.1beta1.zip?dl=0 After unzipping the package you can go to the command prompt and do cmautoeditor.exe -i example_height_map.csv or right click on the file make a link and add the " -i example_height_map.csv" to the command there. This is not the final version, the other executable, dgm2cm.exe still misses some dependencies but for testing the cmautoeditor itself it should work. Sorry, this won't help everyone. The charming thing about having a python script is that everyone can just grab a python installtion that works on his machine and run the script. Pre-built executables have to be compiled for each and every ennvironment and I can't possibly do that. But maybe it helps the average Windows 10 user out there. 1 Quote Link to comment Share on other sites More sharing options...
Butschi Posted December 13, 2022 Share Posted December 13, 2022 5 hours ago, kohlenklau said: @Butschi please sir, the command window was still difficult for me to read the tiny letters in the video for later when you give the commands... I think I see python .\cmautoeditor.py then -i example_height_map.csv then it starts the 5 second countdown? oh, question... at this point my CM game is open already to the editor in the new scenario file with other settings established and the scenario is a saved file already? I ASSUME with just 5 seconds to alt-tab to the CM game, right? python .\cmautoeditor.py -i example_height_map.csv (one command) Then the 5 second countdown starts. You should have the CM Editor open before that, switched to the "Elevation" menu and clicked "Direct". There is no need to do other settings before that and you don't have to save anything. Make sure that the starting map is 320m x 320m. 0 Quote Link to comment Share on other sites More sharing options...
kohlenklau Posted December 13, 2022 Author Share Posted December 13, 2022 OK, I successfully got it to work. Oh boy. The 5 seconds got me the first try as I had the forum window open and alt-tab did not get me straight to CMFI in time! I then closed the internet browser. Now I only had python command window and the CMFI game so alt-tab for my IBM PC got me over to see the big show! Of course I had to re-enter the command line. I did abort the process before completion. It was already my morning, I had my coffee already in my cup. But if I had started last night then my advertising slogan (revised with just saying completed elevations versus "completed map") would have been true... Now I must go and focus on where I get my desired DEM data and how to custom make the input csv file. "CMAutoEditor works while you sleep and dream of your completed elevations served with coffee in the morning!" 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.