Blogs

Observations: Finding and Reviewing

To “View & Export Observations” that have been submitted and entered into the IDFG-IFWIS database, for Animals you can go to https://fishandgame.idaho.gov/species/observations/list, while for Plants you go to https://fishandgame.idaho.gov/species/observations/plants/list.  From this page you can begin filtering and querying the data to fit your need.  Filters currently included are by: Common Name, Scientific Name, Category [of species type], and Region.  An updated form will also include filters for Observer and Reporting Organization.  If you require a specific filter, that you believe will be useful by many, please let us know.

These filters should be fairly intuitive, but a helpful note is to remember to “Reset” the filter when you want to change your search criteria, otherwise, the filter will continue to narrow down on the search criteria that are already entered.  You may also increase the number of observations returned per page by changing the Items/page filter.

Creating observations using the Species API

Our Species Platform is designed not just to be a web page, but also an Application Programming Interface (API) that allows other websites and programs to read, create and edit observations.

Creating an Observation requires having an existing Fish and Game Account, logging in successfully, and finally creating the new observation.  For this example I'll be using the Firefox Poster extension.  Let's get started!

Step 1 - Login

First we need to authenticate against Fish and Game Accounts and receive a token to include in our future interactions with the REST API.  We can do both steps at once by posting to the login form with a return path set to receive our token:

https://fishandgame.idaho.gov/ifwis/accounts/user/login?returnUrl=/speci...

Set the content type:

application/x-www-form-urlencoded

And send a standard html payload for username, password and rememberMe flag:

username=myusername&password=mypassword&rememberMe=true

Login

Post this and in the response you'll receive a string that we'll use as a token for all future requests.

Step 2 - Create Observation

Now we need to construct the request to create our observation.

Let's start by adding the token.

Add Token to Header

This token is only for session validation, not authentication.  Forms-based cookies are still needed for authentication, so if building a stand-alone iOS or Android application you'll also need to add the cookie to the request.

 

Now we need to build the payload for the observation.  We can do this as an HTML form, XML or JSON object.  For our example we'll use JSON.

Post to:

https://fishandgame.idaho.gov/species/rest/node.json

Content Type:

application/json

Finding the correct content for the post is a little tricky.  It involves quite a bit of familiarity with the data and our API which is built using Drupal Services.  The documentation will get you started, and examples are useful, but ultimately we are going to have to break this down in a future post line by line.  

In this example we have standard inputs (field_count) with one pattern, select lists and radios (field_count_type) with a slightly different pattern, dates (field_datetime) doing something different still, files (field_file) weirder still, geofield (field_location) with escaped geojson and node references (field_species) which include the primary key of the referenced content.  The good part, is once you understand these oddities, it's the same oddities to create other data stored in Species.

Content:

{
    "type": "observation",
    "field_count": {
        "und": [
            {
                "value": "1"
            }
        ]
    },
    "field_count_type": {
        "und": [
          "Absolute"
        ]
    },
    "field_life_stage": {
        "und": [
          "Mature"
        ]
    },
    "field_life_state": {
        "und": [
          "Alive"
        ]
    },
    "field_location": {
        "und": [
            {
                "geom": "{ \"type\": \"Point\", \"coordinates\":  [-112.0, 43.5] }"
            }
        ]
    },
    "field_location_resource": {
        "und": [
            {
                "value": "Google Maps Click"
            }
        ]
    },
    "field_location_use": {
        "und": [
          "Unknown"
        ]
    },
    "field_observation_method": {
        "und": [
          "Seen",
          "Heard"
        ]
    },
    "field_sex": {
        "und": [
          "Unknown"
        ]
    },
    "field_species": {
        "und": [
            {
                "nid": "[nid:80612]"
            }
        ]
    },
    "field_species_confidence": {
        "und": [
          {
            "value": "100"
          }
        ]
    },
     "field_datetime": {
        "und": [
            {
                "value": {
                   "date": "07/16/2013",
                   "time": "11:14am"
                }
            }
        ]
    },
    "field_file": {
        "und": [
            {
                "fid": ""
            }
        ]
    },
    "field_photo": {
        "und": [
            {
                "fid": ""
            }
        ]
    }
}
 
 
 
 
 
If the post is successful you'll receive a json response with the new id of the observation:

 

You can browse to this location to retrieve an xml version of the new observation:

Append .json to view as a javascript object:

Or remove rest from the url to view and edit as HTML:

This is the first in a series of posts on creating, reading and manipulating content in species through the API.  We'll add links to future posts here of follow the speciesapi tag.

Display Points From a Table: A Step-by-Step Guide

Do you have data points that won’t display right in your GIS map?

This may be the help you need.

Download and View Powerpoint Presentation

Click slide or this link to view Powerpoint Presentation

Definitions of Terms used by IDNHP and IFWIS

Links to downloadable files have been added to the IFWIS website.  A workbook of acronyms, agency codes, and definitions was added to the Species Diversity page.  A text document was added to the Obtain Information page, explaining the terms used in the downloadable county lists of rare and sensitive species.

 

Create a Buffer for a KML in Google Earth

Create a user-defined buffer around point, line, or polygon KMLs has never been easier!

1) Make sure that your Google Earth data is saved as a KML, not KMZ

2) Open this website: http://www.geo-news.net/index_buffer.php

          

3) Select your buffer type (line, point, or polygon)

4) Select the KML you would like to buffer and choose a buffer distance (in meters). Click the globe with the up arrow to upload your KML file.

                                    

5) A new KML will be created and available via a link at the top of the screen.

            

6) Click the link, save the KML to a location of your choosing and open in Google Earth!

MS Access Query to determine if 1+ fields of a subset of fields is not null

I recently encountered an issue where I tried to determine which records for any of 7 out of 12 Forest Service National Forests contained data for a query.  Region 4 of the USFS has 12 NFs, of which 7 have boundaries within Idaho.  For a list of sensitive species occurring in the region, I wanted to determine which species occurred in 1 or more of the forests that occur in Idaho.  Currently, R4 indicates 231 sensitive species, but only 56 occur in forests within Idaho.

With my original query, I simply put `Is Not Null' in the `or:' row of the query design view, but this resulted in no records being returned.  It appeared that something needed to be in the `Criteria:' row of query design, but when I did this, then put `Is Not Null' in the `or' row going straight across for each field desired, only records meeting the `Criteria:' rule were returned.  Example of failed query shown below:

It ended up that the query rules needed to be "tiered" or staggered in the query design view, with each OR statement completely encapsulated with parenthesis, resulting in the following GOOD SQL query:

 

SELECT [Tbl_USFS-R4--July_2011].ID, [Tbl_USFS-R4--July_2011].Type, [Tbl_USFS-R4--July_2011].Species, [Tbl_USFS-R4--July_2011].Common, [Tbl_USFS-R4--July_2011].Boise_NF, [Tbl_USFS-R4--July_2011].Caribou_NF, [Tbl_USFS-R4--July_2011].Challis_NF, [Tbl_USFS-R4--July_2011].Payette_NF, [Tbl_USFS-R4--July_2011].Salmon_NF, [Tbl_USFS-R4--July_2011].Sawtooth_NF, [Tbl_USFS-R4--July_2011].Targhee_NF
 
FROM [Tbl_USFS-R4--July_2011]
 
WHERE ((([Tbl_USFS-R4--July_2011].Boise_NF) Is Not Null)) OR ((([Tbl_USFS-R4--July_2011].Caribou_NF) Is Not Null)) OR ((([Tbl_USFS-R4--July_2011].Challis_NF) Is Not Null)) OR ((([Tbl_USFS-R4--July_2011].Payette_NF) Is Not Null)) OR ((([Tbl_USFS-R4--July_2011].Salmon_NF) Is Not Null)) OR ((([Tbl_USFS-R4--July_2011].Sawtooth_NF) Is Not Null)) OR ((([Tbl_USFS-R4--July_2011].Targhee_NF) Is Not Null));
 
