Skip to content

Mercator areas not shown and used correctly #374

@ameraner

Description

@ameraner

Problem

It seems that areas in the mercator projection are not shown and used correctly.
For example, when using the area

CE_1160x800:
  description:   Central Europe 1160x800
  projection:
    proj: merc
    lat_0: 50
    lon_0: 14.5
    ellps: WGS84
  shape:
    width: 1160
    height: 800
  area_extent:
    lower_left_xy: [-1805152.04,  5172213.35]
    upper_right_xy: [1811322.74,  7660679.05]

just a black screen appears on the main window:
image

If I try to resample a LEO granule that is over France to this area, and then switch to plate carree, I see that the data has been resampled to Mongolia:
image

For reference, this is the plain Satpy result:
image

Additional Information

  • Not sure if it's related, but there is a code comment mentioning mercator issues workarounds here:

    sift/uwsift/view/visuals.py

    Lines 941 to 942 in f5e584c

    # Clip lats to +/- 89.9 otherwise PROJ.4 on mercator projection will fail
    np.clip(vertex_buffer[:, 1], -89.9, 89.9, out=vertex_buffer[:, 1])
  • logs do not show anything particular, apart from the usual
2023-06-12 16:22:06 DEBUG document:change_projection:L125 Changing projection (area definition) from 'MSG SEVIRI FES 3km' to 'CE_1160x800'
/tcenas/proj/optcalimg/OFTs/SIFT/conda-packaged_v2.0.0b0/SIFT_2.0.0b0/lib/python3.11/site-packages/pyproj/crs/crs.py:1286: UserWarning: You will likely lose important projection information when converting to a PROJ string from another format. See: https://proj.org/faq.html#what-is-the-best-format-for-describing-coordinate-reference-systems
  proj = self._crs.to_proj4(version=version)

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions