Script to clip the unnecessary excess portions of an air photo mosaic

Below is a simple EASI script that when used with the MODEL command in PCI will clip the unnecessary excess portions of an air photo mosaic created from Ortho Engine to an irregular buffered shape around a set study area. This was originally created for PCI Geomatica v9.1 but was last tested and working with no problems in PCI Geomatica v10.0 – Just copy the code below into a blank text file and edit as needed.

!——————————————————————————————–

! Irregular_Polygon_Clip [bitmap_clip.eas]

! Ted MacKinnon – tmackinnon.com

! This simple script used with the MODEL command in PCI EASI

! will clip the unnecessary excess portions of an airphoto mosaic

! to an irregular buffered shape around the study area.

!

! The working file ‘working-file.pix’ has the existing

! mosaic image located in the first three channels,

! an existing irregular shaped polygon bitmap and

! three empty 8 bit channels.

!

! %%2 is the bitmap mask of the irregular shape

! %1, %2, %3 are the RGB existing image channels

! %4, %5, %6 will be the new modeled RGB image channels

! the RGB value of 255, 255, 255 will set the background to white

!

! Simply change the file name to use this script with a different

! file and ensure that the channels and segments are setup the same

!——————————————————————————————–

!——————————–

! Set up and run the model

!——————————–

MODEL ON “working-file.pix” OVER dbiw

if %%2 = 1 then

%4 = %1;

%5 = %2;

%6 = %3;

else

%4 = 255;

%5 = 255;

%6 = 255;

endif;

ENDMODEL

!———————————————-

! Export the resultant channels to a new file

!———————————————-

FILI = “working-file.pix

FILO = “mosaic_clipped.tif

DBIW =

DBIC = 4,5,6

DBIB =

DBVS =

DBLUT =

DBPCT =

FTYPE = “TIF

FOPTIONS = “”

RUN FEXPORT

!——————————————————————————————–

 

Color Shaded Relief Model – Gatineau, Quebec

This is one of several color shaded relief (CSR) models I created of Gatineau foot hills of Quebec. The city of Ottawa is featured in the national capital region near the bottom center of the image across the river just …

Color Shaded Relief Model of Vancouver Island

Color shaded relief (CSR) model created using a DEM of Vancouver Island, British Columbia using PCI Geomatica software. The …

Color Shaded Relief Models – Pointe Du Chene, New Brunswick

Color Shaded Relief Models of Pointe Du Chene, New BrunswickColor Shaded Relief Models of Pointe Du Chene, New Brunswick with flood
The above two images were created for my LIDAR flood modeling graduate research project. The first image is before the flood scenario; featuring a color shaded relief perspective view pointing south east from the Northumberland Strait landwards across the Pointe Du Chene wharf. The second image is of the same color shaded relief perspective view but features a 2.55 m flood level super imposed on top of it.

The 2.55 m flood level was an actual recorded storm surge water level that effected this area during a winter storm on January 2001. The two images below show the same flood level and area but from an overhead aerial view. The first image is with an orthophoto and the second image is with the color shaded relief.

Pointe Du Chene, New Brunswick with floodPointe Du Chene, New Brunswick with flood

Color Shaded Relief Model – Irvine, California

3D CSR Irvine California

The screen grab above was captured during the process of creating a color shaded relief model of Irvine, California. It was created in one of many demos I gave to clients while working for PCI Geomatics and was also used in the following tutorial that I created for the PCI geomatics website.

PCI Geomatics is a world leading developer of image centric geomatics software solutions. The PCI Geomatics flagship software, Geomatica, meets the growing demands of the remote sensing, GIS, cartography, and photogrammetry worlds. PCI Geomatics has long been recognized for offering high-value geomatics software solutions, advanced algorithms, excellent customer assistance, and product support for the widest range of spatial data formats in the industry.

Color Shaded Relief Model – Shediac, New Brunswick

Orthophoto & LIDAR CSR for New Brunswick

The two images above are of a portion of the small town of Shediac, New Brunswick. Each one is of the same spatial extent, however the one on the left is of an aerial photo of the town (1999) while the one on the right is a color shaded relief model created from high resolution LIDAR data (2003) using PCI Geomatica software. The LIDAR digital surface model (DSM) was part of a LIDAR flood modeling graduate research project.

Shediac is a small town located in eastern New Brunswick approximately 20 kilometers north of Moncton. The town calls itself the “Lobster Capital of the World”, hosts an annual lobster festival every July, and the world’s largest lobster sculpture is situated at the main entrance to town.

Cement Lobster in Shediac NewBrunswick Lobster Capital of the World

Color Shaded Relief Models – Bouctouche, New Brunswick

LIDAR 3D Surface of Bouctouche, New BrunswickCSR-LIDAR-overpass

The two images above represent artificial 3D perspective views from different points of origin featuring color shaded relief models that were created from high resolution LIDAR digital surface models as part of a LIDAR flood modeling graduate research project. The image on the left highlights a highway overpass while the image on the right features a residential area with a large school and a church easily detectable in the LIDAR all hits data set. Bouctouche is a small town located in eastern New Brunswick approximately 40 kilometers north of Moncton where the Bouctouche River meets the Northumberland Strait. It was an important aspect of the research study due to the extreme storm surge flooding that the region experiences every winter.

LIDAR surface modeling of Bouctouche New Brunswick

Digital Terrain Modeling – Aspect models

Real world example of slope and aspect

Aspect is measured in degrees (similar to a compass bearing) clockwise from magnetic north.In digital terrain modeling the Aspect of a surface refers to the direction (azimuth) to which a slope face is orientated. The aspect or orientation of a slope can produce very significant influences on it, so it is important to know the aspect of the plane as well as the slope. Together the slope combined with the aspect of the surface can virtually define the surface plane completely in digital terrain modeling.

Aspect is measured in degrees (similar to a compass bearing) clockwise from magnetic north. A surface with 0 degrees Aspect would represent a north direction, an east facing slope would be 90 degrees, a south facing slope would be 180 degrees and a west facing slope would be 270 degrees.

Aspect map derived from a digital elevation model of Lismore, Nova Scotia

The example shown to the left (for larger image click here) is a raster aspect model of Lismore, Nova Scotia was derived from a digital elevation model (DEM) calculated using PCI Geomatica remote sensing software. It is represented with a grey scale color ramp and helps to indicate what direction slope faces are orientated.

The image above is of an actual bedrock cliff with some technical information embedded onto the image to help better understand slope and aspect relationships. The black arrow represents the slope or the measured angle that the rock is dipping towards.

The aspect is the orientation that the arrow (slope) is pointing with respect to North, therefore the aspect for this slope would be in an easterly direction and often represented by 90 degrees. The blue arrows represent the X, Y and Z dimensions that the combination of both the slope and aspect would use to represent the terrain features.