Tiered Query to determine if any of a subset "is not null"
 

 

Display BLM PLSS (township, range, section) & USGS Quadrangle data in Google Earth using Earth Survey Tools

Have you ever been looking for a feature in Google Earth & thought, boy this would be so much easier if I could search for it by township, range, section.  Well, now you can!  Just use the Earth Survey Plugin (ESPlugin).

What all does the Earth Survey Plugin have to offer:

  • Section Geocoder: search by point or township,range, section. Link to the BLM General Land Office records webpage which provides "live access to Federal land conveyance records for the Public Land States, including image access to more than five million Federal land title records issued between 1820 and the present. [They] also have images related to survey plats and field notes, dating back to 1810."
  • Address Geocoder: get address information for placemarks and add, customize, and save placemark data.
  • Overlays: drive-time (5, 10, and 15 minute) polygons; BLM townships, principal meridians, and special surveys; USGS quadrangle index and topo maps.
  • Layers: borders (counties, states, etc.), roads, buildings (not available in all cities), trees (not available in all cities), and terrain

Check out all of Earth Survey's tools at: http://www.metzgerwillard.us/EarthSurvey.html

 

Geospatial PDF?!? How to Create a Geospatially Aware PDF

 

Yes, it is true!  You can make a PDF map spatially aware (aka georeferenced).  Geospatial PDF’s allow users to obtain latitude and longitude coordinates, turn data layers on and off, view a selected features attributes, and to query and highlight data.  This tutorial will explain how you create a spatially aware PDF map from ESRI ArcMap.  Just follow these easy steps!

1) Obtain the latest version of Adobe Reader (for free) at: http://get.adobe.com/reader/. NOTE: This tutorial uses Adobe Reader 10 so if you are using a later or newer version, some of the menus, etc. may be different.

2) Once you have created your map in ArcMap, select Export Map… from the File menu. Choose PDF from the ‘Save as type:” dialog box. If it is not already expanded, expand the Options menu at the bottom of the Export Map dialog box. Select the Advanced tab.  In the Layers and Attributes drop-down menu select ‘Export PDF Layers and Feature Attributes’. Also check the box in front of ‘Export Map Georeference Information’. 

 

3) Open your exported map in Adobe Reader.  Add the Model Tree to the Navigation Pane running down the left side of the Reader by right-clicking the panel.

 

4) Start exploring! 

 

 

TOGGLE LAYERS ON & OFF

Click on the Layers icon in the Navigation Panel.

 

 

You can turn layers/labels on or off by clicking the Eye icon to the left of a group of or individual layers.

 

VIEW ATTRIBUTE DATA

Click on the Model Tree icon in the Navigation Panel.

 

Select a feature from the list to see its attributes (NOTE: These are the same attributes that appear in the attribute tables in ArcMap. If there is a field that is turned off in your ArcMap attribute table, it will also not appear in the PDF). The feature will also be highlighted in the map.

 

You can also select a feature with your mouse on the map to view its attributes in the Model tree. To do so, you must have the Object Data tool on. To turn this tool on: from the Edit menu, select Analysis, and then Object Data Tool.

 

Finally, using the Find tool is also a simple way to query for data.  Simply type the name of the feature into the Find tool or Advanced Search search box.  If there is more than one feature that meets the criteria, it will be listed on the screen.  To see the attributes of a specific feature, select it from the search results list.

 

FIND LATITUDE AND LONGITUDE COORDINATES

To turn this tool on: from the Edit menu, select Analysis, and then Geospatial Location Tool. The location of the cursor while be shown in a text box at the bottom of the screen.

 

HELPFUL FACTS AND TIPS FROM THE ArcGIS RESOURCES WEBPAGE

http://resources.arcgis.com/en/help/main/10.1/index.html#/Exporting_to_PDF/00sm00000007000000/

· Each data frame will have its own folder in the tree view of the PDF that contains all the layers and the data frame graphics (neatline, background) associated with it.

· Text, picture, or north arrow elements added to a layout become part of a layer called Other. It contains all the graphics and marginalia that are not part of a data frame.

· Each group layer will be represented as a folder in the tree view, and the contents of the group layer will be presented within the group layer.

· Layers that cause rasterization, such as transparent layers, or layers that use a picture fill symbology consolidate all the layers below them into a single layer with the name Image.

· If a layer contains picture marker or picture fill symbology, use the option Vectorize picture markers/fills, found on the Format tab of the Options panel. This prevents rasterization of layers below picture markers and fills.

· Raster layers, such as orthophotos, consolidate all layers below them into a single Image layer. Place raster layers lower in the ArcMap table of contents to avoid this problem.

· Graphic or text elements added to the data frame's default graphics layer from data view become a layer called <Default>. These are displayed above the layers in the data frame. If multiple annotation groups exist (check this on the Drawing > Active Annotation Target menu command on the Draw toolbar) and their contents are in the data view, each individual annotation group becomes a separate layer above the <Default> layer. This is a good way to add focus areas or graphics that emphasize or mask certain features in the data view.

· Backgrounds or drop shadows added to the data frame may become separate graphic elements and may be rendered multiple times as graphics. For example, if a data frame has a colored background, and the layout has a different colored background, the data frame's background may be rendered once to the data frame's Graphics or ArcGIS Layer and again to the layout's Graphics layer or ArcGIS Layer.

· Dynamic labels (not using annotation) in each data frame are rendered separately as part of a layer called Labels.

· Geodatabase annotation is displayed as a separate layer in the PDF. Map annotation is consolidated into the layer for the annotation group in which it belongs.

· When labels are converted to annotation, they are automatically placed in their own named annotation group and render separately from the<Default> group.

· Data frames and other layout elements are rendered in draw order when exported to PDF. Therefore, the topmost layout element in the map is the first element in the resultant PDF table of contents. Use the Bring Forward and Send Backward commands from the Draw toolbar to change the draw order of layout elements.

ENJOY!!!

Should I use ArcGIS from Citrix or Install it on my computer?

 You can use either or both. The best solution depends on three main factors.

·         What am I doing?

·         Where is my data?

·         Where am I?

 

What am I doing?

Appropriate for Citrix

·         making maps with existing data

·         querying and selecting  spatial data

·         creating GIS points from XY coordinates (GPS files)

·         Sub -setting data by selection and export

·         Creating or editing GIS data feature by feature

·         Buffering small data layers (few features, simple features)

·         Joins on attribute tables

Not Appropriate for Citrix

·         Geoprocessing (Intersect, Union, Identity, …)

·         Sub -setting data by Clipping

·         Spatial joins

·         Spatial Analyst

·         Buffering large or complex data layers

 

If you are doing one of the things on the Appropriate for Citrix list, Citrix may be your best option.  This will also depend on the location of your data.

When you are accessing ArcGIS through Citrix, you may be sharing the resources on a server with other people.   ArcMap shares resources very well with some operations, such as moving around on the map, making selections, and editing features.   Operations such as geoprocessing or buffering a large number of features are very CPU intensive.  When you start one of these operations, ArcMap assumes you are the most important person and this is the most important thing you are doing.  This can render ArcMap unusable to anyone else on that Citrix server.  Even if you are working with ArcMap loaded on your computer, don’t start one of these operations if you need to finish a Power Point for a meeting that starts in 30 minutes.  ArcMap can gobble up all the CPU resources on your computer.   Consider both the number of features and the complexity of the features. Points are simple.  A rectangle is simple.  A line or polygon with lots twists and turns is complex.  It may take less time to buffer 1000 points than one complex polygon.

 

Where is my data?

IDFG Spatial Data Server (LayerFetcher,  K:/ifwis/sdelayers) – This data source is available from both Citrix and desktop installations.  In the Regions, these layers will usually draw faster over Citrix, provided there are no other data source issues in your map document.

