# How to Align Scans

## Option 1: Manual Alignment of Map with Satellite Image in Unity

### 🎯 Objective

Manually align a 3D map mesh with a satellite image to accurately extract the following values:

* Latitude
* Longitude
* Altitude
* Heading (relative to True North)

This is useful for georeferencing Scans in Unity using the MultiSet SDK.

***

### 🧰 Requirements

* Unity Editor
* MultiSet SDK set up in the project
* Google Maps (or similar mapping tool)
* [dCode Earth Elevation Tool](https://www.dcode.fr/earth-elevation)
* Image editor (e.g., Photoshop or online tools)<br>

#### 🗺️ Step 1: Identify the Scan Location

1. Open Google Maps or any detailed mapping service.
2. Look up your scan location.\
   Example: Long Beach Convention Center, Long Beach, CA.
3. Ensure you’re using Map View, not Globe View.\
   Globe View may distort tall buildings and can interfere with alignment accuracy.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfAUzytG-mbtkkkzL4hxDs21RO0i2AHHdAtczlsJDyQgsTdcTboesvlSvWF7WdEPvjQ7cn6Tog_iMC_wx1fqEXiDHto2LAXoY4l81oqJUG1PtSqXMPBcMi3tXEK7up-2BXYfXyU?key=VctBZVXGu7siN4cgssk2ig" alt=""><figcaption></figcaption></figure>

***

#### 🖼️ Step 2: Capture a Satellite Image

1. Capture a square (1:1 aspect ratio) satellite image of the area.\
   Example: 1120 x 1120 pixels
2. Ensure the map is oriented toward True North (no rotation).
3. Include the map’s origin point in the image.<br>

📌 This image will be used later to align the mesh in Unity.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeDLE59aBPoHfI8NoJ2mjIzIzJad-XvGBkY9LNxD9F265GOWx07237U9kWd63lxACREVzRcV6J4mkbD_ziCFkbiGwazU4tdPG-vyx-K8AjKFYASySozSBrJLo7GkR7XmQXVx_7mhQ?key=VctBZVXGu7siN4cgssk2ig" alt="" width="375"><figcaption></figcaption></figure>

***

#### 🔐 Step 3: Set Up the SDK in Unity

1. Open your Unity project containing the MultiSet SDK.
2. Update your SDK credentials.
3. Locate the MultisetSdkManager GameObject.
4. Set Map Localization Type to Map.
5. Enter your Map Code, which can be found at:\
   🔗[ https://developer.multiset.ai/maps\ <br>](https://developer.multiset.ai/maps)

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfa9XXbeqFmKV0r3MQEXec8QBHcGp0-fRbX-pTW89HiURZhLobdrVI3P3zPspvIHG5rT70oegoYwx0Po1joZwFz1G1BpLeC8JsRMwXKhZ4qZO6ErhB0RqRSE5nyyu9XNmB4Xo0o9Q?key=VctBZVXGu7siN4cgssk2ig" alt=""><figcaption></figcaption></figure>

***

#### 🧱 Step 4: Download and View the Mesh

1. Select the MapMeshDownloader GameObject in Unity.
2. In the Inspector Panel, click Download Mesh.
3. The map mesh will appear in the Unity Scene view.

\
Texture Mesh added in the scene

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdr0Q0hC5xJhZP3z0QvWcjgiMXvZkyl7sYkXY92wNQRtJIv-rPDGk0Qe-M0lUPUVW1Oj6TvHdskzU8lE2XH_CC5dZFCre_rcjc5Ix5Ml_QfwGwUkDKCeGD2s-Tvi_fTv2zdIy3YtA?key=VctBZVXGu7siN4cgssk2ig" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcznfERCWqpibJyxT4Y9Lt--KEBi1WU1Qo4lpnXjOwlY6pdcfgDIyU_N1ALI7MQRM1uPSp9MOgSVyAnd6-DtMKwXD1Gvwd4W_S5Y7dTR5LSMQ4a5Gq08yyA9RkZFo2DMnYq7SqRNw?key=VctBZVXGu7siN4cgssk2ig" alt=""><figcaption></figcaption></figure>

***

#### 🖼️ Step 5: Import and Prepare the Satellite Image

1. Import the satellite image you saved earlier into Unity’s **Assets** folder.
2. Create a **Plane** GameObject in the scene.
3. Apply the satellite image as a texture to this **Plane**.
4. Create an empty **GameObject** (this will act as the parent container).
5. Drag the **Plane** into the empty GameObject to make it a child.
6. On the child **Plane**, set its **Y-axis rotation to 180°** to correct the texture orientation.
7. To match the satellite image with your mesh, adjust only the **parent GameObject’s** scale and position — do not scale the child Plane directly.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdrDbGdlqjF8wY_PUiKxQBG02_I4TdNfymUZZaWWVxe_46dh1oJWMRV-H7T2EGBeVAKuI8FvkolNsC66rjGaJ1DjB_SbNHpN1ZNqia0xj1lY01BfS1VIT1qKS36l68NZe7PSAktqQ?key=VctBZVXGu7siN4cgssk2ig" alt=""><figcaption></figcaption></figure>

***

#### 🎯 Step 6: Align the Plane Parent with the Mesh

1. Confirm that the Map Space’s origin in Unity is at (0, 0, 0).
2. Uniformly scale and rotate the plane parent until the mesh aligns correctly over the satellite image.<br>

✅ Expected Heading: calculate the Y rotation value of your plane parent gameobject (i.e : 355.5°)

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXd-Rg4pEzFVgJp_3WODLPZRXfqx4p8Hv_1QTqNvfSPqNowop3bKkGzzeozWVRQlC46q14g4sbIOhDsOG0LlZrmDHcVXRoa0eTpxovex73NNTC7b7qyhT5UBimqfyiZPnlrDtCyi?key=VctBZVXGu7siN4cgssk2ig" alt=""><figcaption></figcaption></figure>

***

#### 🧭 Step 7: Switch to Orthographic Top View

1. In the Scene View, switch to Orthographic mode.
2. Click the cube icon in the upper right and align the green cone for top-down view.<br>

🖼️ Your view should now resemble the satellite image overlaid by the mesh.

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeJH9kCjXbk_qa_MNKonrX8VkPWsDKIrZgpuOSglpGeJ1iZ_fmdJkWZTL0X37E1FdXRzVnDzFJbqG-1HwiQW-jZ2NAGe3NS_42v7tjTMZbLSWCMSLu3EJ-qvCB1wPYZKnZ-7aAjAA?key=VctBZVXGu7siN4cgssk2ig)

From perspective to orthographic (Top View)

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcFHPpUma0Vs4mV5DmLa6g8atT5b3FXZYHuCLY63XMSG1k04tUHWdwX3qq17_ST_o_dMJeTnfTt57jjh1dDBEhDIoUH7mO8S1K_rbt_TmvgJ1psosokqIz1KWzZExE02X0POhnb?key=VctBZVXGu7siN4cgssk2ig)

***

#### 📍 Step 8: Identify Map Origin for GPS Coordinates

1. Under the MapSpace GameObject, find the Gizmo/Origin object.
2. Temporarily hide the mesh to see the origin clearly.
3. Ensure the gizmo is placed over the correct spot on the satellite image.

\ <br>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfmhmQjj0MIMDqJZIj__DANQDUkc-RELMHC_SSqc_XtfqBwlHOuv_OBS_nXiwKj8WP1rDWz1Rg5IpoCeXg1XisJ3byi3RWF96a6xSFKh1PXEEmrFhtkKYuDjvQrd-YMS4OQlY7W?key=VctBZVXGu7siN4cgssk2ig" alt=""><figcaption></figcaption></figure>

***

#### 🌐 Step 9: Retrieve Latitude & Longitude

1. In Google Maps, right-click on the map origin location.\
   Copy the Latitude and Longitude from the context menu.\ <br>

✅ Example Output:

* Latitude: 12.840064903279117
* Longitude: 77.6428387867768\ <br>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXe-UKyHI5I3HscSy60KVrYRsrz6v-GB4G4japdrWD3m9Y4luWbxvwNY3Ds_RIFaGxQ3uiBbJjUVB49OFKhUKyUnAcheeaFc2nN3YTr7cOJy12rHFo8snv7jWuRxCsBRo4PKHjd6lQ?key=VctBZVXGu7siN4cgssk2ig" alt=""><figcaption></figcaption></figure>

***

#### 🏔️ Step 10: Get Altitude

1. Visit:[ https://www.dcode.fr/earth-elevation](https://www.dcode.fr/earth-elevation)
2. Enter the captured latitude and longitude.
3. Retrieve the altitude value.\ <br>

✅ Example Output:

* Altitude: 933 (meters)<br>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeOZfOsrPbaq9igwrGYJ5rAVb-0Sf9oQAnQsc0ysjza5Hyr8JoPEW5Oujl2EwqbBKUbd5hUFRQwhjTuJl4fe7fss3S_ocd81IeKzrHbIdeXToSgC1CyTXYFo-nSD1r4LRikMj5N?key=VctBZVXGu7siN4cgssk2ig" alt=""><figcaption></figcaption></figure>

***

Finally we have all these four values :

1. Latitude : 12.840064903279117
2. Longitude : 77.6428387867768
3. Altitude : 933
4. Heading : 355.5

## Update Map Geocoordinates in Developer Portal

Go to MultiSet Developer Portal -> Maps -> Select the map that you georeferenced and click setting button (3 dots) to update the Geo Coordinates.

{% hint style="danger" %}
To get accurate conversions at the centimeter level, make sure to enter at least 6 decimal places for latitude and longitude.
{% endhint %}

<div><figure><img src="https://3163433004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FokTDI7QVY04Zvb1pQ8Ry%2Fuploads%2FOnxnFtEL18VvTO8lOIHl%2FScreenshot%202025-07-10%20at%206.47.24%E2%80%AFPM.png?alt=media&#x26;token=57664225-e92c-45e8-9548-c4845f2ef584" alt="" width="265"><figcaption></figcaption></figure> <figure><img src="https://3163433004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FokTDI7QVY04Zvb1pQ8Ry%2Fuploads%2F4iSa4Ogo1zVJYMuiKbY6%2FScreenshot%202025-07-10%20at%206.47.46%E2%80%AFPM.png?alt=media&#x26;token=5a0b6cc9-7f82-41e0-8440-a029355e7151" alt="" width="563"><figcaption></figcaption></figure></div>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.multiset.ai/basics/georeferencing-maps/how-to-align-scans.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
