Welcome to the Department of Pesticide Regulation
 Back to GIS and Permit/Use Mapping Development

16th Annual Golden State Agricultural Commissioner's
and Sealer's Computer Conference
ArcView--How to...
October 18-20, 2000

  1. How to use the spatial component of exiting permit and use report data.
    Existing permit and use report data can be represented spatially using the section as a geographic unit. Permit and use report data can be linked to PLSNet data attributes, to display commodity distribution, pesticide use, etc, by section.
    1.1 PLSNet data
    • This is a Township/Range/Section database developed from existing surveyed section lines to provide a complete coverage of California for pesticide use reporting. Distributed by county as PLSxx.shp, where xx is the county number, (e.g. 01 = Alameda).
    • PLSNet data is used for Endangered Species and PMZ data. It can also be used to display and analyze current permit and use report data that are reported by section.
    • In ArcView, displaying PLSNet data as a grid instead of a polygon may improve clarity. Pls.avl is a legend developed specifically for this purpose.
    • ArcView Tip! You can create a custom legend for a theme by saving it as the same name of the theme. For example, a customized legend for the theme PLS01.shp would be called PLS01.avl. The legend is stored in the same location as the .shp,.dbf. and .shx file. Each time the PLS01 theme is loaded into a view, it is rendered using the customized legend. However, once in the view, the theme's legend can be changed using the Legend Editor.
    • Both of DPR's Endangered Species (ES) data and PMZ data are section-based databases. To perform spatial analyses the data must be related to the PLSNet spatial data.
    • In both datasets there are situations where there may be more than one ES or PMZ in a single section, creating a many-to-one relationship. Therefore, the ES and PMZ data must be linked to the PLS and not joined.
    • The common field for linking the ES or PMZ data to the attributes of PLS is COMTRS.
      1. Add the PLS theme to a view and open the theme table ("attributes of PLS").
      2. Add the ES or PMZ data to the project.
      3. Highlight the ES or PMZ field COMTRS.
      4. Highlight the "attributes of PLS" field COMTRS.
      5. Make one of the tables active and link the tables using the Table/Link menu choice.
      6. To achieve two-way linking, make the other table active and link the tables again using the Table/Link menu choice.
      7. Now you can query the ES or PMZ table and see the sections highlighted in the view, or select sections in the view and examine the ES or PMZ table for possible candidates.
    1.2 Relating Permit and User report data to the PLSNet.
    • Currently all permit and use report data has a spatial component--the section. Using PLSNet data it is possible to display and analyze permit and use report data spatially.
    • Firstly, until such time as the permit and use reporting program structures are modified, it will be necessary to create a concatenated "MTRS" field in these tables. This can be done in a number of ways, e.g. using a relational database program, a spreadsheet program, etc. Here is how to it can be done in ArcView, using the Part B table as an example:
      1. Export Part B from DataFlex into a comma delimited, ASCII text file. You may need to insert a list of column headings at the top of the file using a text editor. The column headings should be in the following format:
        "Permit", "site", "comm_code", "Township",...
      2. Add the text file to the project, making sure that the file type in the Add Table dialog box is set to delimited text.
      3. The PartB.txt table that is now part of the project, is really a virtual representation of the text file and, as such, cannot be edited within ArcView. A dBase copy must be made. To do this, choose File/Export in the Table GUI. The virtual text table will be exported to PartB.dbf. Now add PartB.dbf to the project.
      4. Start editing the PartB.dbf table by choosing Table/Start Editing.
      5. Create a new field by choosing Edit/New Field. Set the following properties:
        Name : MTRS
        Type : string
        Length : 9
      6. Use the Calculator to fill the new field with values. Highlight the MTRS field and click the Calculator button. Enter the following statement into the Calculator Dialog box by selecting the appropriate fields from the fields list on the left-hand side (field names may differ from those used in this example):
        [bas_mer_l] + [Township] + [Range] + [Section].AsString
        This will calculate the MTRS for all the fields. However, the sections which are numbered <10 will be formatted incorrectly, because the leading zero will have been omitted. To rectify this, perform the following steps:
        1. Open the Query Builder and perform the following query:
          ( [Section] < 10 )
        2. With the records selected go back to the Calculator and enter the following calculation:
          [bas_mer_l] + [Township] + [Range] + "0" + [Section].AsString
        The records containing sections which are numbered < 10 will be updated to include the leading zero.
      7. Stop editing the table and save the changes.
    • Now the PartB table can be attached to the PLS spatial data. In most cases there will be more than one permitted site in each section, and so the PartB table and the PLS data form a many-to-one relationship and must be linked.
      1. Highlight the MTRS filed in the PartB table and in the "attributes of PLS" table.
      2. Make one of the tables active and link the tables using the "Table/Link" menu choice.
      3. To achieve two-way linking, make the other table active and link the tables again using the Table/Link menu choice.
    • Here are some examples of spatial analysis that can be performed once the PartB or PUR table has been linked to the PLS spatial data. Open the Query Builder for the PartB (or PUR) table:
      1. Query to display the sections in which a particular commodity was grown--
        [Commodity] = "*tomato*"       * = wildcard
      2. Query to display all sections containing sites permitted to a particular permittee--
        [Permit] = "060033"
      3. Query to display sections in which certain pesticides have been used--
        [Chemname] = "*Lindane*"
    • The PartB or PUR table can also be queried by selecting PLS sections in the view. Records in the PartB or PUR tables linked to the selected sections will be highlighted.
    • The PartA table can be joined to the PartB or PUR tables through the common field Permit because these tables have a one-to-one or one-to-many relationship. Queries of PartB or the PUR can now yield the permittee's name and address. The menu choice Table/Create a report allows the user to generate reports using Crystal Reports, which is provided with the ArcView software.
    • Use Layouts to generate maps.
  2. How mapping individual permitted field sites enhances analytical capabilities.
    • Each permitted site is uniquely identified in a field border database (e.g. cropsites.shp) and is related by a one-to-one relationship with the PartB table. Concatenating the permit number and the site ID is one way to create a unique identifier (pmtsiteid).
      e.g.--
      Permit Number.....10 2000 10 00001
      Site ID...........Site 1A
      Pmtsiteid.........1020001000001site1a
      In order to relate the crop sites shapefile to the permit and use report data, it will be necessary to create new fields in the PartB and PUR tables containing the pmtsiteid information. To do this, follow steps 1--4 in ArcView I-Section 2 that describe how to add a new field to the PartB table. Then:
      1. Create a new field by choosing Edit/New Field. Set the following properties:
        Name : pmtsiteid
        Type : string
        Length : 21
      2. Use the Calculator to fill the new field with values. Highlight the "pmtsiteid" field and click the Calculator button. Enter the following statement into the Calculator Dialog box by selecting the appropriate fields from the fields list on the left-hand side (field names may differ from those used in this example):
        [permit] + [site]
    • An alternative approach is to use a unique sequential numbering scheme to identify each of the polygon shapes, which can then be related to the permit and use reports using the same unique id in the permit and use report tables.
    • The PartB table can now be joined to the "attributes of crop sites" table using "pmtsiteid" or any other unique id that is common to both tables, and then the PartA table can be joined through the "permit" field. Here are some examples of queries that can be performed:
      1. Query PartB table to display the crop sites in which a particular commodity was permitted--
        [Commodity] = "*cotton*"        * = wildcard (example)
      2. Query PartA table to display all registered sites of a particular permit holder--
        [Permitee] = "A. Grower"       (example)
  3. How to use spatial methodology to solve problems geographically.
    • Identification of individual field sites allows the user to pick a specific site and determine the environmental and other agricultural conditions that surround it. The following scenarios have been designed to demonstrate these concepts:
    Scenario I--A pest that inhabits alfalfa can be seriously damaging to almonds. The pest migrates to any almond orchard once the alfalfa is cut. Question--How does one identify almond orchards that are within a certain radius of a targeted alfalfa field?
      1. PartB and PartA tables should be joined, and the PUR Table linked to the "Attributes of Crop Sites".
      2. Make sure the View/Properties have been set to show the correct Map Units (meters for UTM and Albers, feet for State Plane) and Display Units (usually miles--sometimes feet).
      3. Make the "crop sites" theme active, and identify the alfalfa parcel(s) of concern either visually, by using the Query Builder, or the Find Button. Zoom into the selected parcel(s)'s location.
      4. Use the Theme/Create Buffers menu choice to generate a buffer graphic around the selected field site (e.g. 0.5 miles).
      5. Select the graphic and use the Select Features Using Graphic Button to select all the surrounding crop sites within a radius of 0.5 mile.
      6. Open the PUR table and activate the Query Builder. Perform the following query:
        ([Commodity] = "*almond*")
        and choose Select From Set to perform the query only on those records that have already been selected using the buffer.
      7. The selected records will be highlighted in the "Attributes of Crop Sites" table, and can be formatted into a report format using Theme/Create Report. For a large number of records, use the Summarize Button in the Table GUI to summarize by permittee for example.
    Scenario II--On April 16, 1999 students at a school adjacent to an agricultural field complained of pesticide related symptoms. How can one determine whether there is any data to support this?
      1. PartB and PartA tables should be joined, and the PUR Table linked to the "Attributes of Crop Sites".
      2. Make sure the View/Properties have been set to show the correct Map Units (meters for UTM and Albers, feet for State Plane) and Display Units (usually miles--sometimes feet).
      3. If there is a theme in the view with school locations, use the Query Builder or Find Button to locate and zoom to the school in question. Otherwise use paper maps, local knowledge and imagery to approximate the school's location.
      4. Use the Theme/Create Buffers menu choice to create a buffer graphic around the selected school polygon. If the school is represented by a point, or does not exist as part of a theme, use the Draw Circle Tool to draw a circle of specified radius around the point/location of interest (e.g. 1 mile).
      5. Select the graphic and use the Select Features Using Graphic Button to select all the surrounding crop sites within a radius of 1 mile.
      6. Make the PUR table active and perform the following query using Select From Set:
        ([Appl_date]> "04/13/99") and ([Appl_date < "04/17/99"]
        to obtain the records of pesticide use on the selected field sites that were reported to have taken place three days prior to the incident.
      7. Examine the records and generate a report for further investigation in the field.
  4. How to create a point theme from GPS locations.
    For ArcView to create a point theme from GPS points, they need to be in decimal degrees. Generally, GPS devices use either decimal degree or degrees minutes and seconds as standard output.
    1. Add the GPS data to an ArcView project as a table. The data can be in either a database table, or as a comma delimited ascii text file (first line containing the headings). If the table is other than a dBase table, and contains data in dms data (format: ddd mm ss), export the file (File/Export) to the .dbf format, delete the original table from the project, and add the newly created .dbf table, before proceeding.
    2. If the table contains only dms data use the DMS2DD extension (dms2dd1.avx) to convert the data to decimal degrees. The extension will place a menu choice called "Convert DMS to DD" at the bottom of the Table menu. When you run the extension, two new fields DD-X and DD-Y will be added to the table.
    3. Use the DD-X (X field) and DD-Y (Y field) fields to create a new event theme in a View (View/Add Event Theme). Make sure the View is either empty or contains data in decimal degrees, such as the ESRI data supplied with the ArcView application.
    4. To convert the data to a different projection (e.g. State Plane feet) Select the Projector! Extension. If the Projector! Extension is not visible in the Extension Manager, use Windows Explorer to navigate to c:\...\arcview\samples\ext, copy prjctr.avx to c:\...\arcview\ext32. Discuss extensions, move the projector extension to the EXT32 dir.
    5. Once the Projector! Extension is loaded, use the new button in the button bar to reproject the gps data.
  5. How to use different fonts to label distinct groups of features within the same theme.
    For Example: make the font for capitols larger than the font for large population centers or small towns.
    1. Make the theme you want to label active by clicking on it in the TOC.
    2. Click the Query button to open the Query Builder.
    3. Create a query expression that will select a subset of your theme's features.
    4. Click the New Set button.
    5. From the Window menu choose Show Symbol Window.
    6. Change to the font palette by clicking the button and set the font you want to use to label the selected features. You can also change the color by selecting the text option of the color pallete.
    7. From the Theme menu choose Auto-label.
    8. In the Auto-label dialog set the options you want and click OK.
    9. Repeat Steps 3 through 8 for each group of features that require different labels.