IDFG Network Drives (Q, K, T) – If you access ArcMap through Citrix, or Citrix and your desktop,  this is where you should store your data.  In the Regions, layers stored here will usually draw somewhat faster over Citrix, provided there are no other data source issues in your map document.  The T drive is for temporary storage and is purged every periodically.

 Citrix works by sending your mouse and keyboard actions to a server.  The actions are processed by ArcMap on the Server and an image is returned to your computer.  When you use data from IDFG Network Drives or from the LayerFetcher, the data and the processing  are in close proximity and the communication is fast.

Regional Network Drives (U, O, S)  - It possible to access a regional network drive through Citrix, but it is not advisable, because it will be very slow.  It will actually be pulling data back and forth over the network rather than just mouse clicks and images.  You should only store GIS data on a regional drive if you are only accessing it from a local desktop installation.  If you are at Boise HQ it is ok to use the O, S drives.

Your Local C: Drive – This will give you the fastest access to data if you are using a local desktop installation of ArcMap, however,  you will not be able to access it through Citrix, it is accessible only to you, and it is not automatically backed up.

 

Where am I?

In the office -  Here you have options.  You can use either or both depending the factors listed above.  If you have ever tried to use ArcMap, Excel, and Word at the same time, you have seen that everything slows down.  Using Citrix can be like having a second computer on your desk.

At another IDFG facility – As long as you are connected to the IDFG Network you will have access to the ArcGIS license server and the LayerFetcher data, so it possible to use the local ArcMap Installation on your laptop.  It is however, probably safer to put your map document and data on the Q drive and access through Citrix. If your project works on Citrix in your office it work anywhere you have a decent internet connection.

At home or anywhere not connected to the IDFG Network – Here the answer is easier. Citrix.  Your only other option is to purchase your own ArcGIS license, and you will not have access to any network data source.  You can access Citrix from anywhere with internet connectivity by going to https://linkup.idfg.idaho.gov/Citrix.

 

Other Considerations

Will you be sharing your map documents or data with others?  If the people you are sharing with are in your region and they are using a local install, then it’s ok to store data and map documents on your U drive.  Otherwise store on the Q drive and make sure your document works on Citrix.

 

How fast is your computer?  How full is your hard drive?  If your computer is old and slow you are better off using Citrix.  If your hard drive is near full you may not be able to install ArcMap.  You’ll need about 3 Gigs of space on your C drive to install.  Remember if you are doing any of the things on the “Not Appropriate for Citrix” list, you will need to install locally.

 

Problems with ArcMap on Citrix?

If you are unable to connect to ArcMap on Citrix or you get an error message when you try to open it, it may be a problem with the Network or Citrix itself.   Contact the Help Desk and let them know there’s a problem.  If it is running very slowly, it could be a network problem, but it is more likely to be a problem with a data source, data layer, or you map document.  The best way to diagnose is to start with a new blank map document and add your layers one by one.  If you are still having a problem, give me a call or send an email with the name and location of your map document and I will try to help to get to the bottom of the problem.

ArcGIS 10.1 Desktop Installation

Uninstall Previous Version

If you have any previous version of ArcGIS installed on your computer, you will need to uninstall before proceeding.

-  From the start menu, select Control Panel.  Under Programs, select Uninstall program.

-  Select ArcGIS from the program list, then click Uninstall/Change.

-  Select Uninstall, then OK -> OK

 

                  Installing ArcGIS Desktop

From the Regional Offices, locate the the install program in

            U:\ESRI\ArcGIS10.1\Desktop.

From Boise HQ, locate the the install program in

           Q:\ESRI\ArcGIS10.1\Desktop.

1)  Open the Desktop folder and double click the setup application. 

2)  Accept the license agreement and click Next.

3)  Keep the default options and click Next until the installation begins.   The install  should take about 30 minutes.  Click Finish.

The ArcGIS Administrator Wizard window will come up automatically.

            -  Under  1. Select a Product, select Basic (ArcView) Concurrent Use.

 -  Under 2. Define a License Manager, select Define a License Manager Now.

             -  In the box below, type IFWISARC.

             -  Click OK -> OK.

You are done! For instrustructions on accessing the LayerFetcher Tools click here.  It takes two minutes.  This has not changet from 10.0.