Начну потихоньку выкладывать материалы
Вот часть README из программы GAIA по библиотеке libgefetch
Структура программы
#include <gefetch.h>
/* init library */
gefetch_t handle = gefetch_init();
/* fetch image */
gefetch_fetch_image(handle, X, Y, LEVEL);
/* get data */
size_t jpeg_size = gefetch_get_data_size(handle);
void *jpeg_ptr = gefetch_get_data_ptr(handle);
/* ...work with data... */
/* cleanup */
gefetch_cleanup(handle);
/* jpeg_ptr may NOT be used after cleanup */
<....> пропускаю там содержится инфа аналогичная
http://google-earth.narod.ru/htm/grid2d.htmИнфа по запросам на сервер
Notes on network protocol
~~~~~~~~~~~~~~~~~~~~~~~~~
Google Earth uses plain HTTP, but with it's own auth and simple
encryption.
Most common URLs include:
/geauth - handles authentication
/dbRoot.v5 - file containing key to decrypt all data + some XML
/flatfile?f1-XXX-i.YYY - crypted JPEG image (available only after
auth). XXX is (x, y, level) of an image in google's format, and YYY
is node containing image
/flatfile?q2-XXX - crypted and zlib-compressed metadata (available
only after auth). XXX is (x, y, level) of chunk in google's format.
This contain such info as availability of image and topography data,
as well as node numbers to get data from
/flatfile?f1c-XXX-t.YYY - presumably crypted and zlib-compressed
topography data in unknown format (available only after auth). XXX
is (x, y, level) in google's format, and YYY is node containing
data.
/flatfile?f1c-XXX-d.YYY.ZZZ - unknown (maybe vector data)
To access data, one need to:
1) Authenticate. Process includes two POST requests to /geauth. What
data is transferred is currently unknown (data copy-pasted from
tcpdump of real Google Earth connection just works). Second POST
request contains session id - 80 byte string (see gefetch_auth.c).
Using this string as a cookie (see gefetch_http.c) gives us access
to /flatfile urls.
2) Get /dbRoot.v5, which contains decryption key. This file is
available even without authentication. For decryption algorithm,
see gefetch_crypt.c.
After these two steps, one will have access to /flatfile urls, and
will be able to decrypt retrieved data.
JPEG's are available right after decryption. Other data is also
compressed with zlib and prepended with 8 byte header.
Example application
~~~~~~~~~~~~~~~~~~~
When building gaia, add this options to scons:
cd gaia && scons libgefetch_examples=1
this will compile sample libgefetch programs under examples/.
По поводу файла kh.google.com\ dbRoot.v5
Говорят, что там находится запакованый файл hl=ru-RU&gl=by или hl=ru-RU&gl=ru (смотря какие у вас региональные настройки)
В нем можно узнать версию кеша