MobileScan uses Open Street Map to display the location of the materials on a map. MobileScan also provides the users to overlay geo-referenced images/geo tiff images on top of Open Street Map. Geo-referenced images can be captured using Unmanned Air Vehicles (UAV) or drones. These images provide you the real time view of materials on the ground in a warehouse.
This section describes the prerequisites and the procedures that you must follow in order to overlay images on the Open Street Map available on MobileScan.
-
TileMill, Python, and MBUtil are third party, free-to-use softwares. Exercise care when downloading the softwares.
-
TileMill software works with European Petroleum Survey Group (EPSG) codes.
Prerequisites for overlaying images as maps
-
Geo-referenced image/Geo Tiff with .tif extension.
-
Install TileMill software to convert a geo-referenced image into tiles - TileMill (https://tilemill-project.github.io/tilemill/docs/win-install/)
-
Download and install Python for Windows x86-64 executable installer - (https://www.python.org/downloads/windows/)
-
Plugin - MBUTILS to extract/convert .mbtiles file to .png (https://github.com/mapbox/mbutil)
How do I overlay images on Open Street map?
Overlaying a geo referenced image on to a map involves the following steps:
-
Convert a geo referenced image to .MBTILES file.
-
Extract .MBTiles to .png.
-
Display the image tiles on MobileScan.
Convert a geo referenced image to .MBTiles
-
Start a new project in TileMill application.
-
Click on New Project, type a file name, and then click Add.
-
Select the file name from the list and then click on Layers .
-
Click Add Layers.
-
Select the .tif file in Datasource.
The selected file must be a geo referencing image file.
-
Select Custom from the SRS list.
-
Type the SRS information that you received from the external vendor.
To get the SRS value for a location:
-
Go to Spatial Reference website and search the EPSG code.
-
Click the EPSG link.
-
Click the Proj4js format link.
-
Select the Proj4js.defs["<EPSG Code>"] value and paste it in the SRS Custom field.
-
-
Click Save & Style.
-
Click Project Settings .
-
Adjust the bounds and then click Save.
-
Delete other layers from the Layers list and the related code from the style.mss file.
-
Save the file.
-
Click Export and then select MBTiles.
-
Click Export and then select View exports.
-
Navigate to the following folder to view the exported file:
<TileMills folder>\MapBox\Export\<filename.mbtiles>
Extract .MBTiles to .png
-
Start a command prompt.
-
Use cd command to navigate to the folder where Python is installed.
-
Execute the following command:
<Python folder> > python.exe <mbutil folder path>\mb-util <.mbtiles file location> <output file name with path>
-
The geo referenced image is converted into tiles and stored in the output folder mentioned in Step 3.
-
Ensure that the output folder does not exist before executing the command.
-
Display image tiles on the MobileScan map
-
Copy the tiles folder structure of the output file.
-
Navigate to <MobileScan folder>/Web/rest-api/Tiles and paste the output files folder.