# High Resolution Projection for Image Renderer

**URL:** <https://vapor.discourse.group/t/high-resolution-projection-for-image-renderer/89>\
**Category:** Uncategorized\
**Created:** [May 10, 2021, 3:22pm UTC](https://vapor.discourse.group/t/high-resolution-projection-for-image-renderer/89 "2021-05-10T15:22:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kasrash](https://avatars.discourse-cdn.com/v4/letter/k/46a35a/32.png) [@Kasrash](https://vapor.discourse.group/u/Kasrash)\
**Post date:** [May 10, 2021, 3:22pm UTC](https://vapor.discourse.group/t/high-resolution-projection-for-image-renderer/89/1 "2021-05-10T15:22:35Z")

</div>

Dear VAPOR community,  
I want to visualize a high resolution WRF output, and I’m wondering how I can find high resolution map projection. I tried the 500 meters BBM, but it’s still too coarse.

Thank you very much in advance.

---

<div class="post-metadata">

**Author:** ![clyne](https://avatars.discourse-cdn.com/v4/letter/c/b9e5f3/32.png) [@clyne](https://vapor.discourse.group/u/clyne)\
**Post date:** [May 11, 2021, 3:12am UTC](https://vapor.discourse.group/t/high-resolution-projection-for-image-renderer/89/2 "2021-05-11T03:12:27Z")

</div>

VAPOR will load any GeoTIFF. You simply need to specify the path to the file from the Image/Appearance tab. As to where on the internet you can download a raster image with higher resolution than the 500m BBM, that I can’t tell you. Someone on the OSGeo forum might be able to provide some guidance if you can provide them the region of the globe that you are interested in.

---

<div class="post-metadata">

**Author:** ![pearse](https://yyz2.discourse-cdn.com/free1/user_avatar/vapor.discourse.group/pearse/32/177_2.png) [@pearse](https://vapor.discourse.group/u/pearse)\
**Post date:** [May 11, 2021, 1:28pm UTC](https://vapor.discourse.group/t/high-resolution-projection-for-image-renderer/89/3 "2021-05-11T13:28:16Z")

</div>

Below is a python script that you can use to create geotiffs. You’ll need to play with the parameters though. This creates a geotiff from NASA’s VIIRS\_CityLights\_2012 map layer. You can find more map layer products at the following link.

[https://wiki.earthdata.nasa.gov/display/GIBS/GIBS+Available+Imagery+Products#expand-RedVisible3Products](https://wiki.earthdata.nasa.gov/display/GIBS/GIBS+Available+Imagery+Products#expand-RedVisible3Products)

```
import matplotlib.gridspec as gridspec
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
import PIL
from osgeo import gdal

def main():
    url = 'https://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi'
    layer = 'VIIRS_CityLights_2012'
    #layer = 'GOES-West_ABI_Band2_Red_Visible_1km'

    west = -170
    north = 60
    east = -10
    south = 15

    width = 1920
    height = 1080

    dpi = 100
    fig = plt.figure( figsize=(width/dpi, height/dpi), tight_layout=True )
    ax = fig.add_subplot(1, 1, 1, projection=ccrs.PlateCarree())
    ax.add_wmts(url, layer)
    ax.set_extent([west, east, south, north], crs=ccrs.PlateCarree())
    ax.coastlines(resolution='50m', color='yellow')

    tiffFile = "/Users/pearse/night6.tif"
    fig.savefig( tiffFile,
                 bbox_inches='tight',
                 pad_inches=0 )

    platteCarree = "+proj=eqc +lat_ts=0 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84"

    tiff = gdal.OpenShared( tiffFile, gdal.GA_Update)
    width = tiff.RasterXSize
    height = tiff.RasterYSize

    nightTranslated = '/Users/pearse/nightTranslated.tif'
    nightWarped = '/Users/pearse/nightWarped.tif'

    gdal.Translate( srcDS=tiffFile,
                    destName=nightTranslated,
                    format = 'GTiff',
                    outputBounds = [west, north, east, south],
                    outputSRS = 'EPSG:4326'
    )

    warpOpts = gdal.WarpOptions(
        srcSRS='EPSG:4326',
        dstSRS='EPSG:32662'
    )
    gdal.Warp( destNameOrDestDS=nightWarped,
                srcDSOrSrcDSTab=nightTranslated,
                srcSRS = 'EPSG:4326',
                dstSRS='EPSG:32662' )

if __name__ == ' __main__':
    main()
```

---

<div class="post-metadata">

**Author:** ![Kasrash](https://avatars.discourse-cdn.com/v4/letter/k/46a35a/32.png) [@Kasrash](https://vapor.discourse.group/u/Kasrash)\
**Post date:** [May 11, 2021, 9:34pm UTC](https://vapor.discourse.group/t/high-resolution-projection-for-image-renderer/89/4 "2021-05-11T21:34:53Z")

</div>

Thank you very much for the great script Scott. I will definitely try it.

Just one more question and I know it’s unrelated, but is there any limitations of using “image renderer” with WRF-Fire output files?  
I have a WRF-Fire output file that uses Lambert projection. When I use the image renderer, the default sets of images does not work properly, in fact nothing shows up, and even the BBM\_500 is very coarse and does not seem right. It seems that the image renderer cannot find the location correctly. The domain dimension is roughly 7 by 7 km.

---

<div class="post-metadata">

**Author:** ![pearse](https://yyz2.discourse-cdn.com/free1/user_avatar/vapor.discourse.group/pearse/32/177_2.png) [@pearse](https://vapor.discourse.group/u/pearse)\
**Post date:** [May 12, 2021, 12:06pm UTC](https://vapor.discourse.group/t/high-resolution-projection-for-image-renderer/89/5 "2021-05-12T12:06:08Z")

</div>

It’s hard to say without seeing your data. We definitely support the Lambert projection though, as long as the proj string is in your WRF file.

If you can share one of your files, I can take a look.
