Create georeference: georeference corners

From ILWIS
Jump to: navigation, search
Main Page Arrow.png Operations Arrow.png Create objects Arrow.png Create Georeference Arrow.png
Georeference corner Georeference tiepoints Georeference direct linear Georeference orthophoto Georeference 3D
Create Corners Georeference

A georeference corner is a North-oriented georeference that used during rasterization of vector data or as the North-oriented georeference to which raster maps can be resampled. Georeference corners stores minimum and maximum XY-coordinates, and whether these refer to the corners of the corner pixels or to the centers of the corner pixels using following expressions:

  • Col = a1 X + b1
  • Row = a2 Y + b2

When a coverage displayed in a map panel, ILWIS uses a georeference depending on the type of the coverage. For example, when a raster map displayed, the map panel uses the georeference of the raster map while for a feature coverage it uses an internal georeference created from the feature coverage coordinate system and its boundaries.
A georeference corner can be created via ILWIS-Python editor or can be directly created using ILWIS 4 user interface/create toolbox tab. Using the ILWIS-Python editor to create a new georeference including a coordinate system, purely from scratch; the following inputs are required:

  • Type of georeference
  • EPSF code of the coordinate system used by georeference
  • An envelope contains minimum and maximum x and y coordinates of uper left and lower right corners
  • Grid size (x and y)
  • A name for the new coordinate system

name of the output georeference= ilwis.GeoReference(type of georeference , EPSF code number of the coordinate system, x and y grid size, a name for the coordinate system)


Example below is used to create a georeference of 1800x1380 grid size with a new coordinate system called "ethnew".


georef = ilwis.GeoReference("code=georef:type=corners,csy=epsg:4326,envelope= 32.991677775048 14.900003906339 47.991678557359 3.400003306568, gridsize=1800 1380, cornerofcorners=yes, name=ethnew")



After you have created a new georeference you can assign it to a raster coverage by using "setGeoReference()" syntax. Note that the grid size of the georeference must match the grid size of the raster coverage, otherwise a new empty raster will be created with the new grid size. In tis example, assume that your raster coverage available in Python is called "raster".


raster.setGeoReference(georef)


Figure 1, Create corners georeference


To directly create a georeference via ILWIS user interface, Click the “Create” button in main window and select a desired georeference from the list in “Object creation” form. Once an object is selected from the list, an object creation form will be opened in which you can set parameters required for the operation (Figure 1). This example, shows how to create a "Corner georeference". Once this option is selected from the list, the "Corner georeference" form will be opened.

The Corner georeference form:

Name: Type a new name for the georeference. In case of a georeference which will be used for multiple raster maps of the same size and of the same area, it is advised to enter a georeference name that applies to all maps (e.g. the name of the study area).
Description: Optionally, type a description for the georeference. The description is visible on the status bar of the Main window when moving the mouse pointer over the georeference in the Catalog.
Coordinate system: Select a coordinate system to be used by georeference from the catalog using drag and drop option. The georeference has to fit in the selected coordinate system. If you do not have a coordinate system yet, it is advised to create one first. To create a coordinate system, click the create button next to this list box.
Center of pixel: Select this check box if the four boundary values (Xmin, Ymin, Xmax, Ymax) of this map should refer to the centers of the four corner pixels of the map.
Pixel size: Type a pixel size for the new raster map. When you specify for instance 20, the size of each pixel in the raster map will be 20 x 20 m.
Apply: Click the “Apply“ button to create this object.
Close: Click the “Close“ button if you like to cancel the create operation.