Jump to content

Script to automatically set the elevation in the editor


Butschi

Recommended Posts

1 hour ago, Dawntaker said:

I've given this a try and it works, none of the python libraries were required to be installed through pip or anaconda. The only problem that I can see tripping people up is that if they double click the exe to run it, it immediately closes the python window as there was no input parameter (so it errors). So the only way to currently run it is by opening a cmd window and then running the exe from that with parameters. 

Thanks for trying!

There is another way, though: Right click on the exe, click "create shortcut", add command line options behind whats in "Target". Double click shortcut.

Link to comment
Share on other sites

Update 1.2.1:

https://github.com/DerButschi/CMAutoEditor/releases/tag/1.2.1

  • Change to geotiff2cm.py: Progress bar and faster processing
  • Added pre-built binaries

Binaries:
Download the attached release-1.2.1.zip and extract the files to a folder of your choice. Since they still need command line parameters, either

  • start them from the command prompt or
  • right click on the file in the explorer and click "create shortcut". Right click on the the newly created shortcut. In the field "Target" append the parameters just as before, e.g. -i example_height_map.csv
Edited by Butschi
Link to comment
Share on other sites

This latest update could help to get rid of the pain of having to do all the python related stuff. You just download the files and either click on them or do e.g. .\cmautoeditor.exe in the command prompt. No more setting up python and all that.

"could help" means that it works on my machine on Windows 10. It should work on other Windows 10 machines but I have no clue if it works on, say, Windows 7. If someone would volunteer to test it on Windows 7 that would be awesome, of course! 🙂

"Err, what now? Binaries? Download? Shortcut?" I hear you say. Here's a little How To:

First of all for all intents and purposes "binary" here means "usable like your average window program". You go to the folder and click it. Now, how do you get the stuff?

Go to https://github.com/DerButschi/CMAutoEditor/releases/tag/1.2.1

Click on release-1.2.1.zip:

09hUcxY.jpg

You will (possible) get a pop-up that asks you where to download it the file. Once it is downloaded (sorry, rather large with 382 MB), unzip it to the folder of your choice. That's it basically.

Now, if you just double click the files, not much will happen. That's because they need to know a few parameters. Look in this thread what those parameters are, look over in @kohlenklau's test dummy thread or read the README.md. In the absence of a real GUI (but @Dawntaker is currently working on it) you will have to provide those manually. But that is not really difficult. You do it by making a shortcut and giving it the extra parameters.

You create a shortcut like this: Right click the respective file and click "Create shortcut".

M3M7X0e.jpg

Now, right click the newly created shortcut (you need one for each file you want to use), e.g. "geotiff2cm - Shortcut". Click on "Properties".

XyJPT43.jpg

A new window opens, go to field "Target" and append the parameters after what is already in there:

b8NcWzU.jpg

Click ok and you are good to go. To change the parameters, say you want to work on a different file, just change the parameters in the shortcut file.

Hope that helps. As always, feel free to ask if something is unclear. 🙂

Link to comment
Share on other sites

https://github.com/DerButschi/CMAutoEditor/releases/tag/1.3.1

1.3.1 has been released that adds a user interface to the cmautoeditor, this means that if you double click on it or run it from a command line/shortcut without any additional parameters, a interface will come up giving you the option to select a csv file and set the countdown via a combobox.

To allow those who enjoy using command lines, the program can still be run how @Butschihas described it in his 1.2.1 post. 

Thanks @Butschi for making sure the code wasn't a load of rubbish will millions of bugs and for the suggestions on how the UI should be implemented. Future UI's for the data converters to come!

Link to comment
Share on other sites

1 hour ago, Combatintman said:

Do such people exist - are they the same types that love going to the dentist? 😀

They do exist and possibly they even enjoy going to the dentist. *shiver*

From a developer point of view... It's nothing I enjoy but it is just simpler to save your command line arguments in a config file and start from such pre-set arguments than having to click through a GUI every time to get the same result. Just saves time. 🤷‍♂️

For the rest of you: Enjoy your shiny new toy. 😉

Link to comment
Share on other sites

47 minutes ago, Butschi said:

They do exist and possibly they even enjoy going to the dentist. *shiver*

From a developer point of view... It's nothing I enjoy but it is just simpler to save your command line arguments in a config file and start from such pre-set arguments than having to click through a GUI every time to get the same result. Just saves time. 🤷‍♂️

For the rest of you: Enjoy your shiny new toy. 😉

