Personal tools
Home » Members » scw » Generating Basin KMLs
Document Actions

Generating Basin KMLs

by Shaun Walbridge last modified 08-02-2007 18:35

Conversion procedure to convert our basin shapefile layers to managable KML files for use with Google Earth.

  • Define Projection: af_basin_n.shp as the local Lambert Equal Area Azimuthal Projection
  • Open af_basin_n.shp Attribute table, Create new column `area', type double
  • Calculate Values and check the Advanced Box:
    Dim dblArea as double
    Dim pArea as IArea
    Set pArea = [shape]
    dblArea = pArea.area / 1000000
    In the result box at the bottom, type dblArea
  • Select By attributes: WHERE "area" < 12
  • Iteratively change the area value, to limit the feature count to 20,000: more features will make Google Earth intolerably slow to work with.
  • Right click on the layer, Data: Export Data to "af_bas_n_gt12.shp".
  • Define Projection: af_bas_n_gt12km.shp as the local Lambert Equal Area Azimuthal Projection

  • ArcToolbox: Data Management Tools: Projections and Transformations: Feature: Project
  • Select "af_bas_n_gt12km.shp" as the input, and "af_bas_n_gt12km_w84.shp" as the output.  The output projection should be set to WGS 1984.
  • Copy the file to a location on the server.
  • From an ssh connection to the server and while in the same directory as the basins layer, type:
    ogr2ogr -f "KML" af_basins.kml af_bas_n_gt12km_w84.shp
  • Open the KML output in Google Earth. Sweet!

Built with Plone