[python-users] Displaying GOES in mercator projection

  • To: "python-users@xxxxxxxxxxxxxxxx" <python-users@xxxxxxxxxxxxxxxx>
  • Subject: [python-users] Displaying GOES in mercator projection
  • From: "Weber, Jim" <Jim.Weber@xxxxxxx>
  • Date: Thu, 18 Nov 2021 18:53:51 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=fox.com; dmarc=pass action=none header.from=fox.com; dkim=pass header.d=fox.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Kw9oKX7p/HR2XC1TtN5JhS9m6Z/HM0QLj+cVXV74atA=; b=WtTS1saMTHt5de5eNgNqP1SoaTO9yB0NohP+Sle+4MJYiyZ1svXX68u6Nmmwvf05n2/Lme0xt2SX/6mPLVJZ2SF8FgWuIwZiOlb6xuWs9wdFfV0t2VnoCXcm2J/XGORXxqLqtpaOx9bDbdjNsKkvsBHlsc6gncCWzvX/8oaTZCFy4ACvsVhI2VU41qgSIcBOjEiZ/k64mvVd8MGRGPU9pSaZZVvaJQypsFCWq7gSq2TvaEX5WzRcnWGXkcE+A0DAUmG83NFBHVkzxCgPZ8Tk3SdhD+XIwO0XaQOFM0iaL7DlimFtn8D/21PHIfax9joszq1j2EQO9tzUg6JHCiol3A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V/UyJFLhM3G+DaGR4+5ySWnlupr3cLHni5XiWg6AonvbNG0FAQp9Ne2BXgPGQn830zx7pjplCg5R6kib2/V5hp/4qSul8a0okDOTrShbDDn/Y09180qseGfokms5VsX2BHfv2LfIiI6yc82twvWEfLdqgw3dg0gyiEAZzPAWY++VgRMtOvRZOxkdUcy49zTgB3skrozSdSVb5Uq/X1a62aFB1lDFG9ir7Bx3A69vESKfMZp3ERc1VVQZMcn/STDbzItn4iwlxOC8s+1MSd8tv2KRAPCQt9ByI/V1VsQROoNtbRHOpsazaGTOy7AEF6F4kMaRS59231Q7a7ev7zALZA==
Below is a snippet of code from Brian Blaylock's True Color Recipe.  I am 
trying to instead display imagery in a Mercator projection. I thought I would 
do this with a line such as:
mc=cartopy.ccrs.Mercator(central_longitude=0.0, min_latitude=-80.0, 
max_latitude=84.0, globe=None)

and then have lines:
ax = fig.add_subplot(1, 1, 1, projection=mc)
ax.set_extent([-135, -60, 10, 65], crs=ccrs.Mercator())

but this does not work. Can someone point out what I am doing wrong or point me 
to the correct resource so I might understand my problem better?


Thanks, Jim

------ Code snippet ---------


fig = plt.figure(figsize=(15, 12))

# Generate an Cartopy projection
lc = ccrs.LambertConformal(central_longitude=-97.5, standard_parallels=(38.5,
                                                                        38.5))

ax = fig.add_subplot(1, 1, 1, projection=lc)
ax.set_extent([-135, -60, 10, 65], crs=ccrs.PlateCarree())

ax.imshow(RGB, origin='upper',
          extent=(x.min(), x.max(), y.min(), y.max()),
          transform=geos,
          interpolation='none')
ax.coastlines(resolution='50m', color='black', linewidth=0.5)
ax.add_feature(ccrs.cartopy.feature.STATES, linewidth=0.5)

plt.title('GOES-16 True Color', loc='left', fontweight='bold', fontsize=15)
plt.title('{}'.format(scan_start.strftime('%d %B %Y %H:%M UTC ')), loc='right')

plt.show()




This message and its attachments may contain legally privileged or confidential 
information. It is intended solely for the named addressee(s). If you are not 
an addressee indicated in this message (or responsible for delivery of the 
message to an addressee), you may not copy or deliver this message or its 
attachments to anyone. Rather, you should permanently delete this message and 
its attachments and kindly notify the sender by reply e-mail. Any content of 
this message and its attachments that does not relate to the official business 
of Fox Corporation, or its subsidiaries must be taken not to have been sent or 
endorsed by any of them. No representation is made that this email or its 
attachments are without defect.
  • 2021 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the python-users archives: