Saturday, September 13, 2008

ArcMap2GMap Fixes: Thanks for Feedback!

After releasing ArcMap2GMap a couple of weeks ago, two persistent bugs have repeatedly been pointed out by users. I want to document these errors and the fixes, both of them quick, here. The script has been updated on the ESRI ArcScripts page with these fixes, so a fresh download should resolve these issues.
Bug #1: Process Status Message Not Appearing in ArcGIS 9.2
  • For whatever reason the form text specifying the three procedure steps (that alternated while processing to inform the user which step was currently operating) were not appearing in ArcGIS 9.2. This resulted in the appearance that nothing was happening.
    • The fix was to add a Me.Repaint command each time the caption of the label is changed. My understanding was that VBA should handle this automatically, but obviously it was not the case here. This creates a bit of unnecessary overhead as the entire form and its contents need to be redrawn jsut to change the label status.
Bug #1: String Length Limitation While Passing to Geoprocessor
  • There is a string length limitation when passing text strings as parameters to a Python script. The first Python script is called by the VBA using the following command: gp.ArcMap2GMap apiKey, tbxName.Text, tbxTitle.Text, layerInfo. The layerInfo string (last parameter) contains the names of all included layers, as well as all user specified options, including color, thickness, messagebox text, etc. I do not know exactly what the length limitation is, but if too many layers are selected this string is truncated and of course errors ensue.
  • This was brought to my attention by a user needing to create a p0age with 27 layers.
    • The fix was to have the VBA write the layerInfo contents to a text file and then after the Python script is invoked, read the contents from the text file.
I surely do appreciate all the feedback!

Thanks everyone!

Tuesday, September 09, 2008

Texas Statewide Historical Maps & Positional Accuracy Pt. 2

Continuation from Pt. 1

Our Geographic Accuracy Measurement Procedures - Overview
  • We calculate 5 positional accuracy measurements for each georeferenced map. Texas is divided into 4 quadrants, with each quadrant receiving an independent positional accuracy measurement. The fifth measurement is the average accuracy of the 4 quadrants.
  • Each quadrant is further subdivided into 4 sections. At least 4 sample points are taken from each of these sections, with a minimum of 20 points from each quadrant. However, as the NSSDA suggests, 25 points are recommended and is what we aim for. We therefore end up using (ideally) between 80 to 100 sample data points to measure the accuracy of each map.
    • The exact points we use for each map of course differ, but here is our priority geographic references. First, clearly identifiable county boundaries. Second, coordinates provided by hash marks labeled on map edges. Third, city locations. City locations have the lowest priority here because we use them primarily to georeference and it is best for the sample points to be different from the points used to georeference. Natural features, such as rivers or lakes, are never used.
Our Geographic Accuracy Measurement Procedures - Step by Steps
  • Four new feature classes are created for each map to hold the 20 to 25 sample points from each quadrant.
  • Point features are created for each sample data point. The coordinates as specified by the map are hand-entered in the attribute table.
  • The actual X/Y coords (in meters) are generated for each feature in the four quadrant feature classes using ArcMap's Add XY Coordinates tool.
  • This data is entered into the horizontal accuracy calculation spreadsheet. Our own customized templates use different NSSDA multipliers, based on the calculated RSME ratio. This is discussed in more detail in the previous blog post.
An Example! Enough Talk, Here is an Example...
  • Title: Colton's Texas (1855)
    • Original Map Citation: Colton, Joseph H. Colton's Texas. New York: J. H. Colton & Co., 1861.
    • Entire map tested 8.982 kilometers horizontal accuracy at 95% confidence level.
    • Download: Georeferenced Map - No metadata included yet as we are still ironing out taxonomy and copyright issues. You betcha there will be posting about these issues, as well as interface and file format issues as well.
  • Horizontal Positional Accuracy statement for the Colton's Texas (1855) map is pasted below. As specified above, I am unable to post a complete metadata record at this time as other portions are incomplete. You can see relative high accuracy of NE Texas as opposed to the SE quadrant.

Horizontal_Positional_Accuracy:
Horizontal_Positional_Accuracy_Report:

Each georeferenced map image file was divided into four quadrants at centerpoint 31.688, -98.634. The horizontal accuracy of each quadrant was calculated independently using the NSSDA (National Standard for Spatial Accuracy) at the 95% confidence level. Where possible, a minimum of 20 sample points from each quadrant were used to measure horizontal accuracy. The horizontal accuracy of of the entire map is the mean average of these four measurements.

Quantitative_Horizontal_Positional_Accuracy_Assessment:
Horizontal_Positional_Accuracy_Value: 8982
Horizontal_Positional_Accuracy_Explanation:
Entire map tested 8.982 kilometers horizontal accuracy at 95% confidence level. Mean average of the four quadrants.

Quantitative_Horizontal_Positional_Accuracy_Assessment:
Horizontal_Positional_Accuracy_Value: 6988
Horizontal_Positional_Accuracy_Explanation:
NW Quadrant tested at 6.988 kilometers at the 95% confidence level.

Twenty-four points were used to test the positional accuracy. The calculated RSME ratio was 0.3344, and the normalized elliptical error table was used to determine error at the 95% confidence level.

Quantitative_Horizontal_Positional_Accuracy_Assessment:
Horizontal_Positional_Accuracy_Value: 8100
Horizontal_Positional_Accuracy_Explanation:
NE quadrant tested at 8.1 kilometers at the 95% confidence level. Twenty-four points were used to test the positional accuracy. The calculated RSME ratio was 0.699, and the normalized circular error table was used to determine error at the 95% confidence level.

Quantitative_Horizontal_Positional_Accuracy_Assessment:
Horizontal_Positional_Accuracy_Value: 12400
Horizontal_Positional_Accuracy_Explanation:
SE quadrant tested at 12.4 kilometers at the 95% confidence level.

Twenty-four points were used to test the positional accuracy. The calculated RSME ratio was 0.609, and the normalized circular error table was used to determine error at the 95% confidence level.

Quantitative_Horizontal_Positional_Accuracy_Assessment:
Horizontal_Positional_Accuracy_Value: 8400
Horizontal_Positional_Accuracy_Explanation:
SW quadrant tested at 8.44 kilometers at the 95% confidence level.

Ten points were used to test the positional accuracy. The calculated RSME ratio was 0.400, and the normalized elliptical error table was used to determine error at the 95% confidence level.

Monday, September 08, 2008

Texas Statewide Historical Maps & Positional Accuracy Pt. 1

We have been undertaking a project, called the Texas Time Machine (TTM), which requires us to georeference statewide historic maps of Texas.

Brief overview of TTM:
Preparing historical materials for use within GIS for geographic analysis requires a large time commitment and high level of expertise. Once prepared, the researcher still needs to understand the fundamentals of operating a large desktop GIS application. TTM resolves this by (1) compiling a collection of prepared historic materials, and (2) enabling interaction with these materials within Google Maps and Google Earth (as well as desktop GIS applications).

TTM provides 4 ways to view geographically referenced maps, statistics, and images. (1) Via Google Map overlays, (2) Via downloadable Google Earth KMZ files, (3) Via downloadable GIS Data, and (4) Via downloadable un-georeferenced images.
I want to focus this post specifically on how we are georeferencing 150 year old maps whose geography encompasses over 250,000 square miles.

Georeference Scanned Map Image
  1. The intended coordinate system of the original cartographer needs to be determined. In consultation with our Cartographic Archivist Librarian, we discovered that for the majority of the maps dating int he 19th century a Mercator system was intended.
  2. Control points need to be used for georeferencing. For the first order, we use control points from the state outline, namely the Pan Handle, westernmost tip, easternmost tip, and southernmost tip. Then, we overlay a uniform 5x5 grid shapefile (25 standard polygon features) over the ungeoreferenced image within ArcMap. One city per cell is used as a control point. Cells without cities indicated on the scanned map will not contain control points.
NSSDA & Historical Measurements
We are adhering to the National Standard for Spatial Data Accuracy (NSSDA). The two primary resources we followed are:
  • ‘Geospatial Positioning Accuracy Standards, Part 3: National Standard for Spatial Data Accuracy’
  • ‘Positional Accuracy Handbook: Using the National Standard for Spatial Data Accuracy to measure and report geographic data quality’.
Both resources can be accessed here.

The first work above provides a general overview of the process and specific case studies where one can learn by those examples. There are two cases for measuring horizontal accuracy.
  • The first case is on page 3-10. This case demonstrates how to calculate error with 95% confidence when the x-axis error is equal to the y-error. RMSE(x) == RMSE(y). (Root Mean Square Error) I do not anticipate this as applicable as our maps are not consistently drawn to scale.
  • The second case is on page 3-11. This case is entitled ‘Approximating Circular Standard Error When RMSE(x) != RSME(y)’. However, the details of the case demonstrate how to calculate error when RMSE(min)/RMSE(max) is between 0.6 and 1.0. This implies an almost consistent error across the x- and y-axis.
    • The formula provided is: Accuracy ~ 2.4477 * 0.5 * (RMSE(x) + RMSE(y)). This is in effect the average of the two errors (added and divided by 2) and then multiplied by the full circle confidence of 95% as designated by the ‘Generalized Circular Probable Error’ table. (JSTOR access, page #170).
    • This case continues to explain that the circular standard error at 39.35% confidence may be approximated at 0.5 * (RMSE(x) + RMSE(y)).
    • The big question for us is how can these numbers be adjusted to accommodate where RMSE(min)/RMSE(max) is less than 0.6.
  • The second work above is a handbook/workbook that enables the easy use of the first case specified in the first work. Namely, where RMSE(x) == RMSE(y). As stated above, this is not the case with our maps because cartographers could not draw them to scale 150 years ago. However, this second work provides print and downloadable versions of a spreadsheet that modified for our uses, namely adjusting the modifier at the end based on the RMSE ratio.
  • Both works provide template language to include in the GIS metadata, as well as specific metadata fields where positional accuracy should be reported.
Our Geographic Accuracy Measurement Procedures
  • Ha! I am tired of writing at the moment and will lay out out specific in-house procedures tomorrow. I will also include some snippets from one of our metadata records.