-
Notifications
You must be signed in to change notification settings - Fork 20
Georeferencing Maps
Georeferencing involves defining a co-ordinate system for the map and then aligning it to the real world. You can do this when first starting to produce a map, or you can georeference an existing map. There are various resources available which provide more detailed information:
- British Orienteering Federation Map Group document explaining how to georeference a map.
- OCAD help file: Creating a new map
- OCAD 10 video
- OCAD 9 video
A world file is a text file that defines how to translate an image to real-world co-ordinates. Various methods of creating world files are available. A method using OCAD is described below, since this is probably the most likely for orienteering purposes.
The OCAD map must be georeferenced, as described above. You can check by selecting "Map|Set scale and co-ordinate system..." The "real world co-ordinates" button must be checked, and a co-ordinate system must be defined.
You can then export the map by selecting "File|Export..." Select the required format (JPEG or GIF) in the dropdown box and make sure the "Create World file" checkbox is ticked. Now when you select "Export" you will get an image file and the associated world file. The world file will have a suffix of .jgw (for jpg images) or .gfw (for gig images).
When adding a new map in the Manager you need to upload the map image file and the associated world file.
Select the required co-ordinate system from the dropdown. Two formats are built in by default:
- GB National Grid (EPSG:27700)
- Google (EPSG:900913).
The world file parameters are displayed for information. Parameters C and F at the bottom are the latitude and longitude of the top left corner of the map.
You can also define your own co-ordinate system in the configuration file. This is done by defining a proj4 EPSG co-ordinate reference system and an associated parameter string. For example, for EPSG:27700 the parameter string can be found by following the proj4 link.
For the GB National Grid you would need to add the following definitions to rg2-config.php:
- define('EPSG_CODE', "EPSG:27700");
- define('EPSG_PARAMS', "+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs ");