How does it work?
RailARC is simply a system for storing and searching large numbers of railroad-related digital photographs. The mechanics of the website are run using a series of PHP scripts and a specifically formatted directory structure. The search function is performed with a MySQL database built from the photograph filenames (see below). This basic structure is the same as with previous versions of RailARC. However, in the past we used custom, compiled C scripts to essentially perform the same database functions. By migrating to PHP and MySQL, we have been able to enhance the performance and features with much less programming overhead.

Photograph Storage Format
The photographs are stored in a hierarchical directory structure based first on the reporting marks, then unit number. Each photograph is assigned a unique name according to the following format:

<ROAD>
     Reporting marks of the equipment
     Example: IAIS, BNSF, AMTK

<NUMBER>
     Equipment number including any letter designations
     Use 'unknown' when number on a single unit is not known
     Use 'train' when picture is of a train with no discernable numbers
     In the case of multiple units in one picture, file under all known
          units except those which don't provide useful information

<LOCATION>
     Location photograph was taken
     Although not required, all lowercase is preferred
     Use 'unknown' when location not known
     Formats:  <CITY>_<STATE>
               unknown_<STATE>
               unknown
     <STATE>
          Two characters
          State abbreviations (postal codes) for the United States
          Province abbreviations for Canada
          Country codes for other countries
     <CITY>

          Remove all spaces and punctuation
               Example: Des Moines, IA => desmoines_ia
          Use 'unknown' if city not known
               Example: unknown place in Iowa => unknown_ia
          If only approximate location is known, enclose in curly braces
               Example: Western Iowa => {western}_ia

<DATE>
     Date photograph was taken
     Format:  <DAY>-<MONTH>-<YEAR>

     If month and/or day unknown, leave blank
     If all fields unknown, use 'unknown'

     <DAY>
          Numerical day
     <MONTH>
          Three letter abbreviation
     <YEAR>
          Four digit representation

     Examples: 12-nov-1997, aug-1999, 1996, unknown

<INDEX>
     Three digit index number, padded with leading zeros
     Differentiates photos of the same item, in the same place, and on the same date
     Should NOT be used to differentiate between resolutions of the same image

Notes:
a) If the locomotive is owned by railroad XYZ and is painted for XYZ, then
   name it XYZ.

b) If the locomotive is owned by railroad XYZ, but carries reporting marks
   ASDF, then list under ASDF.  If painted fully for XYZ, then also list
   under XYZ.

c) If the locomotive is owned by railroad XYZ, but painted in FULL ASDF
   paint (including ASDF number), then list under ASDF.

d) If the locomotive is owned by railroad XYZ, but painted in partial, but
   still discernable, ASDF paint then list under XYZ.  List also under
   ASDF only if it still carries the original ASDF number.
In addition to the data in the filename, each photograph has a corresponding XML file with the same base filename, but an .xml extension. This file contains information about the photographer, copyright associated with the photo, and any other information desired. An example XML file is below:
<photodata>
        <photographer>Michael Petersen</photographer>
        <copyright>Creative Commons (BY-NC-SA) 2.0</copyright>
        <other>
                <key>Notes</key>
                <value>Weed Spray Train</value>
        </other>
        <other>
                <key>Units</key>
                <value>IAIS-414 / UTLX-85029 / KTTX-930059 (ASPX-0574501)</value>
        </other>
</photodata>

The Source Code
If you are interested in setting up a similar site or using some of our code, please us. If you are an individual or non-profit organization, we will likely just give you the necessary code and instructions needed to get up and running. If your plans involve making money, then we will probably ask a nominal fee for use of the code to cover our costs of operating and developing the site.