You are on page 1of 4

MicroStation 101:

Geo Priority.
What is Geo Priority?

The Geo Priority field in the Raster Manager dialog displays the method used to geographically
position the image. The available choices are Attachment, Raster Header, Sister File and From
Preferences.

The image may have native geographic metadata stored in the image itself (raster header) or in
a companion file (sister file or world file). When no native methods are present, the image is
geographically positioned by the user and this location is stored in the design file. This method
is called “attachment” (similar to the way normal vector references are handled).

OK, so what’s a Header and Sister File?

A simple way to think about a header is that it is the “contents” information of a file. Before you
get to the actual file information (in the case of a DGN, the lines, arcs, levels, etc; or in the case
of a raster the pixels, their colour, etc) there is information necessary to be able to use the file
correctly: what type of file it is, what version and other such information. Certain rasters can hold
their co-ordinate location and scale inside their file header.

A sister file is simply a text file containing the co-ordinates and scale that is related (get the
pun?) to the raster. This can be used when the raster format (e.g. JPG or BMP) cannot store the
location in its header.

The geographic metadata is always preserved and updated in the saved attachment. In cases
where the image has native geographic metadata, once attached to a design file, it is
sometimes useful to specify which metadata storage to use, such as Raster Header (when the
location information is included as part of the raster file itself), Sister File (the location
information is in a separate text file) or Attachment (when the location is defined by the user).

The Geo Priority column displays the method used to position the image and, upon reopening
the design file, will display in green (well, olive, if you want to get picky and definitely not red, as
Help says) if the previous method cannot be used. For example, you may want to attach an
image using a sister file, but once attached you want the geographic metadata to be read from
the attachment. You would then set the Workspace>Preferences>Raster Manager to prioritise
native Geographic metadata and would change the Geo Priority to attachment. Yikes - you still
with me?

The colourful bit


In my example above the first two rasters are nested in a reference file – they highlight grey.
The third raster has an accompanying .jgw file, or Sister file, that contains the co-ordinates for
the location of the raster. This highlights blue.
The fourth raster also has an accompanying .jgw file which I moved it to another folder location.
Now when I open the file, Raster Manager has switched the Geo Priority from Sister File to
Attachment and highlighted it green to show that the previous method cannot be used.

I can reorder the active rasters by dragging them in the list, but not the grey referenced ones.
If I moved the raster to a different folder location then it would show up red in the list like a lost
reference file does in the Reference Manager dialog.

The history bit


The Geo Priority feature allows each image to have its own Geo Priority. In versions before
MicroStation V8 2004, the same Geo Priority was forced to all images. When an older file
version is opened in MicroStation and where no Geo Priority was previously set, the Geo
Priority will be set to From Preferences (Workspace>Preferences>Raster Manager). This
indicates that the Raster Manager preferences will dictate how Geo referencing for this image is
handled. If the Raster Manager Preferences are set identically to the previous MicroStation
version, the image will display and position identically. If the Preferences are set differently, it is
possible that the image displays and positions differently. If this is the case, adjust the Geo
Priority before saving and closing the design file and change the Raster Manager Preferences
accordingly.

To change the Geo Priority, simply click in the Geo Priority column. This will open the Geo
Priority dialog box. You can then change the selection.

The Preferences bit


You probably want to set this all up as default rather than explaining to your users how these
settings work.
Display Border Around Selected Raster
If on, a border is displayed around any selected raster images. (It’s a dashed red line – quite
handy really).

File Georeference Has Priority when Raster Is Loaded:


This defines the default Geo Priority when attaching a raster reference. If this preference is
unticked, the raster will be positioned using the attachment information (ie the position defined
by the user while attaching the reference). If it is ticked, the Georeference information (either
contained in the raster header or a sister file) will be used.

Note: If many attachments of the same raster are found in many models, the position of the
raster found in the Default (main) model will take precedence over the position found in all the
other models.

Use Sister File, if Present, for Georeference Files


If on, Raster Manager will extract the geo-location from the associated sister/world file (if it
exists) for all formats with header information (Example: COT, HMR, iTiff, GeoTiff). To be used,
the sister/world file must be in the same folder as the image and have the same name as the
raster e.g villaplan.jpg and villaplan.jgw). For files such as GeoTiff, ECW, SID, etc, the header
will not be read and the sister/world file will be used instead. Thus, if the image header contains
a Coordinate System, it will not be used.

In “simple” terms what this means is, when “File Georeference Has Priority…” is ticked, the
georeference location will be used to position the file. “If Use Sister File…” is ticked the sister file
is used (if it exists). If both are ticked, the order of attachment type that Raster Manager uses
will be:

1. Always use the sister file, ignoring any georeference location stored in the header of the
raster file itself.

2. If there is no sister file, use the georeference information in the raster header.

3. If the raster format doesn’t support this, or there is no georeference data, use the
attachment information.

An image with no header or sister file data inserted with no tick in Place Interactively check box,
will be inserted so that the top left hand corner is at 0,0.

Once loaded in Raster Manager, the GeoPriority setting can be used to change the
georeference from Sister File to Image Header or Attachment. This preference is useful for
image files that were used with legacy systems not supporting header information and where
sister/world files were used instead to store the geo-location.

Save Location Info in Sister File if Required


If on, automatically saves the file location information in a sister file when the raster image
format does not support this feature. (Only certain raster files can store georeference locations.)
This option affects only the files with sister files. You can specify the kind of sister file (HGR or
World File) you want to create with the MS_RASTER_DEFAULTSISTER environment variable.

Open Raster Files Read-Only


Specifies if the image will be opened in read-only mode or in edit mode. When a DGN is loaded,
all the included raster attachments are opened with the opening mode specified in this
preference. When the toggle is On, it allows multiple users to share the same DGN file.

Update MS_RFDIR Automatically for Raster Attachments


If on, MS_RFDIR automatically includes the path of any attached raster images. The raster
attachments will be searched for in the directories named by this configuration variable, as with
normal references. If the box is unticked, the paths will not be added to MS_RFDIR and the
images will be searched for only in the paths already listed in the MS_RFDIR variable. This
means if the raster is in a folder other than your typical search path, it will not be found.

List Raster Attachments From Self References


If on, all raster attachments are listed in the main Raster Manager dialog box. Thus, if a DGN
file references itself, the raster attachment will be listed twice. If the toggle is set to off, only the
raster attachments in the master model will be listed.

GeoTiff Settings
Raster Manager needs to know the GeoTiff image file' s coordinate units to be able to correctly
place it in the design plane. This information is extracted based on the GeoCoding Projected
Coordinate System (PCS) and the EPSG table that define the unit for this PCS. In some
circumstances, a ProjLinearUnitsGeokey can also exist within the GeoTiff; this geokey also
defines a unit for the GeoTiff. A problem arises when:

• PCS and ProjLinearUnitsGeokey are both undefined. In this case, the GeoTiff unit is
unknown.
• PCS and ProjLinearUnitsGeokey are both defined but not resolved in the same unit.

The following preferences exist to resolve GeoTiff units and display GeoTiff image files
correctly:

Use Unit Definition Geokey if Present (override PCS unit)


This toggle is used when GeoTiff units are defined. If on, places the GeoTiff image using the
units found in its ProjLinearUnitsGeokey field. If off, places the GeoTiff image using the units
under the Projected Coordinate System (PCS).

GeoTiff Default Unit Label


Defines the unit type and value to use when the unit is undefined in the GeoTiff image file.

WorldFile Default Unit Label


Defines the unit type and value to use with world files. The unit type can be expressed as a
distance or as Working Units. The default is Meters.

Recent files List Contains _ Files


Sets how many files display in the recent files list of the Attach Raster Reference dialog'
s File
menu. The default is 4.

Questions:
If I know what the coordinate for an image is, how do I create a sister file?
You can create sister file by using a simple text editor like Notepad. All you need to do is call the
file exactly the same name as the raster with, for example, a .JGW extension for JPG rasters.
Then type in the co-ordinate and scale information in the right format and save the file.

1.000000000000 (X scale - the pixel size in metres)


0 (Rotation in the X direction)
0 (Rotation in the Y direction)
-1.000000000000 (Negative Y scale - the pixel size in metres)
330500.5 (X origin - the centre of the upper left pixel)
386500.5 (Y origin - the centre of the upper left pixel)

Can you do this by setting the right location in MicroStation then saving the sister file
automatically there?
Check out the article “Create JGW files automatically” and download the CreateJGW utility.

Karen Fugle and Nigel Davies

You might also like