function create_bounding_box, lon, lat, easting_meters, northing_meters ; create a bounding box that begins by using the lat/lon as the corner ; and going east and north by the given number of meters. Specifying ; the resolution then sets the dimensions of the bounding box. utm_min = ll_to_utm(lon,lat,datum=2) ; the datum number indicates wgs84 utm_max = utm_min + [easting_meters, northing_meters] ll_max = utm_to_ll(utm_max[0],utm_max[1],'WGS84',zone=18) ll = [lon, lat, ll_max[0], ll_max[1]] ll = strtrim(ll,2) utm_min = strtrim(utm_min,2) utm_max = strtrim(utm_max,2) bbox = {SRS:'EPSG:4326', CRS:' ', MINX:ll[0], MINY:ll[1], MAXX:ll[2], MAXY:ll[3], RESX:' ', RESY:' '} bbox = [bbox, bbox] bbox[1] = {SRS:'UTM:18T', CRS:' ', MINX:utm_min[0], MINY:utm_min[1], MAXX:utm_max[0], MAXY:utm_max[1], RESX:' ', RESY:' '} return, bbox end