Changes between Version 20 and Version 21 of MapGuideRfc51
- Timestamp:
- 08/19/08 08:45:59 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MapGuideRfc51
v20 v21 36 36 We will use a tessellation algorithm to re-project the raster data from one coordinate system (CS) to another. 37 37 38 In Figure 1, the green rectangle represents the original raster image. The blue mesh represents the extents of the viewport (or map), divided into a set of triangular regions. The purpose of the algorithm is to re-project the appropriate triangular sections of the original image into the equivalent parts of the mesh. 39 38 40 ||[[Image(raster_reprojection_viewport3_1.PNG)]]|| 39 41 ||Figure 1. The left side shows the raster image (green rectangle) in it's own CS. The right side shows the blue mesh of uniform triangles created in device space in the viewport CS.|| 40 42 41 We must first determine how much of the original image is required by projecting the extents of the viewport (or map) into the image's CS. This yields our desired clipped image (red outline). Then we project the extents of the clipped image into the viewport's CS, and subsequently into device space. A mesh of uniform triangles is created in device space (Figure 1). 43 We must first determine how much of the original image is required by projecting the extents of the viewport (or map) into the image's CS. The intersection of the re-projected extents with the original image extents yields our desired clipped image (red outline, Figure 2). 44 45 Each point in the triangle mesh is transformed from device space, to the viewport's CS, to the image's CS, and then to device space. A texture map is created from the two triangle meshes. 42 46 43 47 ||[[Image(raster_reprojection_viewport3_2.PNG)]]|| 44 48 ||Figure 2. The blue mesh of triangles has been transformed into the raster image's CS.|| 45 49 46 Each point in the triangle mesh is transformed from device space, to the viewport's CS, to the image's CS, and then to device space (Figure 2). A texture map will be created from the two triangle meshes.50 The image will then be rendered using the texture map created from the two triangle meshes (Figure 3). Because the triangle mesh is in device space, choosing its size guarantees you a minimum level of accuracy: the error in the re-projected image will never be greater than the size of the individual triangles. 47 51 48 52 ||[[Image(raster_reprojection_viewport3_3.PNG)]]|| 49 53 ||Figure 3. The raster image is rendered into the viewport using the texture map.|| 50 51 The image will then be rendered using the texture map created from the two triangle meshes (Figure 3). Because the triangle mesh is in device space, choosing its size guarantees you a minimum level of accuracy: the error in the re-projected image will never be greater than the size of the individual triangles.52 54 53 55 The balance between performance and accuracy of the transformation is controlled by the number of triangles created for each raster. The configuration setting will control the grid size and thus the number of triangles created. The configuration will be handled by the serverconfig.ini.