But the world is not a sphere. Sad panda face. So things become complicated when trying to project a 2D image (the map) on 3D surface (the not so sphere like Earth) and then back again to a 2D screen. I am not going to bore you here with the whole theory of projections, datums coordinate systems etc.. They are failry well described in the Ilwis help and there numerous sources on the internet that give more information about this.
What I do want to show is we handle this when displaying maps. After all displaying maps is the main “thing” of Ilwis 3.8 and the way of how real world coordinates are mapped on the screen is could be essential in understanding the spatial context of your maps. In the old system of Ilwis we had a very restrictive system. The georeference of the first raster maps was leading and all subsequent rastermaps must have the same georeference or else they dont display. Feature maps had more freedom as you could change coordinate systems and full,on the fly, reproject would take place resulting in a different rendering of the map. This was kind of nice as you could teach people in a very visual way what the difference between the various projections were. The restriction on rastermaps was not nice. It made sense at the time as a on the fly resampling of the map to a different georef/coordinate system is very expensive and basically still is.
For the 3.8 my approach was different. The leading principle here is the coordinate system. The coordinate system of the first map is the coordinate system into everything is reprojected, both feature maps and rastermaps. Later you may change this but the default is the first map. You may ask, ‘But you stated that on the fly reprojection is too expensive’ ? This still is true, but the underlying technology we use gives us a shortcut through which can achieve our goal.
The new drawing mechanism of ILwis is based on OpenGL. Without boring you by explaining exactly what OpenGL is , suffice to say it is one of the two big display technologies (the other DirectX from Microsoft) that dominates the world of the pc’s. Because it is so widespread and used by many parties it is these days actually embedded in the hardware of your graphics board. This makes it blazingly fast and gives us (programmers) access to very fast execution of graphical operations. The other thing you should realize is that, when you look at it, reprojecting is nothing else but morphing one image to a ‘distorted’ new version of the same image. Luckily this distortion proces is something that OpenGL is good at, many games use these kind of distortions when mapping their textures on game objects. So we piggyback on the native OpenGL to reproject pur rastermaps to a different coordinate system. This works realy fast and then we can create images like
In this we combine three raster maps with very different geometries into a single rendering. All the reprojections stuff was done by OpenGL. Fortunately OpenGL allows you to define your own coordinate system so I can acutally use ‘real’ coordinates to do those operations.
Under the global tools there is now an options to change your coordinate system. If I would change the coordinate system of this rendering to lets say LatLonWgs84 you suddenly get a different image.
The ratser have now morphed to the new LatLon system on the fly.
But, …. still there was a case for having the georeference as being the leading factor. There are a few cases were you realy need a rectangular grid of pixels irrespective if the image rotated or morphed in the coordinate system. For example stereopair needs this. All pixels need to be of the same size to get the stereocopic effect. In the ‘normal’ situation, coordinate system leading, the pixels might not be the same size everywhere as the images is morphed on the model of the earth supported by the coordinate system. If you look at the Geometry node in the global opetions you see the option of also changing the georeference, this makes the georeference leading. For example
So in Ilwis 3.8 we can play a lot with how the geometry of maps is rendered. Of course you can make a total mess of it but that is op to the user.