Bug report #4302

Can't use 'Geostationary Satellite View' projection

Added by Ricardo Silva almost 13 years ago. Updated over 12 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Map Canvas
Affected QGIS version: Regression?:No
Operating System:Linux Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data: Copied to github as #:14239

Description

Following the description of the GEOS (or NGP) projection on [1] I created my own CRS for displaying images according to the MSG satellite (it has lon_0=0). I used the following proj4 definition when creating the custom CRS in QGIS:

+proj=geos +lon_0=0 +h=35785831 +x_0=0 +y_0=0 +ellps=WGS84 +units=m +no_defs

After that I tried loading the coastlines shapefile from the Natural Earth [2] dataset using OTF reprojection to see if the shape would get displayed correctly. I also made a custom shapefile with a world grid in the EPSG:4326 projection and loaded it as well. The result is in the attached screenshot.

The projection seems to be all right, but QGIS can only render some of the lines (in the screenshot you can notice that the U.K. is visible, but continental Europe is not. Also, you can see Madagascar, but not continental Africa).

Also when I change the zoom level, sometimes the features get rendered correctly, others they won't be rendered.

After that I tried to load a raster file and then using OTF reprojection to see it in the GEOS projection. QGIS could display a bit of the raster, depending of the zoom level, but eventually, when I started panning the map canvas, always crashed with this error:

forward transform of
(-3.61763e+06, 4.59789e+06)

failed with error: tolerance condition error

I'm also attaching a screenshot of the error.

Maybe these are two different bugs?

[1] - http://remotesensing.org/geotiff/proj_list/geos.html
[2] - http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/110m-coastline.zip

epsg4326_projection_all_ok.png - The vector files rendered using EPSG:4326 projection. (258 KB) Ricardo Silva, 2011-09-23 10:15 AM

GEOS_projection_no_europe_and_africa.png - The vector files rendered using my custom projection. (268 KB) Ricardo Silva, 2011-09-23 10:15 AM

raster_error.png - The error that pops up after loading a raster and panning the canvas. (117 KB) Ricardo Silva, 2011-09-23 10:15 AM

History

#1 Updated by Steven Mizuno almost 13 years ago

The problem of some coast lines not showing is due to the object extending beyond the edge of the projection (wrapping around) which makes the transformation from data to projection to screen impossible. There is a clipping operation for performance which may contribute to this. Zooming in may allow some parts to be rendered.

Using a long/lat projection try identifying the coast lines that didn't display. Europe, for example, extends across northern Russia which would put some part of it on the 'other side' of the world. Small objects, like the U. K., don't span too much so they are displayed.

As you noticed the lat/long grid does work so they must be in small enough chunks.

I tried a military grid reference system 6x8 degree set which renders properly.

If the coast lines data were to be broken up into small segments they should display.

Just for kicks, try using the land polygons from the same source, use the geos projection and identify an area that doesn't display. The identify highlight shows what happens to the data to projection transformation.

#2 Updated by Steven Mizuno almost 13 years ago

More information -

I looked more closely at how the MGRS 6x8 degree data was displayed and found that there were missing objects at the edges of the map. The north extent only goes to 84 degrees and the band from 72 to 84 was not displayed. If I zoomed in on that area the objects would be displayed at some point, but could not display the northern most part.

If you use Coordinate Capture tool to read the long/lat on the map you will get error messages whenever the cursor is outside of the general notion of a circle around the displayed earth.

On further examination of the GEOS projection I find that PROJ (the library that QGIS uses to do reprojection) cannot handle long/lat data greater than +/- 81.3 degrees (approximately) from the projection center, either forward or reverse. Anything outside of this range will cause a projection failure, consequently the object may not be displayed, or there will be an error message detailing the failure.

No example raster data was referenced on this ticket, so I can't determine what the extent or projection of the raster in question. I have tried showing rasters that are in UTM Zone 15. These appeared to be displayed properly after I moved the map projection center longitude to -105.

I believe that the sample data shows the limitations of the GEOS projection as implemented by PROJ. Therefore, there isn't anything to fix, short of finding a different algorithm to use in PROJ.

#3 Updated by Giovanni Manghi almost 13 years ago

Hi, so this means that is not a QGIS issue, right?

Steven Mizuno wrote:

More information -

I looked more closely at how the MGRS 6x8 degree data was displayed and found that there were missing objects at the edges of the map. The north extent only goes to 84 degrees and the band from 72 to 84 was not displayed. If I zoomed in on that area the objects would be displayed at some point, but could not display the northern most part.

If you use Coordinate Capture tool to read the long/lat on the map you will get error messages whenever the cursor is outside of the general notion of a circle around the displayed earth.

On further examination of the GEOS projection I find that PROJ (the library that QGIS uses to do reprojection) cannot handle long/lat data greater than +/- 81.3 degrees (approximately) from the projection center, either forward or reverse. Anything outside of this range will cause a projection failure, consequently the object may not be displayed, or there will be an error message detailing the failure.

No example raster data was referenced on this ticket, so I can't determine what the extent or projection of the raster in question. I have tried showing rasters that are in UTM Zone 15. These appeared to be displayed properly after I moved the map projection center longitude to -105.

I believe that the sample data shows the limitations of the GEOS projection as implemented by PROJ. Therefore, there isn't anything to fix, short of finding a different algorithm to use in PROJ.

#4 Updated by Steven Mizuno almost 13 years ago

So far as I can tell there isn't anything in QGIS to fix.

#5 Updated by Giovanni Manghi almost 13 years ago

  • Status changed from Open to Closed
  • Resolution set to invalid

Steven Mizuno wrote:

So far as I can tell there isn't anything in QGIS to fix.

Then Ricardo please file this ticket upstream, in the PROJ or GEOS tracs.

#6 Updated by Ricardo Silva over 12 years ago

Sorry that I was away from this discussion... I assumed that no one had replied since I didn't receive any e-mails... I guess Redmine didn't subscribe me to this bug report by default. I'll investigate this with your input in mind and, likely, open a ticket at the Proj website. Thanks for your help.

Also available in: Atom PDF