3

I am building a webapp using Google Maps, and want to have an image overlaid on top of the usual Map that represents Light Pollution data.

I don't have ArcGIS myself, but I was able to download a 400 MB .tpk file with the image data I need from the website for the authors of the paper that released the dataset. It also includes a 3 GB GeoTiff file.

I've done a bit of research on how to use .tpk, The ArcMap docs show they are compatible in some manner.

This site has a similar question, but it is 8 years old. One of the linked sources in the answer no longer exists, and it would appear that the ArcGIS JS GoogleMaps API does not support the current versions of Google Maps API, so perhaps that is a non-starter.

But that might not really be relevant to the solution I am looking for. I don't know yet.

Given that I have a .tpk file, a geotiff file, and a working webapp using Google Maps created using the React JS Framework, how do I integrate the data into an overlay on Google Maps? This might mean converting it to another format, but as long as it works and maintains high resolution.

The end result would look something like this app (not mine), but with a much more recent dataset and the ability to find the value associated with any lat lng:

1
  • I clearly recommend to use a server for WMS, try mapserver or geoserver.
    – radouxju
    Commented Jul 28, 2020 at 6:35

1 Answer 1

4
+25

The question seems to be asked earlier here https://stackoverflow.com/questions/45167863/how-to-load-an-geotiff-image-over-google-map, https://stackoverflow.com/questions/19492967/georeference-tiff-image-into-the-google-map and https://stackoverflow.com/questions/44493354/overlaying-a-rasterfile-tiff-into-google-map here. Google docs reveal that you can overlay images like this: https://developers.google.com/maps/documentation/javascript/examples/maptype-image-overlay

400 MB tpk in browser is a bit heavy solution for browser. You need a server to serve you clips of data as needed to reduce the load on browser. So your options are:

1 . If you have ArcGIS or GeoServer Running -- TPK and GeoTIFF-- Simply open your tiff or tpk in ArcMap, publish it on your server and add it in your application as overlay. Working code can be found here. Overlaying ArcGIS REST API on Google Maps?

2. Use Google Earth or QGIS -- TPK and GeoTIFF-- Open your image in Google Earth export it as KMZ, XYZ tiles in QGIS and consume it in your application. A good discussion is posted here. https://forum.dronedeploy.com/t/combining-geotiff-w-google-map/14015

3. If you know some JavaScript and want to get your hands dirty -- TPK only-- ArcGIS API for javascript implementation to read tpk files is done here http://esri.github.io/offline-editor-js/samples/tpk-layer.html in repo https://github.com/Esri/offline-editor-js If you can modify it to suite your needs in Google Maps.

4. If you want a small server -- TPK and GeoTIFF-- Export XYZ tiles and host as an XYZ tile service using mbtileserver https://github.com/consbio/mbtileserver

5. More JavaScript --GeoTIFF Only-- This repo https://geotiffjs.github.io/ seems promising and loads more than 500MB geotif file. You can modify it to suit your needs. It loads LANDSAT-8 images in sample. Have a look at http://geotiff.io/ also.

Things to keep in mind

  1. If you opt for option 3, it does not use a server and is good for tpks under 20 MB.
  2. Option 3 and 5 do not require a server.

Hope it helped.

2
  • 1. Don't have ArcGIS. 2. TRied this, the file does not seem to load/render properly. Istead of tiling the map I get a hovering black rectangle. 3. I know JS so worth a look! 4. Im not sure how to host said server, but will look into this. Can I just run it off Google Cloud? 5. Looks promising but have not yet been able to get it to load/read my file properly.
    – Brian C
    Commented Jul 28, 2020 at 22:58
  • You could also import the geotiff into Google Earth Engine, then get Earth Engine to export a URL for the map tiles and load that as an overlay onto a google map.
    – intotecho
    Commented Oct 7, 2021 at 5:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.