coreopsis flower

Extract information from state image xml files to make image selection lists.

About: In our Openkey project, we have a lot of images of plants and plant characteristics. The tables below are filled out differently depending on which you are submitting.

We developed software to take information about these images (metadata) from an excel spreadsheet, tranforming them into xml file, and creating HTML pages based on XML files containing that information. Here is an example html output file (http://www.isrl.uiuc.edu/~openkey/imageInfo/Character_image_html/acicular1.jpg.html)

If you would like to download our software and develop the html pages here is how you can do that:

1. Put all the information into a spreadsheet. Below is the format we used (columns A-K) YOU MUST USE THIS FORMAT!

You can use one of our sample files. There are two sample files that you can use to format your data. You can download either one by clicking on its name and following your web browser's download instructions. image table.xls is a sample file that has been filled out already.
imageblank.xls is a file with just header information so you will not need to delete anything.

2. After input all the image data in the spreadsheet, please save the data into two copies, one is in xls format and the other is in a tab-deliminated txt file . Or if you send us the Excel file then we can convert it to .txt tab-deliminated.

The following steps are conducted by the project programmers.

3. In a unix prompt, create a folder in your web directory. Save the tab-delimited .txt file with all the image information into this directory.

4. Download these files to that directory:

stateImage2html.pl
leaf_image_convert.bat

5. Create 2 subfolders: Character_image_xml and Character_image_html

6. In the unix prompt type: perl image_hy.pl filename.txt

7. When the script completes type: ./leaf_image_convert.bat

8. The xml files should now be in the folder Character_image_xml the html pages in the folder Character_image_html.

9. Download this file to that directory:

selection_image_list_loader.pl

10. In the unix prompt type: perl selection_image_list_loader.pl filename.txt collection name

11. After the above command, the selection image lists should be saved in mysql database. It will be ready for search through searcing tools.

The input file is an excel table:

  1. Key: (required) This is a unique identifyer for rows in this table and the XML documents that are created form them. In most cases the file name is unique and may be used for this field.
  2. Character group: (required) This value indicates what characteristic or part is being depicted in the image. If the image is of a characteristc such as a color, it may be just the word, "color" since that tag can be used in many places. If the image is of a plant part, or the entire plant, the value would be the name of that part. For example, if the image is of the leaves of a particular species of plant this value would be "leaves". In the OpenKey project there is a shared vocabulary between, the University of North Carolina and the University of Illinois.This is represented in a DTD at http://www.isrl.uiuc.edu/~openkey/shared/Plant_description_2_21.dtd. Any node in this XML document is a valid entry for this field. Other projects using different vocabularied may use different fields. If the image is of an entire plant the "Habit" tag is used by convention.
  3. Character group: (optional) This second character group fild can be used in two ways depanding on if this is an image of a characteristic or an image of a particular plant species. If it is a characteristic, this field is used to store the "state" value if this is depiction of a state value. For example, if the "Character group" value for column B was color, the "Character group" value for column C might be "red" and the associated image would be a swath of red. Other rows in the table might represent blue, brown, green and other colors. Column be would stay the same for all of these examples with the value of "color".
    If this were an image of a particular species, this field can be used to indicate that the image pepicts more than one palnt part. For example, an image might depict both a flower and an inflorescence. For column B would have "flower" and column C "infolorescence".
  4. Scale: (optional) This is the size of the original image in inches or centimeters. It has an indirect relationship to the size of the image on a computer screen because different computers have different size screens and even the same screen on the same computer can be set to different resolutions.
  5. Dimension: (optional) This is the size of the image in pixels.
  6. Date Image Created: (optional) This is the date that this digital image was created. This may differs from the date that the original image was taken in the field or drawn by the artists. This information can be store din a leter filed. The expected format is month/day/year but this value is only treated as a string and is not validated for format.
  7. Taxon Name: (required for species images, optional for characteristics) If this is an image of a particualr species, the binomial name should go here.
  8. Description: (optional) This is a free text description of what is in the image.
  9. Location: (required) This is the location of the image on the internet if it is digital. For example, "http://www.isrl.uiuc.edu/~openkey/images/krrobert/webReady/amorcane.flowers.macro.exp2.jpg"
    If this is a reference to an analog image such as a film print that is not on the internet, this is the physical location of the image. For example, "Ken Robertsson's file cabnet #2, Illinois natural hisotry Survey Building."
  10. Copyright: (required) This is a pointer to a file on the internet that includes the copyright information for the image. We encourage the use of the creative commons license.
  11. Contributor: (optional) The name of the person providing the image.
  12. Derived from: (optional) This is the (as in column A) for the image that this image is derived from. There may be several resolutions of the same image for example. This could refer to the original. Also this image may be a cropped version of another image. I different row might include information on that image.
  13. Date Image Taken: (optional) This is the date the "original" image was created. This would be when the phot was taken in the field or when the line drawing was drawn by the artist.

image_hy.pl is used to create XML file for each row in the table.

category.pl is used to deal with some special charaters, such as ', so that they are visible in XML format. - it is currently unavailable

leaf_image_convert.bat calls the leaf_image.xslt which is an XSL stylesheet used to convert XML files into HTML files.

An example of XML file:

An example of output HTML file:

For a demonstration, please go to the URL: http://www.isrl.uiuc.edu/~openkey/imageInfo

Character_image_xml/ :the folder of the output xml files.

http://www.isrl.uiuc.edu/~openkey/imageInfo/Character_image_html/ : the folder of the output html files.

Download: image.tar.gz

Any comment or question? Contact Lilli Szafranski at (217) 333 - 7123

 

back to top

Home -Contact - Sitemap
Last updated on Feb 9, 2004