HOW TO

Shift the display so the view is centered on the Pacific Ocean

Last Published: July 16, 2020

Procedure

Note:
The information in this article applies to ArcView GIS versions 3.x only. The instructions described apply to the Avenue programming language, which is specific to the ArcView GIS application.

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

ArcView centers its world projection displays on the Prime Meridian and the Equator. When using the Projection Properties 'Custom' section to change the central meridian parameter, the parameter only changes the central meridian computing the projection, not the center of the display to that meridian.

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 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 that may be broken during the shift. Split polygons leak their fills and borders across the display, rendering 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 Greenland and the Antarctica, converting this selected set to a new shapefile. The 30-degree West longitude line runs pole-to-pole, and does not intersect any polygon.
  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
  1. The positive number '150' shifts the map 150 degrees West, and the view shows the Pacific Ocean is near the center of the map.
  2. Edit the script, changing '150' to '90', and running the script once more. Shifting the display 90 degrees West splits Canada and the US, and the results are poor. Therefore, change it back to 150, and run it again.
Note: 
Because 'SetShift' requires that the shift not split any features, find a longitudal line that does not cross any feature, and shift the display to that. Since the world map does not have any 'clear' longitudes, other than on the Pacific, Greenland and the Antarctica are left out to clear the 30-degree West longitude. Experiment with this to find the best results.

  1. Polygons and polylines that are split across the horizon when 'aPrj.SetShift' is used cause the features and 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 must be fixed with the enumerator parameter #PRJ_DISPLAYQUALITY_CLIPPED. Once this parameter is implemented for use as the DisplayQuality parameter for the 'aPrj.SetDisplayQuality' request, the 'SetShift' request works as expected, regardless of whether or not features are split across the horizon.

If this ability to shift is required often, place the above short script onto a button or menu item on the View GUI. Modify the script this way:

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

Article ID:000001508

Software:
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic