GIS的积累
It is never to late to learn

导航

 
Vector data in MapLayers exists in a real-world or map coordinate system, measured, typically, in feet or meters. The x-coordinates increase from left to right and the y-coordinates increase from the bottom to the top. This is quite different from a raster image represented by an ImageLayer. A raster image is organized and measured by rows and columns. Each cell has a row number and a column number. If the origin is located in the upper left corner of the data, that cell would be identified as row 1, column 1.

For MapLayers and ImageLayers to be displayed simultaneously, the rows and columns of the image must be mapped into the x,y plane of a map coordinate system. An image-to-world transformation that converts the image coordinates to map coordinates must be established. Some image formats store georeferencing information in the file header of the image or, in the case of images that do not contain this georeferencing information, facilities exist in other products available from ESRI, for creating a file that contains the necessary transformation parameters. The file that contains the transformation parameters is called a world file. The world file takes precedence over any header information.

About the world file

The image-to-world transformation is a six parameter affine transformation of the form:

x' = Ax + By + C
y' = Dx + Ey + F

where

x'    = calculated x-coordinate of the pixel on the map
y'    = calculated y-coordinate of the pixel on the map
x    = column number of a pixel in the image
y    = row number of a pixel in the image
A    = x-scale, dimension of a pixel in map units in the x-direction
D,B    = rotation terms. Note: Not supported for this release.
E    = y-scale (this value is always negative, because image space is top-down, whereas map space is bottom-up)
C    = translation term; x-Origin (x-coordinate of the center of the upper left pixel)
F    = translation term; y-Origin (y-coordinate of the center of the upper left pixel)
The transformation parameters are stored in the world file, an ASCII format, in this order, A, D, B, E, C, F; for example:

2.22123393184959    A
0.00000000000000    D
0.00000000000000    B
-2.22123393184959    E
10383.13600759092515    C
11611.48117990907485    F
Note that the parameter characters are included in the example for clarity. They do not actually appear in the file.
If a world file is not present and there is no georeferencing information in the header of the image, a default mapping is still provided between image space and map space. MapObjects makes the origin of the image (-0.5, -0.5), and sets the X and Y scale factors both to 1.0 (as the center of the bottom right pixel should be at (0,0).
If you want to display a non-georeferenced image on a portion of your map, supply the georeferencing world file yourself, and make sure it maps the image to the portion of the map that you want.

World file naming conventions

The world file associated with an image is named by following the conventions in the table below. For example, if you have an image that's stored in a file named myimage.bmp, then the world file associated with it must be named myimage.bmpw or myimage.bpw.


If the file extension of the image is    the world file extension must be
bmp    bmpw or bpw
jpg; jpeg    jpgw or jgw
tif; tff; tiff    tfw
gis    gsw
lan    lnw
bil    blw
bip    bpw
bsq    bqw
sid    sdw
sun    snw
rs; ras    rsw
rlc    rcw
posted on 2009-12-10 10:20  GIS的学习  阅读(379)  评论(0编辑  收藏  举报