Changes between Version 13 and Version 14 of MapGuideRfc51
- Timestamp:
- 07/21/08 14:50:19 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MapGuideRfc51
v13 v14 34 34 == Proposed Solution == 35 35 36 We will use a tessellation algorithm to re-project the raster data from one coordinate system to another.36 We will use a tessellation algorithm to re-project the raster data from one coordinate system (CS) to another. 37 37 38 We must first determine how much of the original image is required for our re-projection. The extents of the current viewport must be re-projected into the coordinate system of the original image. The extents of the re-projected viewport need to be determined. This is the portion of the original image that will be required to re-project the image into the current viewport.39 38 40 The original image (the portion required for the re-projection) will be divided into a grid of triangles representing the raster in its own coordinate system. Each point on the grid (representing the corners of the triangles) will be transformed into the target coordinate system, and the raster data within each triangle will be transformed appropriately to fit within the new geometry. 39 40 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 is the clipped image. Then we project the extents of the clipped image into the viewport's CS, and then 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 image will then be rendered using a transform created from the two triangle meshes. 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. 41 41 42 42 43 43 ||[[Image(raster_reprojection_viewport.PNG)]]|| 44 ||Figure 1. The blue grid of triangles represents the image. The thick black lines represent the viewport. On the left we have the original image in its own coordinate system with the viewport re-projected onto it. On the right we have the image re-projected into the viewport's coordinate system.||44 ||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 have the viewport. The blue On the right we have the image re-projected into the viewport's CS.|| 45 45 46 Each triangle will then be rendered into the output image to produce the transformed raster.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.46 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. 47 47 48 48 The category and setting names for this configuration are: 49 49 50 50 {{{ 51 [R asterReprojectionProperties]51 [RenderingServiceProperties] 52 52 # ***************************************************************************** 53 # R A S T E R R E P R O J E C T I O N P R O P E R T I E S53 # R E N D E R I N G S E R V I C E 54 54 # 55 55 # Property Name Description 56 56 # ----------------------------------------------------------------------------- 57 # TileSize Size of tilesin pixels57 # RasterGridSize Size of raster re-projection grid in pixels 58 58 # ***************************************************************************** 59 TileSize = 10059 RasterGridSize = 100 60 60 }}} 61 61 Descriptive error messages will be logged to handle invalid configuration settings, invalid data, unsupported transformations etc. … … 70 70 == Implications == 71 71 72 72 73 WMS is also a raster feature source and will be affected by this algorithm. 74 75 The AGG and DWF Renderers will support raster re-projection. 76 77 The GD Renderer is on hold pending RFC 52 - Remove GD Renderer. 73 78 74 79 == Test Plan ==