# PyCoast 1.6.0 BUG, see https://groups.google.com/g/pytroll/c/JW90QP9QXys import pyresample, sys,os from PIL import Image from pycoast import ContourWriterPIL def get_ortho(lon_0, lat_0, s, t): area_def = pyresample.create_area_def( '1/2 World, orthographic', '+proj=ortho +lon_0='+lon_0+' +lat_0='+lat_0+' +ellps=WGS84 units=m', width=800, height=800, area_extent=[-6800000.0*s , (t-6800000.0)*s, 6800000.0*s, (t+6800000.0)*s]) return area_def # With proposed PR 70 "write_text = True" works but I get no lon/lat labels anymore write_text = True lon_0, lat_0 = '0', '30' area_def = get_ortho(lon_0, lat_0, 0.8, 3000000) imagename = 'EMCdata/products/ortho-partial-'+lon_0+'-'+lat_0+'-new.png' cw = ContourWriterPIL('./') # We take PIL because it has has a hardcoded default font img = Image.new('RGB', (900, 900)) cw.add_grid(img, area_def, (10., 10.), (2., 2.), lat_placement='', lon_placement='', write_text=write_text, outline='white') img.save(imagename)