Commit 9d56ad50 authored by Eva Schiffer's avatar Eva Schiffer
Browse files

correctly set the central longitude when plotting using PlateCarree, note this...

correctly set the central longitude when plotting using PlateCarree, note this doesn't fix the antimeridian issue, but we should do it anyway
parent b9989f4a
......@@ -221,16 +221,17 @@ def create_cartopy_proj_objects (extents, out_proj4_str=None,) :
# FUTURE, this is not actually useful here now, but hang on to it for bounds setting later in our display process
# # pull out the longitude/latitude info
# lon_left = extents[0]
# lon_right = extents[1]
lon_left = extents[0]
lon_right = extents[1]
# lat_bottom = extents[2]
# lat_top = extents[3]
# lon_mid = calculate_lon_mid(lon_left, lon_right) # handle lon wraparound case
lon_mid = calculate_lon_mid(lon_left, lon_right) # handle lon wraparound case
# lat_mid = (lat_top + lat_bottom) / 2.
LOG.debug("Using central longitude: " + str(lon_mid))
# for now just use PlateCarree, in
# FUTURE we will want to pick projections based on our input so we could use x and y when desired
input_proj_obj = crs.PlateCarree()
input_proj_obj = crs.PlateCarree(central_longitude=lon_mid,)
# FUTURE, we will probably want different projections; select based on the lat/lon range?
# for reference, here's what cartopy supports: https://scitools.org.uk/cartopy/docs/v0.15/crs/projections.html#cartopy-projections
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment