Archive for July, 2010


Tuesday, July 27th, 2010

Nice mapserver, enabling vector display as well. Based on GeoExt.

ArcGIS: Calculating Area of a Polygon

Monday, July 5th, 2010

If you need to calculate the area of a polygon layer in ArcGIS, you can do so in ArcMap.

Use ArcGIS Desktop Help (available from the ArcMap interface) to get basic directions – under the Index, search for “area” – you should then see “Calculating for Polygons”

These directions have been tested and they work well. However, before you do this, there are some things you need to check.

A note about coordinate systems and area calculations
First, make sure that your data layer is in a defined projected coordinate system, like State Plane or UTM. You need to know what the map units of the data layer are (usually feet or meters), because once you calculate area, the area calculation will be in those map units.

If your data is not projected (e.g., it is in a Geographic Coordinate System, meaning decimal degrees) it would be wise to project it first. In the Data Frame Properties, change the coordinate system to a projected coordinate system (e.g., State Plane NAD83 (feet) Texas Central. Then right click on the data layer and choose Export Data. In the dialog box that follows, choose to create the new data set in the Data Frame’s coordiante system (now set to a projected system). This will create a new projected data layer, that you can then add to the Data Frame. From that point, you can follow the directions in ArcGIS Desktop Help for calculating area. If the data frame units were in feet, the area calculation will be square feet.

To convert square feet into square miles or acres or hectares, you need to add a new field to the attribute table (e.g., sq_mile), then use the Calculate Values tool to have that field = the area field x the conversion factor. To get the conversion factor, see Peter Wallin’s the Conversion Table for changing measurement units.

Creating an “area” field in your attribute table if you don’t already have one
If your attribute table does not already have an “area” field, you need to create one before doing the area calculations. You can create the new field in ArcCatalog or ArcMap. Note you can add an acres field using these same directions.

To create a new attribute field for “area” in ArcMap, follow these directions – note you cannot be in an editing session to do this (don’t ask me why):

  • Open the layer’s attribute table in ArcMap
  • Click on the Options tab
  • Choose Add Field
  • Name it Area
  • For Type, choose Double
  • Don’t put anything under Precision or Scale.
  • Click OK

Calculating area for polygons (from ArcGIS Desktop Help)

  • Open the attribute table of the layer you want to edit.
  • Right-click the field heading for area (if there is no field for area values, you can add a new field for area by clicking the Options button and selecting the new field option).
  • Click Calculate Values.
  • Checkmark the Advanced box (this is important – dont’ forget this!)
  • Type the following VBA statement in the first text box (you should be able to copy and paste):
    Dim dblArea as double
    Dim pArea as IArea
    Set pArea = [shape]
    dblArea = pArea.area
  • Type the variable dblArea in the second text box (near the bottom of the dialog box) directly under the area field name.
  • Click OK.

Visualization of Vessel Trajectories

Friday, July 2nd, 2010


Sankey for Football

Friday, July 2nd, 2010