Changes between Version 15 and Version 16 of MapGuideRfc51
- Timestamp:
- 07/22/08 11:01:26 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MapGuideRfc51
v15 v16 36 36 We will use a tessellation algorithm to re-project the raster data from one coordinate system (CS) to another. 37 37 38 ||[[Image(raster_reprojection_viewport3_1.PNG)]]|| 39 ||Figure 1. The left side shows the raster image (red X) in it's own CS. The right side shows the blue mesh of uniform triangles created in device space in the viewport.|| 38 40 39 ||[[Image(raster_reprojection_viewport2.PNG)]]|| 40 ||Figure 1. The blue mesh of triangles represents the extents of the projected image. The thick black lines represent the image. On the left we are in the raster image's CS. On the right we are in the viewport's CS.|| 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. 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). 41 42 43 ||[[Image(raster_reprojection_viewport3_2.PNG)]]|| 44 ||Figure 2. The blue mesh of triangles has been transformed into the raster image's CS.|| 42 45 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 first blue arrow). This yields our desired clipped image. Then we project the extents of the clipped image into the viewport's CS (the first black arrow), and subsequently into device space. A mesh of uniform triangles is created in device space. 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 (the second blue arrow). The image will then be rendered using a transform created from the two triangle meshes (second black arrow). 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. 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. 47 48 ||[[Image(raster_reprojection_viewport3_3.PNG)]]|| 49 ||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. 44 52 45 53 The balance between performance and accuracy of the transformation is controlled by the number of triangles created for each raster. The configuration settings will control the size and number of triangles created. Configuration will be done through the serverconfig.ini.