creating a subset data

Embed Size (px)

Citation preview

  • 8/14/2019 creating a subset data

    1/5

    Creating an Elevation Subset - page 1

    Copyright 1998 Environmental Systems Research Institute, Inc.http://www.esri.com/base/markets/k-12/k-12.html

    Creating a Subset of Elevation Data

    The Spatial Analyst CD contains wonderful elevation data for all of North America, all of

    Africa, and all of Eurasia. Suppose you want only a small portion of that, like just the state ofTexas. No sense using all of North America when you only want one state. Simple process: Just

    subset the data.

    Actually, you can create a subset of any gridded data set which can be displayed in ArcViewwith Spatial Analyst. The procedure is commonly of interest when working with elevation data

    for a large area, but would apply equally to other gridded data sets such as temperature,population density, or landcover.

    Once you've created this subset, you can also reclassify it and convert the reclassified version

    into shapes, which makes it easier to bring the data into views of a different projection, or intocomputers that do not have Spatial Analyst.

    This exercise will walk through the procedure for creating a subset of just Texas from the NorthAmerica elevation data on the Spatial Analyst CD, then turning that subset into shapes.

    To do this exercise, you need:

    ArcView 3.0a or higher for Windows95 or WindowsNT or Unix, installed Spatial Analyst for Windows95/NT or Unix, installed North America elevation data from the Spatial Analyst CD Detailed Texas polygon, from administrative boundaries from "ESRI Data & Maps volume

    1," or from "ArcWorld Supplement," or from ArcUSA 1:2M

    Plenty of "swap space" for creation of temporary gridsBasic instructions:

    ALL CLICKS ARE "SINGLE CLICK" UNLESS NOTED AS "DOUBLE CLICK." "Make active" = focus the computer's attention on a theme by clicking one time directly on the name of

    a theme, so it looks "raised" in the list.

    "Turn on/off" = click one time in the check box to the left of the theme name, making a check markappear/disappear, so the theme displays or does not display in the map.

  • 8/14/2019 creating a subset data

    2/5

    Creating an Elevation Subset - page 2

    Copyright 1998 Environmental Systems Research Institute, Inc.http://www.esri.com/base/markets/k-12/k-12.html

    PART 1: Setting Up the Procedure1. Engage ArcView and load the Spatial Analyst extension.2. Create a new view.3. Add the North America elevation data from the Spatial Analyst CD (typically,

    d:\data\north_am\na_dem). Be sure to set the "Data Source Type" as "Grid Data

    Source" in the Add Theme window.4. Change the projection to match the data. Choose View/Properties, then Projection, then

    Custom, then select "Lambert Equal Area Azimuthal." Set the "Central Meridian" at"-100.00" and "Reference Latitude" at "45.00". (Be sure to click back and forth in these two

    boxes once or twice, to make sure the numbers get "registered."). Back in the view, turn onthe theme NA_DEM.

    5. Add a polygon theme containing a detailed boundary for Texas, using one of these threeoptions:

    Esridata\world\admin95\admin95.shp (this exercise uses this choice) Aw_supp\shapes\world\admin.shp Arcusa\arcusa_d\usa_2mg\st2m

    6. Turn on the polygon theme and check to see that the polygons for North America match wellwith the theme NA_DEM.

    7. Query the polygon theme to select all shapes which contain the name "Texas". Using theESRIDATA example, the expression would be

    "Admin_name" = "Texas"8. With polygon(s) selected, use Theme/Convert to Shapefile to create a new shapefile for just

    Texas. Name this shape TX_POLY. Add this new theme to the view.9. Turn on TX_POLY and make sure it draws properly. If it does not, back up and try again,

    starting at Step#4.10.Delete from the view the polygon theme that was the source for TX_POLY. Make active

    TX_POLY and zoom to the selected theme.

    11.Save the project.PART 2: Slicing Out the Desired Data12.In the Analysis menu, set the Analysis Properties as follows:

    Extent: Same as Tx_poly.shp Analysis Cell Size: Same as Na_dem Analysis Mask: No Mask Set

    13.With TX_POLY.SHP as the active theme, choose Theme/Convert to Grid. Call this newtheme TX_GRID. In the Conversion Field dialogue box that appears, choose something

    which will have the same value across the state, such as "Admin_name". When ArcView

    asks if you want to join attributes, select "No". When ArcView asks if you want to add thetheme to the view, select "Yes."

    14.Turn on the new grid theme TX_GRID. This will become the "cookie cutter" that will beused to subset the elevation data.

  • 8/14/2019 creating a subset data

    3/5

    Creating an Elevation Subset - page 3

    Copyright 1998 Environmental Systems Research Institute, Inc.http://www.esri.com/base/markets/k-12/k-12.html

    15.In the Analysis menu, set the Analysis Properties as follows: Extent: Same as Tx_poly.shp Analysis Cell Size: Same as Na_dem Analysis Mask: Tx_grid

    16.Make active the NA_DEM theme. Choose the Analysis/Map Calculator item. In the left-hand box of the Map Calculator window, double-click the layer "Na_dem", which will copythis item into the box at the bottom of the window. (DO NOT use "Na_dem.Count"). Don't

    make any other changes to this window. Move the window so that you can see the status barat the bottom of the ArcView application window. Click the "Evaluate" button at the bottom

    of the Map Calculator window. ArcView will now begin to cut out of the NA_DEM themejust the Texas portion, which may take a minute. You should see a blue "progress bar"

    inching across the ArcView status bar. When the process is complete, you should see a newtheme in the view's contents, called Map Calculation 1. Close the Map Calculator window.

    17.Turn on the new theme. It should draw directly on top of the existing map of Texas.18.Save the project.

    PART 3: Re-classifying data.19.Map Calculation 1 has a new data range, from 0-2558 meters (or thereabouts). Engage the

    Legend Editor (double-click the theme) to edit the legend, as follows.

    20.Change Classification to 13 classes, and type in the values as follows: 0-25 25-50 50-100 100-150 150-200 200-300 300-400 400-600 600-800 800-1000 1000-1500 1500-2000 2000-2600

    21.Change the colors as follows. Set the 2000-2600 as deep brick red. Set 0-25 as deep forest green. Set 300-400 as bright yellow, and leave this item highlighted. Click the "ramp colors" button (far right end of the Legend Editor buttons, above the

    choices for color schemes). With the 300-400 item "highlighted", ArcView will ramp

    from deep green to yellow, then yellow to brick red.22.Apply the change.

  • 8/14/2019 creating a subset data

    4/5

    Creating an Elevation Subset - page 4

    Copyright 1998 Environmental Systems Research Institute, Inc.http://www.esri.com/base/markets/k-12/k-12.html

    23.With Map Calculation 1 as the active theme, choose Analysis/Reclassify, and construct anew classification scheme, as follows.a) Click the Classify button and create a new set with 13 numbers.b) In the "Old Values" column, type in the values used in Step#20 above. Leave the "New

    Values" going from 1 through 13.

    c)

    Click "OK" and ArcView will create a new set of data called Reclass of MapCalculation 1.23.Double-click the new theme and change its legend, as follows:

    a) Change the Legend Type to Graduated Color.b) Change the Classification Field to Value.c) Hit the Classify button and choose 13 classes, by equal interval.d) Change the items in the LABEL field (NOT in the "Value" field) using the 13 classes

    employed above.

    e) Change the colors using the green to yellow to red scheme above.f) Apply the changes.

    24.Save the project.

    PART 4. Creating Elevation Shapes25.Using the Identify tool on any cell in the NA_DEM or Map Calculation 1 themes would

    give a value showing the elevation for that one cell. Doing a similar identify in the Reclass ofMap Calculation 1 theme shows a value of from 1-13, meaning only a more general zone

    instead of a specific elevation. Now that there are discrete zones, each with a distinctelevation range, these zones can be converted into polygons. These polygons can then be

    brought into other views where a different projection is in place, or to computers whereSpatial Analyst is not available.

    26.Make Reclass of Map Calculation 1 the active theme. Choose Theme/Convert ToShapefile. Call the new theme TX_ELEV.SHP. ArcView will create the new theme, whichwill take a minute or two, and the status bar will run through three blue progress bars insuccession. When complete, add the theme to the view.

    27.Turn on the new theme, TX_ELEV.SHP. Double-click the new theme and change thelegend, as follows.

    a) Change the Legend Type to Graduated Color.b) Change the Classification Field to Gridcode.c) Hit the Classify button and choose 13 classes by equal interval.d) Change the items in the LABEL field (not in the "Value" field) using the 13 classes

    employed above.e) Change the colors using the green to yellow to red scheme above.f)

    Change all the symbols so that they use no outline.g) Save the legend in the same directory where the shape is stored, and call the legendTX_ELEV.AVL.

    h) Apply the changes.

  • 8/14/2019 creating a subset data

    5/5

    Creating an Elevation Subset - page 5

    Copyright 1998 Environmental Systems Research Institute, Inc.http://www.esri.com/base/markets/k-12/k-12.html

    28.Make the elevation data draw more quickly by creating a "Spatial Index", as follows:a) Open the theme table for TX_ELEV.SHP.b) Click one time on the title of the field called "Shape."c) Choose Field/Create Index.d) Close the theme table.

    29.Test the result by copying this theme and pasting it into a new view with a differentprojection. The data should still be readable, as the elevation shapes just created are stored in

    decimal degree fashion.30.Save the project.

    In the future, you can engage the theme TX_ELEV.SHP, load the legend TX_ELEV.AVL, andit will appear just as you have saved it here.