I am keenly interested in this still. Do you have an estimated ETA on when the public will have access to the house placement feature?

I've also shopped around on the links you've provided me for the .tar(?).gz files but they are impossible to find elsewhere as previously stated.

Worst of all the websites provided REFUSE to work with google translate. Damn!

My areas of interest still include the Stalingrad-Kalach-Kletskaya belt, Ukraine, and now - Grozny (On the down low but good progress). In the Grozny search I came across cool websites like https://earthexplorer.usgs.gov/ which offers access to maps around the world in various formats.

They have a "Digital elevation" section. Is there any way this could be relevant to or useful with your tool? Eventually?

Is there a way I can convert this digital elevation data to a .tar.gz file for your program to recognize?

Armored Brigade specifically mentions using "SRTM 1 Arc-Second Global" digital elevation when making maps for that game.

Link to comment
Share on other sites

19 minutes ago, Artkin said:

Do you have an estimated ETA on when the public will have access to the house placement feature?

No. During the last weeks I've been totally bogged down with making the already public part easier to use.

29 minutes ago, Artkin said:

I've also shopped around on the links you've provided me for the .tar(?).gz files but they are impossible to find elsewhere as previously stated.

You mean the xyz files? They are apparently only used in Germany and it seems all the sites where the data is available are German only. I suggest you use Google Lens on your smartphone in parallel (worked nicely for me on the Polish site 😉).

36 minutes ago, Artkin said:

My areas of interest still include the Stalingrad-Kalach-Kletskaya belt, Ukraine, and now - Grozny (On the down low but good progress). In the Grozny search I came across cool websites like https://earthexplorer.usgs.gov/ which offers access to maps around the world in various formats.

They have a "Digital elevation" section. Is there any way this could be relevant to or useful with your tool? Eventually?

Is there a way I can convert this digital elevation data to a .tar.gz file for your program to recognize?

Armored Brigade specifically mentions using "SRTM 1 Arc-Second Global" digital elevation when making maps for that game.

So, I'm not really an expert on that kind of data but SRTM and ALOS, etc. are satellite data and provide "only" raw elevations. Meaning, tree levels, buildings, etc. But you sure can try if that is good enough for you. If you find anything that gives you geotiff-Files (very common format for this kind of data) than you can use it with my "geotiff2cm.py". Please take a look at kohlenklau's thread for how to use it.

 

Link to comment
Share on other sites

7 minutes ago, Butschi said:

No. During the last weeks I've been totally bogged down with making the already public part easier to use.

You mean the xyz files? They are apparently only used in Germany and it seems all the sites where the data is available are German only. I suggest you use Google Lens on your smartphone in parallel (worked nicely for me on the Polish site 😉).

So, I'm not really an expert on that kind of data but SRTM and ALOS, etc. are satellite data and provide "only" raw elevations. Meaning, tree levels, buildings, etc. But you sure can try if that is good enough for you. If you find anything that gives you geotiff-Files (very common format for this kind of data) than you can use it with my "geotiff2cm.py". Please take a look at kohlenklau's thread for how to use it.

 

I don't associate with Google past their search engine and their maps (Which are both pretty garbage at this point too) so unfortunately I will be out of luck.

I will keep an eye out for those. Thank you, I look forward to your next release.

 

Link to comment
Share on other sites

  • 4 weeks later...
9 minutes ago, Artkin said:

Yooo I can't wait for this still !!!!!!!!!!! Let me test it or something for you. I want to see how it spits out my redo of the Donetsk airport map.

So all the auto creation of height maps is already available to download and run if you can get your head around command lines and how to get height maps from the internet. If your waiting for the Openstreet maps stuff @Butschi is working on that will do more then a height map, that's likely still a bit of a way off. As for more UI stuff from me, I'm in final year University and as a consequence they decided to hit me with the overwhelming work tactic. :( So all work has halted on my side, likely until I finish Uni sometime later in the year.

Link to comment
Share on other sites

1 minute ago, Dawntaker said:

So all the auto creation of height maps is already available to download and run if you can get your head around command lines and how to get height maps from the internet. If your waiting for the Openstreet maps stuff @Butschi is working on that will do more then a height map, that's likely still a bit of a way off. As for more UI stuff from me, I'm in final year University and as a consequence they decided to hit me with the overwhelming work tactic. :( So all work has halted on my side, likely until I finish Uni sometime later in the year.

Yeah so I'm able to run the tool and I got it to work. I don't need the UI but it's really awesome that you created that, thank you. I've yet to try it out.

My primary issue with using the tool currently is that it only accepts specific heightmap files which are found on a German website. I don't read German and it doesn't translate for me. Butschi recommended using a Google program but nah, **** Google. I'll use their website but not their software. Currently I'm unable to do anything with the tool honestly.

Also the height maps that I want to input are definitely not in the same format as the tool. I am primarily interested in the Don bend area of Russia West of Stalingrad (And also Donetsk Airport)... So I guess my post was a little pointless.

But yeah the tool + OSM stuff would pretty much do 90% of the work for mapping, and that's very exciting even if I don't get to use it.

Sending moral support your way guys. lolol.

Link to comment
Share on other sites

1 hour ago, Artkin said:

My primary issue with using the tool currently is that it only accepts specific heightmap files which are found on a German website. I don't read German and it doesn't translate for me. Butschi recommended using a Google program but nah, **** Google. I'll use their website but not their software. Currently I'm unable to do anything with the tool honestly.

Also the height maps that I want to input are definitely not in the same format as the tool. I am primarily interested in the Don bend area of Russia West of Stalingrad (And also Donetsk Airport)... So I guess my post was a little pointless.

Have you tried using geotiff2cm.py then? As I said, that is a much more common format. ALOS data, for instance, is in geotiff.

Link to comment
Share on other sites

4 minutes ago, Butschi said:

Have you tried using geotiff2cm.py then? As I said, that is a much more common format. ALOS data, for instance, is in geotiff.

I saw the other scripts included but wasnt sure what they were for. I'll take a look on that website I mentioned previously and I'll see if it has such files. Thank you

Link to comment
Share on other sites

1 minute ago, Artkin said:

I saw the other scripts included but wasnt sure what they were for. I'll take a look on that website I mentioned previously and I'll see if it has such files. Thank you

You are welcome. Be sure to take a look at kohlenklau's test dummy thread, there are a few explanations.

Link to comment
Share on other sites

1 minute ago, Dawntaker said:

Well I went down a long rabbit hole looking at this. Seems like one of the easiest things to access are heightmaps in the form of png or raw files. So creating converters for those might be something worth looking into in the far future.

A geotiff is just a normal .tif file with additional information about where on the globe you are. And you can get those from pretty much every shop/portal that gives out or sells digital terrain maps. pngs or raws would not add anything extra.

Link to comment
Share on other sites

1 hour ago, Artkin said:

Yooo I can't wait for this still !!!!!!!!!!! Let me test it or something for you. I want to see how it spits out my redo of the Donetsk airport map.

Don't worry, I'm still working on it and getting much closer. Keeping radio silence because it let's me focus. 😉

Link to comment
Share on other sites

  • 3 weeks later...

As an update, my latest map build:

OKdyI2Q.png

Z7cOP32.jpg

I (once more) reworked the buildings algorithm and roads/railways/streams. Mostly playing along nicely, although one has to take care not to have a too dense network, because then the algorithm won't be able to find a valid solution.

UmOsEFG.jpg

Now also with fence-like objects...

tHoFBbC.jpg

... and flavour objects.

PmSeuPO.jpg

So basically by now all the necessary functionality is there and working. Some things can be improved but that is more tweaking of cost functions, etc.

I am going to be working on maps for my first Agger Valley campaign, probably consisting of three missions. But afterwards I will go about making the tool available for everyone, I think. 🙂 (Which will involve tyding up, making a tutorial, etc.)

Link to comment
Share on other sites

On 2/17/2023 at 12:18 AM, Butschi said:

As an update, my latest map build:

OKdyI2Q.png

Z7cOP32.jpg

I (once more) reworked the buildings algorithm and roads/railways/streams. Mostly playing along nicely, although one has to take care not to have a too dense network, because then the algorithm won't be able to find a valid solution.

UmOsEFG.jpg

Now also with fence-like objects...

tHoFBbC.jpg

... and flavour objects.

PmSeuPO.jpg

So basically by now all the necessary functionality is there and working. Some things can be improved but that is more tweaking of cost functions, etc.

I am going to be working on maps for my first Agger Valley campaign, probably consisting of three missions. But afterwards I will go about making the tool available for everyone, I think. 🙂 (Which will involve tyding up, making a tutorial, etc.)

Looking great, Butschi. And superb news about the tool. I'm installing my new pc at the moment but for sure will dive into it, once your make it available. Vielen Dank!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...