This project is read-only.

Re-Projection Behavior

Oct 22, 2011 at 9:40 PM

Hi DotSpatial team,

I have some suggestions how to improve the re-projection behavior of the DotSpatial map control.

1. In a default empty map the projection should be undefined.

2. User should be able to define the projection of an empty map by using the "Set Projection" dialog. This dialog is accessible by right-clicking on the "Map Layers" item in the legend.

3. If a layer is added to the map and the map projection is undefined, then the map projection is set to the projection of the dataset of the added layer.

4. If a layer is added to the map and the map projection is defined, then there are three use cases:

    4a) The projection of the layer is undefined - if Map.ProjectionModeDefine is Prompt or PromptOnce, then the "Invalid or Missing Projection" dialog is shown.

    4b) If he projection of the layer is defined and it is different from the current map projection, then the "Reproject Layer" dialog is shown.

    4c) The projection of the layer is defined and it is equivalent to the current map projection, then the layer is added to the map without any reprojection operation.

5. If the projection of the map is undefined, then the text of the map projection context menu is "Define Map Projection"

6. If the projection of the map is already defined, then the text of the map projection context menu becomes "Change Map Projection" or "Reproject All Layers".

7. Using the "Change Map Projection" dialog not only re-defines the map projection information, but it also tries to reproject all layers in the map. If the projection of a layer in the map is undefined, then a warning is displayed.

Please post your comments or suggestions on map reprojection behavior here.

Oct 24, 2011 at 2:32 PM

For long-term consideration, when/if we ever get large shapefile support ( see http://dotspatial.codeplex.com/workitem/277 ) built into the default implementation, we will likely want to implement on-the-fly reprojection at that point.  Reason is that it gets the shapes off disk instead of out of memory, so the shapes need to be reprojected as they are being drawn.

Kyle