• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSEarthTiles INI Problem

Messages
481
Hi,

Maybe you can help me, I just posted this on the sbuilder forum:

Hello Friends,

Sorry that this isnt exactly sbuilderx related, but it's somewhat related to googleserver and images download, but related to another programa called FS Earth Tiles (FSET) and the project seems to be without support so I'm recalling to the wizards here for help... here's the deal:

FSET has an "ini" file that you configure, pretty much like Tileproxy. The thing is, I cannot get google to work, only Yahoo and Virtual Earth, but the area I'm working on only has google image available at decent resolution.

Here are the current line set there. Service 1 and 2 are working (VE and Yahoo respectively) but service 3 (google) doesn't. Notice I've commented out the user agent and refer to see if it helps, but no cookie:

[Service1]
ServiceCodeing = 0123
ServiceUrl = http://a1.ortho.tiles.virtualearth.net/tiles/a%s.jpeg?g=104 #you need to replace the * with a service base url
#Referer = http://server0.acmeglobe.com/terraintil ... ACBCA&v=10 #optional,
#UserAgent = Mozilla/4.0 #optional
ServerVariations = a0,a1,a2,a3 #Server variations that all have to contain the same Tiles

[Service2]
ServiceCodeing = xyz
ServiceUrl = http://us.maps3.yimg.com/aerial.maps.yimg.com/img?%s&v=1.7&t=a # You need to replace both groups of ****.***
#Referer = http://us.maps3.yimg.com"target="_blank"target="_blank
#UserAgent = Mozilla/4.0

[Service3]
ServiceCodeing = qrts
ServiceUrl = http://kh1.google.com/kh?t=t%s&n=404&v=17 #you need to replace the * with a service base url
Referer = http://kh1.google.com #optional,you can try with and without this to establish a connection
UserAgent = Mozilla/4.0 #optional, alternatives: MSIE 7.0; Windows NT 6.0;

I've tried to look at the VB code for the sbuilderx tile server dll to see if I come with a working pattern, but I just couldn't. If anybody can help my it'll be much appreciated.

Thanks a bunch in advance.
 
I moved this this post to a new thread, and a new sub-forum.

You might try this for now:

Code:
[Service3]
ServiceCodeing = qrts
ServiceUrl       = http://khm0.google.com/kh?t=t%s&n=404&v=63
#Referer = http://khm0.google.com
#UserAgent = Mozilla/4.0
ServerVariations = khm0,khm1,khm2,khm3

...and you'll need to click the odd blue button in the lower right for it to work. I'm not sure what that button is for, perhaps some with more knowledge of the program can help. FSEarthTiles doesn't seem to have a big following on english language sites, but is followed on french and italian sites.

fsearthtilesgoogle.png


The documentation says we can make a new TileCodeingScript.cs, and that would be the best solution... but it would need to be done with care, and after carefully reading and re-reading the documentation. :)



Dick
 
I moved this this post to a new thread, and a new sub-forum.

You might try this for now:

Code:
[Service3]
ServiceCodeing = qrts
ServiceUrl       = http://khm0.google.com/kh?t=t%s&n=404&v=63
#Referer = http://khm0.google.com
#UserAgent = Mozilla/4.0
ServerVariations = khm0,khm1,khm2,khm3

...and you'll need to click the odd blue button in the lower right for it to work. I'm not sure what that button is for, perhaps some with more knowledge of the program can help. FSEarthTiles doesn't seem to have a big following on english language sites, but is followed on french and italian sites.

fsearthtilesgoogle.png


The documentation says we can make a new TileCodeingScript.cs, and that would be the best solution... but it would need to be done with care, and after carefully reading and re-reading the documentation. :)



Dick

Hi,

Will try a little later, if it works or not, doesn't matter a bit thank you either way.

Kindly,

Blazer
 
I think it's a wonderful little program, I don't know why only the French and Italians seem to know this. Unfortunately, although your blue button method does work for a one off shot, it fails to map the tiles automatically.
I have set the default settings for the area I am currently interested in (with virtualearth) and I just try it every few days to see if the clouds have gone:(
 
Looking into this I found some more info.

Here's my services in FSEarthTiles.ini:

Code:
[Service1]
ServiceCodeing = xyinvz
ServiceUrl       = http://khm1.google.com/kh?v=64%s
#Referer = http://khm0.google.com
#UserAgent = Mozilla/4.0
ServerVariations = khm0,khm1,khm2,khm3


[Service2]
ServiceCodeing   = 0123
ServiceUrl	=	http://ecn.t1.tiles.virtualearth.net/tiles/a%s.jpeg?g=488&mkt=en-us&n=z
#Referer         = http://a1.ortho.tiles.virtualearth.net                        #optional (older versions g=104, g=52)
#UserAgent       = Mozilla/4.0                                                   #optional
ServerVariations = ecn.t0,ecn.t1,ecn.t2,ecn.t3


[Service3]
ServiceCodeing = xyz
ServiceUrl     = http://maps3.yimg.com/ae/ximg?v=1.9&t=a&s=256&.intl=en&%s
#Referer       = http://us.maps3.yimg.com/                                               # (old versions v=1.7, v=1.5)
#UserAgent     = Mozilla/4.0

Also in FSEarthTiles.ini, you need to enable CSharpScripts:

Code:
#--- Yes/No Switches --
UseCSharpScripts            = Yes

Then TileCodeingScript.cs must be altered to allow the newer Google coding:
Code:
using System;
using System.Collections.Generic;
using System.Text;
using FSEarthTilesInternalDLL;

namespace FSEarthTilesDLL
{
    public class TileCodeingScript
    {
        //The following Methodes will be called by FSEarthTiles:
        //MapAreaCoordToTileCode(Int64 iAreaCodeX, Int64 iAreaCodeY, Int64 iAreaCodeLevel, String iUseCode)

        public String MapAreaCoordToTileCode(Int64 iAreaCodeX, Int64 iAreaCodeY, Int64 iAreaCodeLevel, String iUseCode)
        {

            String vResultCode = "";

            if (EarthCommon.StringCompare(iUseCode, "xyz"))      // example Service 3 thank's to Steffen I.
            {
                // Some Services uses same Lvl system as FSEarthTiles(funny coincidence) Service Lvl z=1 is 1 m/pixel

                Int64 vServiceZ = iAreaCodeLevel;
                Int64 vServiceX = iAreaCodeX;
                Int64 vServiceY;

                if (iAreaCodeLevel < EarthMath.cLevel0CodeDeep)
                {
                    Int32 vYConvertPower = (Int32)(EarthMath.cLevel0CodeDeep - iAreaCodeLevel - 1); //-1 because Service uses positive and negative numbers for Y
                    vServiceY = (1 << vYConvertPower) - 1 - iAreaCodeY;  // 1<<vYConvertPower (is equal to 2^vYConvertPower)
                }
                else
                {
                    //lvl 18, whole world is not covered correct, you can only get the upper (y=0)or lower (y=-1) world half instead the whole.
                    //so make that tile unavailable
                    vServiceX = 0;
                    vServiceY = 0;
                    vServiceZ = 100;
                }

                vResultCode = "x=" + vServiceX + "&y=" + vServiceY + "&z=" + vServiceZ;
            }


            else if (EarthCommon.StringCompare(iUseCode, "xyinvz"))
            {
                Int64 vServiceZ = EarthMath.cLevel0CodeDeep - iAreaCodeLevel;
                Int64 vServiceX = iAreaCodeX;
                Int64 vServiceY = iAreaCodeY;
                vResultCode = "&x=" + vServiceX.ToString() + "&y=" + vServiceY.ToString() + "&z=" + vServiceZ.ToString();
            }

               
            else   // Quad mode,  examples Services 1 and 2
            {
                Int64 vSteps = EarthMath.cLevel0CodeDeep - iAreaCodeLevel;

                Int64 vXStart = 0;
                Int64 vXStop = EarthMath.GetAreaCodeSize(iAreaCodeLevel) - 1;

                Int64 vYStart = 0;
                Int64 vYStop = EarthMath.GetAreaCodeSize(iAreaCodeLevel) - 1;

                Int64 vXHalf;
                Int64 vYHalf;

                Char vC0;
                Char vC1;
                Char vC2;
                Char vC3;

                vC0 = iUseCode[0];
                vC1 = iUseCode[1];
                vC2 = iUseCode[2];
                vC3 = iUseCode[3];


                for (Int64 vCon = 1; vCon <= vSteps; vCon++)
                {
                    vXHalf = (vXStart + vXStop + 1) >> 1;
                    vYHalf = (vYStart + vYStop + 1) >> 1;

                    if (iAreaCodeY < vYHalf)
                    {
                        if (iAreaCodeX < vXHalf)
                        {
                            vResultCode += vC0;
                            vYStop = vYHalf;
                            vXStop = vXHalf;
                        }
                        else
                        {
                            vResultCode += vC1;
                            vYStop = vYHalf;
                            vXStart = vXHalf;
                        }
                    }
                    else
                    {
                        if (iAreaCodeX < vXHalf)
                        {
                            vResultCode += vC2;
                            vYStart = vYHalf;
                            vXStop = vXHalf;
                        }
                        else
                        {
                            vResultCode += vC3;
                            vYStart = vYHalf;
                            vXStart = vXHalf;
                        }
                    }
                }
            }

            return vResultCode;
        }

    }
}

But I still need to use the odd blue button. HB=100, the author of the program also confirms the need to use the blue "www" button.



http://www.fspassengers.com/forum/read.php?f=9&i=6835&t=6835&page=4

Dick
 
Last edited:
Excellent work Dick.
Now I have to figure out the easiest way of lining up the map to the airport (off 50' south and 50' east.
Obviously the way to go in the future is map first - then do the airport.
(Or maybe in a future ADE release a 'move airport' function ala FSXPlanner:D)
 
Google Maps IP ban following tile download

Hi all.

Just a follow-up. I recompiled the FSEarthTiles from source code as a Visual Studio Express 2008 project. After some tinkering with the debug settings, it compiled fine.

I tested the program using a large area of about 100x100 nm. It took several hours to gather the tiles, and I had to use the blue WWW button to keep a small browser window open. There were 4 instances of getting a Captcha stoppage, but entering the right code allowed the program's downloading to continue.

After using the program, my IP was blocked by Google, preventing me from using SBuilderX or Google maps from my computer. After some frustrating attempts to force an IP change, using a proxy IP... I discovered I only need to use the address of a tile in a browser, which forces a new Captcha... answering correctly unlocks the blockage.

Here's a tile address:

Code:
http://khm0.google.com/kh/v=64&x=8320&s=&y=12085&z=15

Entering that address in a browser will either give you a tile, or it will give you a Captcha asking if you are a machine. Upon successfully answering the Captch, your IP is unblocked.

Dick
 
Last edited:
What's up with the slow as download? I calculated it would take 2 days to download all the images I wanted, normally it's click click click (the sound of images downloading....fast :) )
 
Hi Dick,

Using your ini and C# script with VE, it fails when there are no tiles available (usually over the sea).

Using the standard service with no script, it just ignores the missing tiles and completes.

I feel that your ini works better in general but not where there are missing tiles. Do you have any ideas?

George
 
My solution was just a hack, and I didn't study it much. If the standard service is working, I'd just use that. :)

Dick
 
Hi,

Do you have updated links for google in fsearthtiles?

Your tip worked fine until today when I tested and I get 404 page not found messages. I`ve tried searching the fsearthtiles post but that is dead since 2008.

Kindly,

Blazer
 
In the ini file:

Code:
ServiceUrl       = [url]http://khm1.google.com/kh?v=64%s[/url]

might need to be:

Code:
ServiceUrl       = [url]http://khm1.google.com/kh?v=89%s[/url]

...as 89 is the current version used by Google.

To free a computer locked out by a Captcha:

Code:
http://khm0.google.com/kh/v=89&x=8320&s=&y=12085&z=15

Should work.

Dick
 
...and you'll need to click the odd blue button in the lower right for it to work. I'm not sure what that button is for, perhaps some with more knowledge of the program can help.

On XP, that odd blue button does display WWW, on Vista or W7, it displays three blocks.

 
In the ini file:

Code:
ServiceUrl       = [url]http://khm1.google.com/kh?v=64%s[/url]

might need to be:

Code:
ServiceUrl       = [url]http://khm1.google.com/kh?v=89%s[/url]

...as 89 is the current version used by Google.

To free a computer locked out by a Captcha:

Code:
http://khm0.google.com/kh/v=89&x=8320&s=&y=12085&z=15

Should work.

Dick

Thanks friend. Worked like a charm.
 
i found that the blue button helps with maintaining session through a cookie
this opens a browser window and submit user agent information to the service
some service will not allow communication without identifying your browser agent
 
Last edited:
Back
Top