ssec / sift

A visualization application for satellite imagery
http://sift.ssec.wisc.edu/
GNU General Public License v3.0
46 stars 13 forks source link

Mercator areas not shown and used correctly #374

Open ameraner opened 1 year ago

ameraner commented 1 year ago

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

djhoese commented 1 year ago

Off the top of my head, I don't think a mercator projection with a non-equator lat_0 is valid in PROJ. Right?

djhoese commented 1 year ago

https://proj.org/en/9.2/operations/projections/merc.html

No mention of lat_0. Not that that explains it, but yeah, maybe affecting it.

arcanerr commented 1 month ago

Is mercator implemented in SIFT or exactly speaking VisPy at all? If I remember correctly, VisPy has an own implementation of the projections and at least equidistant cylindrical (eqc) is missing.

djhoese commented 1 month ago

Vispy does not implement any geographic projects. I wrote them into SIFT in shader language by modifying a OpenCL (not OpenGL) version of PROJ if I remember correctly. The main point here is that mercator with a lat_0 other than 0 is not very standard and is not implemented most likely.