English

How To: Shift the display so the View is centered on the Pacific Ocean

Procedure

Most of the projections of the world center the display on the Prime Meridian and so the Pacific Ocean is split. How can I make a map where the Pacific Ocean is the center, and the flat map is split at some longitude other than 180?

Cause:

ArcView centers its world projection displays on the Prime Meridian and the Equator. If you attempt to use the Projection Properties "Custom" section to change the central meridian parameter, you will notice that parameter only changes the central meridian for computing the projection, not for changing the center of the display to that meridian.

Answer:

It is not possible to change the center of the display using tools provided with ArcView's default interface; however, it is possible to accomplish this using Avenue. The "SetShift" Avenue request can be used to move the breakline for wrapping a world map on a flat surface.

The most important thing to keep in mind when using "SetShift" is to watch for polygon features which may be broken during the shift. Any polygons that are split will leak their fills and their borders across the display, giving poor results. The following illustrates this:

1) Open a new view and load the "cntry94" theme into it.

2) Go to View Properties and project the View into Plate-Carree, or Mercator, or another of the "flat" world projections.

3) Select all countries except for Greenland and Antarctica, converting this selected set to a new shapefile. Now you can see that the 30 degree West Longitude line runs pole-to-pole intersecting no polygons at all.

4) Delete the original cntry94 theme.

5) Open a new script editor window and enter the following:

theView = av.GetProject.FindDoc("<nameofyourView")
theView.GetProjection.SetShift(150)
theView.Invalidate

6) The positive number "150" shifts the map 150 degrees to the west. Now you see a view where the Pacific Ocean is very near the center of the map. The desired shift works fine.

7) Edit the script changing the "150" to "90", and run the script again. Since shifting the display 90 degrees west splits Canada and the US, the results are poor. Change it back to 150, and run it again.

8) Because "SetShift" requires that the shift not split any features, you'll need to find a longitudal line that does not cross any features, and shift your display to that. Since the world map does not have any "clear" longitudes, other than on the Pacific, We had to sacrifice Greenland and Antarctica, in order to "clear" the 30 degree West longitude. Experiment with this find the
best results.

Polygons and polylines which are split across the horizon when "aPrj.SetShift" is used cause the features and the fills to streak across the view display screen. This is because the default DisplayQuality parameter for the "Prj" class is #PRJ_DISPLAYQUALITY_FAST.

The inability of the horizon-split polygons to draw and fill properly should be fixed with the enumerator parameter #PRJ_DISPLAYQUALITY_CLIPPED. Once this parameter has been implemented for use as the DisplayQuality parameter for the
request "aPrj.SetDisplayQuality", then the "SetShift" request should work fine, regardless of whether or not features are split across the horizon.

If you need this ability to shift often, you can put the above short script onto a button or menu item on the View GUI. Perhaps modify the script this way:

shiftAmount = MsgBox.Input("Enter amount of lateral shift","","")
theView = av.GetProject.FindDoc("<nameofyourView")
theView.GetProjection.SetShift(shiftAmount.AsNumber)
theView.Invalidate

Notes:

For details on using "SetShift" see the online help.