The Wayback Machine - https://web.archive.org/web/20200616133952/https://github.com/retroplasma/earth-reverse-engineering
Skip to content
Reversing Google's 3D satellite mode
C C++ JavaScript Shell
Branch: master
Clone or download

Latest commit

Latest commit 5f0add3 Apr 16, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
client Update README.md Apr 16, 2020
exporter Update exporter/README.md Apr 11, 2020
proto Move exporter to folder and clean up Apr 10, 2020
.gitignore Merge branch 'client' Oct 6, 2019
.gitmodules use official eigen mirror Oct 13, 2019
README.md Move exporter to folder and clean up Apr 10, 2020
header.png New header image for README.md Jan 22, 2019

README.md

header

This is an attempt to reverse-engineer undocumented parts of Google Earth. The goal is to document the results and to provide code that emerges. Similar work is being done for Apple Maps here.

Status

The focus has been on the 3D satellite mode, which required digging into:

  • URL structures
  • octrees and conversion from geo coordinates
  • Protobuf formats of assets and metadata
  • postprocessing steps (e.g. unpacking of meshes and textures)

Code was written and tested with various regions and cities:

Info

URL structure:

"https://kh.google.com/rt/🅐/🅑"
 - 🅐: planet
       - "earth"
       - "mars"
       - ...
 - 🅑: resource
       - "PlanetoidMetadata"
       - "BulkMetadata/pb=!1m2!1s❶!2u❷"
          - ❶: octant path
          - ❷: epoch
       - "NodeData/pb=!1m2!1s❸!2u❹!2e❺(!3u❻)!4b0"
          - ❸: octant path
          - ❹: epoch
          - ❺: texture format
          - ❻: imagery epoch (sometimes)

Misc:

General info:
 - Everything is stored in an octree.

Roles of resources:
 - PlanetoidMetadata points to first BulkMetaData.
 - BulkMetaData points to other BulkMetaData and to NodeData.
 - NodeData contains actual meshes and textures.

Versioning:
 - BulkMetaData and NodeData are versioned using epoch numbers.
 - PlanetoidMetadata provides epoch of first BulkMetaData.
 - BulkMetaData provides epochs of underlying resources.
 - Current version of a resource can be determined recursively.

NodeData:
 - Mesh: packed XYZ, UV, octant mask, normals
 - Texture: JPG, CRN-DXT1
 - Raw format: see rocktree.proto and rocktree_decoder.h
 - Other optimizations: BVH
BulkMetaData:
 - Oriented Bounding Box
    - Dump OBB to obj: https://gist.github.com/retroplasma/5698808bfaa63ffd03f751a84fa6ce14
    - Latlong to octant using OBB (unstable): https://github.com/retroplasma/earth-reverse-engineering/blob/443a3622ce9cb12cd4460cc6dc7999cc703ae67f/experimental_latlong_to_octant.js

Related ideas: Racing game , Minimal client. WebGL + CORS should work (test).

Important

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

You can’t perform that action at this time.