Menu
Billy Noble, Applications Specialist at Blue Marble Geographics, answers questions that come into the technical support inbox. In this video, Billy demonstrates how to maintain the colors of a point cloud when converting it from a LAS format to a GeoTIFF in Global Mapper. The classic BlueMarble photo of Earth was taken by the crew of Apollo 17 on their way to the moon in 1972. In 2002 NASA released an updated version suitable for GIS created by a mosaic of satellite images with the clouds removed. In 2005 this was rereleased, with a separate image provided for each month of the previous year.
NCL Home>Application examples>Data sets ||Data files for some examples
Example pages containing:tips |resources | functions/procedures This page describes various ways to create topographic maps,either by reading them from a binary or NetCDF file, or byimporting an existing JPEG image and recreating it.
You can find many free topographic maps (as datasets or images) on theweb, including a good site from NOAA:
http://www.ngdc.noaa.gov/mgg/topo/topo.html
There are some high-resolution images available via Nasa's Blue Marble imagery and the 3rd party True Marble:
http://earthobservatory.nasa.gov/Features/BlueMarble/?src=ve
http://www.unearthedoutdoors.net/global_data/true_marble/download Importing JPEG images
Importing JPEG images into NCL requires converting the JPEG image to aNetCDF file. We use a free tool called 'gdal_translate', which is partof the GDAL - Geospatial DataAbstraction software package.
You can downloadprecompiledbinaries for Linux and Mac, or you can downloadthe sourcecode and build it yourself.
Building from source requires that you build GDAL with NetCDF support:
/path/for/install and /path/to/netcdf are justplaceholders. You need to replace them with the appropriate paths.
topo_1.nclThis script draws a (now deprecated) 5' topographic map using binary datadownloaded from http://www.ngdc.noaa.gov/mgg/global/relief/ETOPO5/TOPO/ETOPO5/
This binary file doesn't contain any latitude/longitude values, sothese arrays have to be generated in the script. The data comes witha gooddescription of how to read it and create the lat/lon arrays.
The default NCL color map is used just to quickly show what the data looks like.
topo_2.nclThis script uses the same data as the previous example, exceptit uses a custom color map. The labelbar is labeled using min/maxlabels, and a middle level to indicate where the color map wassplit between ocean and land values.
topo_3.nclThis script draws a (now deprecated) 2' topographic map using NetCDF datadownloaded from http://www.ngdc.noaa.gov/mgg/fliers/01mgg04.html
The cnFillMode resource is set to 'MeshFill' for faster plotting. The default 'AreaFill' is too slow.
The data are of type 'short' with scale_factor and add_offsetattributes; the short2fltfunction is used to unpack the values into a float type.
All elevation values less than -100 are set to missing so there areeffectively no contours over the ocean. The ocean is filled in with alight blue.
topo_4.nclThis script draws a topographic map from the same 2' data as the previousexample, except it zooms in on Australia and New Zealand. 'RasterFill' is used in place of 'MeshFill' for comparison.
topo_5.nclThis script draws a subset of 1' topographic map using NetCDF datadownloaded fromhttp://www.ngdc.noaa.gov/mgg/global/relief/ETOPO1/data/bedrock/cell_registered/netcdf/.
Two plots are created in a panel: one showing land elevation values, and oneshowing ocean elevation values.
topo_6.nclThis script draws a topographic map from the same 1' data as the previousexample, except it zooms in on Poland, and uses shapefiledata from gadm.org/countryto attach the province outlines for Poland.
The color table and levels used were read from a file found at:http://netgis.geo.uw.edu.pl/srtm/wizualizacja.shtmlThe file can be downloaded here.
A different colormap is used for dbz, just to show how you can dothis. If you set ANIMATE to True, then the script will loop acrossall levels.
topo_raster_7.nclThis example is almost identical to topo_7.nclabove except the reflectivity values are drawn as raster filledcontours instead of smooth contours. The point of this example is toillustrate a quirk of using raster fill with transparency. In orderto get transparency with raster fill and RGBA values,it's not enough to simply set the alpha value to 0.0. You mustalso set the color to black as well:
topo_8.nclThis script draws a topographic map of Colorado using from 2' data. Ashapefile downloadedfrom http://www.nws.noaa.gov/geodata/catalog/hydro/html/rivers.htmis used to draw the rivers of Colorado.
topo_9.nclThis script is based on the 'newcolor_11.ncl' scripton the New color capabilitiespage. It shows how to use NCL to recreate an existing JPEG that contains a topographic map. By doing this, you can then change the map projection,zoom in on it, and/or overlay primitives, as we did here with a red box.
The open source tool gdal_translate wasused to convert the jpeg file to a NetCDF file:
This example only works for 'x11' or 'png' output, and not with'ps' and 'pdf' output.
panel_31.ncl: This example showshow to panel vector plots overlaid on topographic maps, and thendraw only one vector reference annotation box.
The vector reference annotation box is turned off for all plots exceptthe lower rightmost one, by settingres@vcRefAnnoOn = False for all butthat one plot. The box is moved to the outside right of that plot bysetting res@vcRefAnnoParallelPosF.
The topographic map is created by reading in a JPEG image. See examplenewcolor_11.ncl on the RGBA page.This image can be slow to create, so set TOPO_MAP to False in thescript if you just want to generate a generic NCL map object (see second thumbnail).
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |