
NCL > Application examples > Basic examples
MapPlot example 7
How to draw high-resolution coastlines using the RANGS/GSHHS database
This map example was created using HLU C library calls, HLU FORTRAN library calls, and NCL. It demonstrates how to generate high-resolution map coastlines using the RANGS (Regionally Accessible Nested Global Shorelines), developed by Rainer Feistel from Wessel and Smith's GSHHS (Global Self-consistent Hierarchical High-resolution Shoreline) database.For information on how to download and install the RANGS database, click here.
The names of the source files for this example are mp07c.c, mp07f.f, and mp07n.ncl.

Discussion
This module discusses how to create this example using HLU function
calls and a resource file. The program draws a map area first using
the default database, and then it draws the same area using the
RANGS/GSHHS database. This example also shows how to automatically
have your map lat/lon lines labeled.A detailed discussion of how this example works appears in its source code.
Creating the plot using HLU C library calls
The HLU C program that generates this plot is called mp07c.c.
Creating the plot using HLU FORTRAN library calls
The HLU FORTRAN program that generates this plot is called mp07f.f.
Creating the plot using NCL
The NCL script that generates this plot is called mp07n.ncl.
The data
This plot does not use any external data.
How to run this example
First, please see note above.The examples are installed in the following locations:
- $NCARG_ROOT/lib/ncarg/hluex/mapplot/mp07c.c
- $NCARG_ROOT/lib/ncarg/hluex/mapplot/mp07f.f
- $NCARG_ROOT/lib/ncarg/nclex/mapplot/mp07n.ncl