Example: Change Projection of an Image

 

Example: Change Projection of an Image

In this example we use the Change Coordinate System command to change the projection of an image from Latitude / Longitude to a custom Orthographic coordinate system centered on Florida.  The image shows raster data showing terrain elevations in a region of Florida.

 

eg_change_proj_image01_01.png

 

We start with the raster data opened in an image window, as seen above.   The data was imported from a format that correctly specified Latitude / Longitude with WGS 84 base as the projection.    We will re-project the data into Orthographic projection centered up Florida.

 

eg_change_proj_image01_00.png

 

With the focus on the opened Florida image, in the Contents pane click the coordinate system picker button for the Florida layer.

 

eg_change_proj_image01_00a.png

 

 We choose Change Coordinate System.    Manifold uses the terms coordinate system and projection interchangeably as synonyms.  

 

eg_change_proj_image01_02.png

 

In the Change Coordinate System dialog we click the coordinate system picker button.  

 

eg_change_proj_image01_02a.png

 

In this example, we will specify a custom coordinate system, so we choose Edit Coordinate System to choose a new coordinate system.  

 

If we wanted to choose one of the listed favorites we could simply click on the favorite desired.  Manifold offers two favorites by default, the Latitude / Longitude coordinate system and the Pseudo-Mercator coordinate system.   Any additional favorites we have added will appear in that list as well.   

 

If we would like to add to the favorites list, we could click on Edit Favorites.

 

eg_change_proj_image01_03.png

 

Orthographic projection is readily available in the staggeringly long list of coordinate systems listed in the Standard tab,  literally thousands of them.    

 

What is commonly referred to as "Orthographic" is really an infinity of different versions of Orthographic, each of which is centered upon some particular latitude and longitude.   The "Orthographic" listed in the Standard tab is centered at 0 latitude and 0 longitude, which is useful only if we wish to create an azimuthal map centered just off the coast of Africa.  

 

Our task is to define an Orthographic centered upon a particular latitude and longitude that is approximately the center of Florida.   That is easy to do using a Custom projection: we will click the Custom tab.

 

eg_change_proj_image01_04.png

 

The tab launches with the current coordinate system loaded.   Orthographic is found in the list of coordinate systems in the Type box.

 

eg_change_proj_image01_05.png

 

We pull down the list and choose Orthographic.

 

eg_change_proj_image01_06.png

 

We enter a new name, Florida Orthographic, and we enter 29 for the Center latitude and -82 for the Center longitude.    

 

eg_change_proj_image01_06b.png

 

The location at 29 degrees North and 82 degrees West is close enough to the center of Florida for our purposes.  We can get that number by hovering the mouse cursor over the center of Florida on any map or display in Manifold.  Orthographic projects the entire hemisphere of the Earth so any center value anywhere near Florida is good enough to provide a nice display of what we would see if we were hovering above the state on the edge of space and looking down at Florida.  

 

The Name we have specified has no special meaning other than reminding us how we have specified this particular coordinate system.    A good name can help us remember what it is if we choose to add it to our Favorites.   We press OK.

 

eg_change_proj_image01_07.png

 

That closes the Coordinate System sub-dialog and puts us back in the Change Coordinate System dialog where now we see a Custom Coordinate System has been chosen.

 

Reprojecting an image means changing the dimensions and numbers of pixels so the only option is to Add Component, that is, to create a new image and table in the Project that are a copy of the subject image, but re-projected into the new coordinate system.   See the Re-Projection Creates a New Image topic for why re-projecting an image changes the number of pixels.

 

eg_change_proj_image01_08.png

 

The result is that a new image, called Florida 2 is created in the Project along with a new table, Florida Table 2, that stores the tiles for the new image.

 

eg_change_proj_image01_09.png

 

If we click open the new image we see it is as yet not styled.  That's easy to fix.  We could either open the Style panel and style the image, or we can simply copy and paste the styling from the original Florida image into the new Florida 2 image in the mfd_meta table.  

 

We can do that using the procedures shown in the Example: Style Properties in the mfd_meta Table  topic to copy the value of the StylePixel property from the Florida StylePixel record to the Florida 2 StylePixel record in the mfd_meta table.

 

eg_change_proj_image01_10.png

 

There... that's better!

 

Notes

 

Image Size - When changing the projection of images Manifold will choose a new size for the re-projected image that approximates the size of the original while providing enough room for necessary pixel interpolations.   See the discussion in the Re-Projection Creates a New Image topic.

 

About that Copy and Pasting of Style - The workflow above mentions using copy and paste to transfer Style from the Florida image to the new Florida 2.  How did we do that?   Experienced Manifold operators will often just copy and paste the StylePixel value from one image to another in the mfd_meta table, as illustrated in the Style: Palettes  topic's discussion of the StylePixel Property.

 

eg_change_proj_image01_11.png

In this particular example we opened the mfd_meta table, and copied the value of the StylePIxel property for Florida.   Since Florida 2 was as yet totally unstyled it had no StylePixel property.  We could have applied a simple style and then copied and pasted the StylePixel value, but instead it was quicker to just add a new row, the last row seen above with a Name of Florida 2, a Property of StylePixel and then pasting the value we previously copied.  Like magic, the image immediately updates to use the new Style.

 

See the Example: Style Properties in the mfd_meta Table  topic for an analogous example using drawings.

 

That is only part of Florida - The image called Florida might seem to be the entire state, but it is just an accident of terrain that the long feature is similar to the shape of the Florida peninsula.   If we create a new data source that is an imageserver and then show the Florida terrain image overlaid as a layer in a map with Bing, we see that it shows a region in central Florida.

 

eg_change_proj_image01_12.png

 

The light gray feature branching from the lower left corner towards the center is the depression of the Peace River drainage basin, extending to the Northeast from Port Charlotte and Punta Gorda.    The brighter colors show slightly elevated terrain that forms a low ridge to the Northwest of Lake Okeechobee.

 

Videos

Manifold 9 - Re-Project a Shapefile  - New coordinate system dialogs make it easier than ever to re-project data, often in only one click. This video shows how to import a shapefile and then rapidly re-project it into different coordinate systems. We then show how maps re-project their contents on the fly for display and how to exploit that to rapidly show data in different projections.

 

See Also

Projections

 

Assign Initial Coordinate System

 

Change Coordinate System

 

Map Projection

 

Favorite Coordinate Systems

 

Favorite Base Coordinate Systems

 

Example: Re-project a Drawing - An essential example on changing the projection of a drawing, either within the drawing itself, or by changing the projection of a map window that shows the drawing and re-projects on the fly for display.

 

Example: Adding a Favorite Coordinate System - Step by step example showing how to add a frequently used coordinate system to the Favorites system.

 

Example: Style Properties in the mfd_meta Table

 

Re-Projection Creates a New Image - Why changing the projection of an image creates a new image.

 

About Coordinate Systems

 

Projections Tutorial