0% found this document useful (0 votes)
174 views3 pages

Importing ArcView Grids to PCRaster

This document provides a 4-step tutorial for importing ArcView ascii grid maps into the PCRaster environmental modeling package: 1) Export the map from ArcGIS/ArcView as an ascii grid file. 2) Determine the PCRaster coordinate system values like y-coordinate of the upper left corner from the ascii grid file metadata. 3) Create a "clone map" in PCRaster that specifies the coordinate system and an appropriate value scale (scalar, ordinal, nominal, boolean). 4) Use the asc2map command to import the ascii grid file into PCRaster format using the clone map.

Uploaded by

hanjuang2004
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
174 views3 pages

Importing ArcView Grids to PCRaster

This document provides a 4-step tutorial for importing ArcView ascii grid maps into the PCRaster environmental modeling package: 1) Export the map from ArcGIS/ArcView as an ascii grid file. 2) Determine the PCRaster coordinate system values like y-coordinate of the upper left corner from the ascii grid file metadata. 3) Create a "clone map" in PCRaster that specifies the coordinate system and an appropriate value scale (scalar, ordinal, nominal, boolean). 4) Use the asc2map command to import the ascii grid file into PCRaster format using the clone map.

Uploaded by

hanjuang2004
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Quick start tutorial: importing ArcView ascii grid maps in PCRaster

Willem van Deursen March 8, 2004 PCRaster Environmental Software Carthago Consultancy Willem@[Link]

Introduction
This tutorial describes the process of importing ascii gridfiles from the ArcView and ArcGIS software into the PCRaster package. This tutorial is not intended to replace the manual pages, so for a detailed discussion on all options in the utilities described, see the manual pages on mapattr and asc2map.

General concepts of importing maps into PCRaster


Maps used in the PCRaster package need a description of geographic extent and valuescale. This information is stored in the header part of the PCRaster maps, and normally the user is not concerned with maintaining this information. However, when importing maps from other systems, one should be aware of these concepts. Geographic extent describes the location and extent of the map in a generic coordinate system. This generic coordinate system consists of: ? ? Coordinates of the UpperLeft corner of the PCRaster map; ? ? Number of rows, number of columns; ? ? Cell size; ? ? Projection system; in PCRaster terminology the definition of de direction of the Y-axis. In most geographic application the projection system should be defined as yb2t (y coordinates increasing from the bottom to the top of the raster). In rare occasions, such as small project areas with a local coordinate system, one might choose for a yt2b, (y coordinates increasing from top to bottom in the raster). Note that the coordinate system of most drawing programs, such as Paint, are defined according to this definition as yt2b (y coordinates increase from top to bottom). Valuescale is in PCRaster terminology the description of the interpretation of data in the map. The most important valuescales for this discussion are: ? ? boolean valuescale in which map data is interpreted as boolean values true or false; ? ? nominal and ordinal valuescales, in which map data is interpreted as ordered or unordered class values; ? ? scalar valuescale, in which map data is interpreted as numerical values, which can be used in map calculations. Although the information about geographic extent is available in the ArcView ascii grid files, ArcView uses the LowerLeft corner of the raster as definition of its geographic extent, while PCRaster uses UpperLeft corner. ArcView does not maintain and export information about the valuescale. Some steps are necessary to solve these mismatches. An example of the first few lines of an ArcView ascii grid file: ncols 488 nrows 690 xllcorner 289850 yllcorner 269850 cellsize 1000 NODATA_value -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 Importing ArcView maps into PCRaster is a four step process 1. Exporting the maps from the Arc8/ArcView software in the ascii grid format (see the manuals of the ArcGIS/ArcView software for details); 2. Determine yUL-coordinate (y-coordinate PCRaster Upper Left corner) from the ArcView yllcorner (ycoordinate of ArcView LowerLeft corner), nrows and cellsize values.

3. 4.

Create a PCRaster map with the needed coordinate system and the needed valuescale. This map will be used as clone map in the importing process. Use the asc2map command to import your ascii grid map into PCRaster format.

Export grid map from ArcGIS/ArcView software


Refer to your ArcView manuals or your ArcGIS manuals for information about how to export ascii-grids.

Determine PCRaster coordinate system from the ascii grid information


From the first few lines of the ascii grid file, determine yllcorner, nrows and cellsize. By multiplying the cellsize with nrow, and by adding this value to the yllcorner, you will obtain the value for the yUL-coordinate to be used by PCRaster. Using the example: ncols 488 nrows 690 xllcorner 289850 yllcorner 269850 cellsize 1000 NODATA_value -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 The formula to calculate yUL for PCRaster is: yUL = yllcorner + (nrows * cellsize) in the example yUL = 269850 + (690 * 1000) = 269850 + 690000 = 959850. Write down the values for nrows, yUL, cellsize, and also the values for xllcorner and ncols.

Create PCRaster clone map


In PCRaster terminology, a clonemap is a map that determines the coordinate system (and if need arise also the valuescale) in cases PCRaster has no way of abstraction this information from other PCRaster maps. In this case, we import from ArcView, and both coordinate system and valuescale are attributes that are to be read fr om the clonemap. Clonemaps are created with the mapattr program, but before you start this program, you first should make a decision about valuescale. Determining valuescale for the PCRaster clone map Valuescale is the mechanism PCRaster uses to determine allowed operators on maps. Maps that contain classvalues should not be used in calculations that add or multiply this maps with other numerical values. Maps that contain numerial values should not be used as ID-maps for lookup operations. The mechanism of PCRaster only works if the correct type is given to maps that are imported into PCRaster, and once maps are within the PCRaster system, PCRaster is able to determine valuescale for maps that are derived from known valuescales. You should create a: ? ? scalar clonemap if you ArcView gridfile contains numerical values that can be used in calculations. Examples include elevation grids, population density, rainfall etc. These grids with numerical values are sometimes referred to as fields. ? ? ordinal clonemap if your ArcView gridfile contains class values that have a natural and logical way of ordering. Examples are landsuitability maps, that contain classes as Low Potential, Medium Potential, High Potential. These classes do contain a natural order, and operations such as Potential >= Medium Potential are allowed on these maps; ? ? nominal clonemap if your ArcView gridfile contains class values for which no apparent order is defined. Examples are soil maps, in which you can order classes Sand,Clay,Loam in any order you want. Nominal data do not allow for operations such as Class1 > Sand; ? ? boolean clonemap if your ArcView gridfile contains only values of 0 and 1 (and additional NODATA values), to be interpreted as boolean values of FALSE and TRUE;

Creating the clonemap The clonemap is created using the mapattr mapname command. Replace mapname with the name of the map you are going to create, such as [Link]. Using this command, mapattr allows you to define the geographical extent and the valuescale of the map to be created. Mapattr is a so-called console program, and you have to use the up and down arrow-keys to select a variable to change. Once you select a variable, press return to activate the edit-mode of that variable and type in the value that you need, or use the left -and right arrow keys for selection of the options. See the mapattr manual for more information. Enter the values you wrote down for the number of rows, number of columns, x upperleft corner, y upperleft corner, cellsize. Choose the correct data type (=valuescale), using the rules described above. Make sure you set projection to y increases from bottom to top, since only in very rare cases you will want to leave the default value here. Once all correct values are entered, press the q-key to quit the program and press the y -key to actually create the clone map. Note that you can use any PCRaster map that contains the correct geographical extent and the correct valuescale as clonemap, so maps imported earlier can be used as clonemap for importing new maps. Note also that if you have a clone map (or any other PCRaster map) with the correct geographical extent, but an inappropriate valuescale, you can use the valuescale operators to create a correct one. Examples: pcrcalc myscalarclone. map = scalar([Link]) pcrcalc [Link] = nominal([Link]) etc.

Importing the ascii grid using the asc2map command


Once the clonemap is defined, you can import your ascii grid using the command asc2map a [Link] [Link] clone [Link] and replace [Link], MyMap and [Link] with the appropriate filenames. Your map has now been converted to PCRaster format. For more information on the process of importing maps, see the manual pages on mapattr and asc2map.

You might also like