Jump to content
Sign In to follow this  
xentrix

Creating a map from Google Earth [UPDATED]

34 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

THIS TUTORIAL HAS BEEN EDITED, TO INCLUDE THE USE OF FantastiCoast. A VBScript THAT WAS USED HAS BEEN REMOVED AND REPLACED BY FantastiCoast.


 

Hello all!

I've developed a way to get real world data from Google Earth (actually the data is provided by CGIAR-CSI and appears on Google Earth with the use of a kmz plugin) and create a map.

It involves the use of FantastiCoast, an application I've made, that creates an image file to use in SC4Terraformer or SC4Mapper or SC4 itself (not recommended).

The results are quite good. Check out a screenshot from the greater Athens area, just as it came out from my process and not terraformed at all!

greaterathensv.jpg

 

 

 

Software you will need:

  • Google Earth
  • The SRTM Digital Elevation Data from srtm.csi.cgiar.org There is a download link in that page, named "Google Link" that downloads a file named srtm41.kmz
  • FantastiCoast, attached at the end of this post
  • SC4Terraformer or SC4Mapper
  • SimCity 4 2.gif
 

Steps to make your map:

 

1. Open Google Earth by booting SRTM Data

After you download srtm41.kmz (41 means version 4.1, it will probably be updated sometime...), save it in a folder and double click it. It will open Google Earth, with SRTM data loaded.

Enable the place in the sidebar

tutorial1q.jpg

and you will see the results on the map

tutorial2k.jpg

 

2. Locate the area you want and download the data you need

I will use the area of Athens that you see in the beginning of this tutorial.

So, click on the green icon of the tile you are interested in. If you need data from more tiles, read further.

tutorial3n.jpg

 

Then, click on the link

tutorial4.jpg

and watch the results

tutorial5x.jpg

 

Next, enable the Data checkbox in the sidebar, inside elevation preview --> Global legend

tutorial6w.jpg

 

and you will see the links for the data of the subtiles enabled

tutorial7.jpg

 

By clicking on the square icon next to the the "Data" label, you can download the precious data!

It is an .asc file.

For my example, I used the data from 4 subtiles, because the area I wanted was in the middle of them.

So, I downloaded

srtm_41_05_4_3.asc, srtm_41_05_4_4.asc, srtm_41_05_5_3.asc and srtm_41_05_5_4.asc

tutorial8b.jpg

 

*** As I mentioned earlier, if you need data from subtiles of 2 different tiles, go get them! Now you know how.

 

You can now close Google Earth.

 


There is one extra optional step which is not covered by this tutorial: Using DEM data in a GIS application (ie Global Mapper) to get a correct scale. Look at the end of this post for further details. 

 


 

 

3. Use FantastiCoast to create the bitmaps

Go to the end of this post, download and install FantastiCoast. * You need Microsoft's .NET Framework 4 to run FantastiCoast

... 

You can read usage instruction for FantastiCoast here

In short, open the .asc file and click "Launch". Then save the file as bmp or png or 16bit png. It is ready for SC4Terraformer or SC4Mapper!

If you downloaded more than one file, repeat for the rest.

You can see a downsized sample (originals are 4,11MB, 1200x1200 pixels):

tutorial9l.jpg

 

*** Do not forget: SC4Terraformer and SC4Mapper, just like SC4, need bitmaps of a specific size (64 pixels per km + 1 pixel, ie 1025x1025 for 16x16 km). You will get better results if you crop and stitch them instead of resizing them before using them in SC4T/SC4M/SC4. Do not let SC4T/SC4M resize the picture because the terrain will look very spikey.

 

Ok, I guess experienced map makers know what to do next...

However, I continue the tutorial, just in case you need more help. 

 

4. [optional] Stitch the bitmaps, in case you need data from more than one

Using a picture editor, you can stitch the pictures made by the script. For those who wonder, NO, they are not distorted, you can stitch them just by placing them one next to another.

Here is an example of a 2400x2400 picture

tutorial10.jpg

 

5. Crop the final picture

Now we have a bigger picture which contains the area we wanted. After we stitch the pictures, we have to crop the final picture to the size we need (1025x1025 pixels is the standard for a 16x16 map). The rule is

64 pixels * mapsize + 1

so for a mapsize of 16x16 km we need a 1025x1025 picture and for a mapsize of 16x32 we need a 1025x2049 etc.

Of course you can also resize instead of cropping but remember: Resizing always results in some kind of distortion, so you would better avoid it as much as possible. If you have to do it, do it only once and remember that you will probably have to Equalize the map in SC4T, in order to reduce some spikes you will get from the distortion.

 

So, after cropping my final picture to a 1025x1025 bitmap (I don't thing you need a screenshot for this), I am ready to go with SC4T.

 

6. Use SC4Terraformer or SC4Mapper  

I have only used SC4T because I have some installation problem with SC4M. However, there is no big difference.

Open SC4T, choose a Region you have created in the game for your new map, and click "Import image" under "Global tools". Pick your final image, click OK and them RGB and... voila! You have your new map, ready to play!

 

...well, almost!

Sometimes you might need to use "Equalize" just once, because the map will look a bit spikey. Judge by your own.

 

After saving, you can open the tiles one by one in the game (DO NOT USE RECONCILE!) and "save and exit to region", to render the map correctly.

 

7. Some finishing you have to do

The satellite data does not distinguish water masses such as rivers and lakes. You will have to create them on your own. Usually, they are visible as flat areas (lakes) and banks (rivers).

 

--- The scaling problem ---

- SRTM Digital Elevation Data has 90m precision. It is not bad, but it is much less data than the supposed size of the maps you create. Actually, your final map is downscaled by 16:90, meaning it is about 5 times shrinked. In my map, an area of approx 90x90 km, was turned into a map of 16x16.

There are solutions, one of which is approached by MallowTheCloud in his "Making Accurate-Scale Real-World Maps" tutorial. I will try to write a complete tutorial on the whole process soon.

Another solution of course, would be to resize the picture, regardless of the reduced precision. Try it, it might not be too bad... 4.gif

 

 

 

 

I hope you find this tutorial useful and you enjoy your new maps!

 

xentrix 

 

 

PS: I'd love to see some screenshots of any map you might create by this method, especially if you find anything weird with FantastiCoast. Thanks in advance!

 

FantastiCoast v1.0.0 setup.exe.zip

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

I cant answer if this is the right place...  I dont see why not...  but I would love to see the tutorial.


Your freedom is the most expensive thing you have, even if you arn't the one that paid for it... Use it well.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

This looks pretty nifty, I think I will give it a try.

The biggest thing to remember if producing maps with any dem and especially dem like cgiar's srtm  is their method of void repair is not always that good

Cgiar uses an algorythm that while is ok for repairing small voids in similar terrain. large voids in mountainous areas leave a little to be desired. and repair of large voids is better done from topo maps.

Cheers

drunk(always)

Ok, it's a few hours later and I've had a little play

Some things I've noticed are.

It scales the dem ok but if you do not scale up the length and width then obviously the hills will look a bit steep as in Xentrix's map of Athens. But it does not scale up the map size too well yet, tending to use steps rather than diagonals.

Also with only one source of dem and my afore mentioned void repair concerns some study of other topos or dem is required to ensure one is making accurate renditions.

As it stands I would not use this technique to upload maps to the stex at the moment, but I'll keep dicking around with the scalability to see what I can produce.

One thing I noticed after looking at my Darwin map after eleven months, crikey it looks very crude and in desparate need of an update. See one soon.

Cheers

drunk(always)

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

This tutorial is great but there is a slight problem...

The script you provided does not work with Windows Vista Pro x64...

Trying to fix it now and will provide you a new one if I manage to get it to work, but my VB skills are pretty lame these days and might take me a while.  Any chance you have one already so I don't have to reinvent the wheel?

Share this post


Link to post
Share on other sites
Guest Member 193110
Posted:
Last Online: A long, long time ago... 
 

Nice tutorial, xentrix. I launch asc2bmp.vbs, choose that *.asc file, type in *.bmp file name and get this error: http://www.ipix.lt/images/33250272.jpg

My OS is Windows XP Home Edition 32bit Service Pack 3

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Hi all!

    Sorry for replying late but I was busy working on some much better idea. 37.gif

     

    For now,

    @drunkapple: sorry, I don't understand very well this thing about voids. Are these the areas for which there is no data? I don't see any gaps (voids?) in the data I downloaded but I see that some familiar mountainous areas of Athens are a bit deformed... Is this what you are talking about?

    Also, my script does not perform any scaling. It just translates the elevation data to pixel colors... Anyway, I found out that Global Mapper does all this stuff much better. The application I am preparing is based on Global Mapper's output. Just be patient...

     

    @SirRaunaldi: I am still stuck with XP. If you can make corrections, please, be my guest. Otherwise, jump to Global Mapper.

     

    @algis242: Please tell me which subtile asc file (srtm_xx_xx_x_x.asc) did you use? 

     

    I'll be back soon2.gif

    Share this post


    Link to post
    Share on other sites
    Guest Member 193110
    Posted:
    Last Online: A long, long time ago... 
     

    Hey xentrix,

    I used srtm_42_02_1_5.asc file

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    algis 242, I'm sorry but it runs fine on my pc.

    I also have XP 32, SP3. Are you sure you copied the script correctly?

    Try to open it (right click and Edit) to see if it looks messed up.

     

    Otherwise, wait a little bit for my other solution or try Global Mapper with the attached custom shader file. It produces the same image if you follow the instructions (only for Global Mapper) here:

    https://www.simtropolis.com/forum/messageview.cfm?catid=120&threadid=81562&enterthread=y

    Global Mapper custom shader for SC4.zip

    Share this post


    Link to post
    Share on other sites
    Guest Member 193110
    Posted:
    Last Online: A long, long time ago... 
     

    Originally posted by: xentrix

    algis 242, I'm sorry but it runs fine on my pc.

    I also have XP 32, SP3. Are you sure you copied the script correctly?

    Try to open it (right click and Edit) to see if it looks messed up.

     

    Otherwise, wait a little bit for my other solution or try Global Mapper with the attached custom shader file. It produces the same image if you follow the instructions (only for Global Mapper) here:

    www.simtropolis.com/forum/categories.cfm

    quote>

    Don't have Global Mapper and can't find that tutorial. Oh well, I guess I will wait for your other solution.

    Share this post


    Link to post
    Share on other sites
    Guest Member 193110
    Posted:
    Last Online: A long, long time ago... 
     

    Thanks, xentrix. I will try out that method.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    When I try to resize that RGB image it only lets me save a JPG, and so I import it as an RGB and it shows up all spiky. What happened?

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Hi joshriddle.

    I think you make 2 mistakes:

    1. You use jpg

    2. You resize

     

    I would not recommend the use of jpg if you want data integrity.

    Jpg is a lossy algorithm. It always decreases image accuracy, to decrease the size of the file. I would say that the use of jpg for this task is unacceptable.

    Terraformer and Mapper can read bmp and png files, which are lossless.

     

    What tool do you use for resizing?

    If you need a tool to edit your picture (crop, resize, save in diiferent format etc), there are countless excellent freeware applications. I use FastStone (image viewer with lots of extra features, including simple editing tasks, replaces Windows Image Viewer) and I am very happy with it.

    Anyway, please read again step #5. I don't recommend resizing...

     

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    OK then. I am sure Gimp would let me do stuff to it such as cropping and let me save as the RGB. Cause yeah, resizing makes it distorted.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Thanks for the reply back, I just ended up using my laptop which runs XP Pro to convert since Vista is now VBScript and not Virtual Basic...  I really don't want to learn yet another language when I don't program anymore...  But I do have another question for you:

    What color hex code do you find works best for coastlines and such?  I am trying to do a conversion of my home town of Indian River County, FL and the colors I use either make the water too deep for beaches or too high for water.  I would just use your idea of manually making water in the god mode, but being a Florida coastline, this would take a lot of time I don't have.  Any suggestions?

    Thanks

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Hi again!

    Pabbivus, do you have Vista? According to SirRaunaldi's feedback, Vista does not run the script. 8.gif

    But you could wait for the application I'm working on. It is a real application (exe) and it makes the conversion.

    Just be a bit patient.

     

    SirRaunaldi, I had the same problem. This app I'm working on deals exactly with this problem. It creates a refined sea bottom, without touching the land. Take a look:

    The map as I got it from my script or Global Mapper (this is jpg only for demonstration, downgraded quality):

    mapqx.jpg

     

    Then, after processing it with my app, I get a smoothed sea bottom:

    mapsmoothed.jpg

     

    Look at the difference:

    difft.jpg

     

    Like it? Just wait for the application...

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Looks much nicer, but you do know that most shorelines have a beach that stretches out a bit.

    Does this app look at this data and interperet it or just make a generic sea shore?

    I am not trying to complain, this is a HUGE step in the right direction and hopefully will solve a lot of my issues when trying to map out the section of my hometown.  Florida can be a ***** because of the Indian River there and all the little islands and jetties that if they are not made perfect, you can not replicate anything remotely similar.

    Anxiously awaiting this and very glad that you have decided to tackle this issue.

    Thanks

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Needs... to... be... at... the.... Omnibus................

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    SirRaunaldi, the application is not very intelligent but it does take different slopes into consideration.

    It actually "extends"  the shoreline by calculating one by one the next tiles, based on the elevation of the previous.

    In this way, yes, steep shores are steeper than beaches.

     

    This method is called interpolation and it is considered to be the simplest, yet quite efficient.

     

    Working on the last details. I think it will be ready in the next 2 days.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Nice tutorial! With your permission I'll try to get it up on the Omnibus for you as soon as possible.


    This signature does not exist. Continue on.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    I have news:

    FantastiCoast is ready!!!!!!!! 39.gif17.gif44.gif

    You can read its presentation here. I have also updated this tutorial. If you used it, please read again from step 3 and on.

    You can consider the VBscript that was here obsolete.

     

    un1, thanks! It really is an honour to get an article on the Omnibus. But I have to prepare a full tutorial, including an important step I have omitted so far. It will not take me long. I will get back to you.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Xentrix hi ! I need some help, the download link for the SRTM KML file is dead. please help 15.gif

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    No, it's not dead. What do you click???

     

    image1uy.jpg

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Just says that the region is not valid, even though I followed the instruction. What to do? 

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Hi ankhor1,

    could you post the dimensions of your region and of the config file?

    If you are sure that they are correct, could you also post the region file itself?

    PS: Sorry for the late response, I don't have an internet connection these days, due to moving to a new house.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    srtm41.kmz is nor working at google earth 4 :S (it is saying at faq questions :S )

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Ok i get the map from where you give the link by search.

    However this time i am getting memory failure :S

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account

    Sign In to follow this  

    • Recently Browsing   0 members

      No registered users viewing this page.

    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections