14-09-2009, 07:21 AM
Quote:bina wrote:
That's what I just found checking the G***** servers
http://khm0.******.com/kh/v=36&hl=en&x=41859&s=&y=24718&z=16&s=Galileo
As posted above by HB-100, the version no. for Service 1 is indeed "36" but I guess something has changed in other parts of URL
string. Maybe I check in the wrong place but I used Fiddler which retrieves the above string from the server. It seems there is no more
option for "qrts" (ServiceCodeing) sort of thing which was replacing "%s" in the URL string for Service 1.
Anyone to comment?
Very strange but it seems that this specific service reactivated the quadrant codeing access method lately which means you could access the old way by just
adapting the version number. But it will not help you so much because they changed the captcha thing. It seems that they removed the possibility to enter a
displayed code to continue and just present you a sorry and a blocking. Also this sorry and blocking is now presented under the same URL where the tile is
expected which is causing FSET's www going crazy and reloading that page over and over. (the going crazy can only be fixed in FSET's main code)
Since there are question about the XYZ codeing in relation with other services also I will try to give a shor explanation.
You will need to read in the UserDocu.rtf to maybe understand it better.
Image a 4*4 matrix of little pictures that all have the same size 256x256 pixel (=1 tile)
X X X X
X X X X
X X X X
each X is one of this little picture (tile)
So how can you refer to one specific picture in that matrix nowt?
Simple by adding 2 numbers/indizes x and y which tells you the location in the matrix
The first picture top left would be at X=0, Y=0
The second picture right of the first at X=1, Y=0
Thr picture below the first picture is on a new row which we count with Y so it will have the address X=0, Y=1
with (X,Y) =>
the matrix looks that way:
(0,0) (1,0) (2,0) (3,0)
(0,1) (1,1) (2,1) (3,1)
(0,2) (1,2) (2,2) (3,2)
(0,3) (1,3) (2,3) (3,3)
so far it's simple.
Now the zoom level comes into play.
On the very Top LVL (Zoom 18 in FSET) the whole world is covered with just one tile. That means the matrix dimension is 1x1 and X,Y can only be 0,0.
Zoom 18:
(0,0)
For the next zoom level the tile count doubles in each dimension that means we have 4 tiles for the whole world
Zoom 17:
(0,0) (1,0)
(0,1) (1,1)
and doubleing again the world is now covered with 16 tiles:
Zoom 16:
(0,0) (1,0) (2,0) (3,0)
(0,1) (1,1) (2,1) (3,1)
(0,2) (1,2) (2,2) (3,2)
(0,3) (1,3) (2,3) (3,3)
That Zoom lvl is now the third coordinate or the thrid number we need for the full address of a tile.
(X,Y,Z)
foreaxmple I could now access the Tile (3,2) on zoom 16 with: (3,2,16) or in words X=3, Y=2, Z=16
This is the system as FSET uses it internal although the names is not X,Y,Z but iAreaCodeX, iAreaCodeY, iAreaCodeLevel which are the parameters that you get
in the TileCodeingScript.cs (open it with a simple texteditor like notepad)
Now the services comes into play. Each service has an own codeing system for the tiles.
So the XYZ of one services does not fit the to another one.
when you write
ServiceCodeing = xyz
in FSEarthTiles.ini file then FSET calculates the x,y,z fitting to one know service at that time.
The codeing is: (check the TileCodeingScript.cs File)
Int64 vServiceZ = iAreaCodeLevel;
Int64 vServiceX = iAreaCodeX;
Int64 vServiceY;
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)
You see X and Z is the same as FSET handles it and Y is different (has positive and negative numbers)
This Y is of course a little strange and special but this is the choose of the service.
Now the most simple and logical way of X,Y,Z addressing would be:
Int64 vServiceZ = EarthMath.cLevel0CodeDeep - iAreaCodeLevel;
Int64 vServiceX = iAreaCodeX;
Int64 vServiceY = iAreaCodeY;
vResultCode = "&x=" + vServiceX.ToString() + "&y=" + vServiceY.ToString() + "&z=" + vServiceZ.ToString()
(note that EarthMath.cLevel0CodeDeep is a constant and has teh value 18.)
which marks the Top Level (whole word covered with 1 tile) with z=0 instead z=18 and counting upward (next lvl z=1, next z=2 ...)
The z=18 for the top level was a complete free choose when I programmed FSET. I choosed that to work with zoomlevels close to zero and not close to 18.
(note it had been a bit better and less confusing with high resolution when I didn't change the sign also and counted upward instead downward)
Funny I discovered later that one service used the same (bad) z like you can see further above: ( Int64 vServiceZ = iAreaCodeLevel)
Well and what's with this famous specific service1 now? Well they choosed the simple and logic way of XYZ addressing.
So if you want to access that way you have to do the codeing in the TileCodeingScript.cs and activate the CSharp ScriptHandling in the FSEarthTiles.ini file:
UseCSharpScripts = Yes
and make a service entry in the FSEarthTiles.ini file
[Service6]
ServiceCodeing = xyinvz #for the case we coded: else if (EarthCommon.StringCompare(iUseCode, "xyinvz")) in TileCodeingScript.cs
ServiceUrl = ...
check some pages back in this thread to see how such a TileCodeingScript.cs adaption was done for another service.