Select to view content in your preferred language

Conversion from GA layer to grid

397
0
01-05-2011 11:57 AM
DeepananthanDhanasekaran1
Deactivated User
Dear All,

I am trying to batch process the conversion of GAlayer (layer created as a output of Geostatistical analyst interpolation) to raster grid. I found this code, but I have no idea where the output of Geostatistical interpolation is stored. From the attached code my guess is it should be with a .lyr extension and I searched for the files with this extension and didn't find any files in temp directory and even in the directory where the source shape files are maintained.

So two things, where the .lyr is created? and how to batch process the conversion from GAlyr to Grid?

Thanks
Deep

# Purpose: Export a Geostatistical layer to a GRID.

# Create the Geoprocessor object.
import arcgisscripting
gp = arcgisscripting.create()

try:
    # Set the input GA layer.
    inputGALayer = "c:/data/Input/idw.lyr"

    # Set the output grid name.
    outputGrid = "out_grid" 

    # Set some of the parameters.
    cell_size = 2
    points_horiz = 1
    points_vert = 1

    # Check out GeoStatistical Analyst extension license.
    gp.CheckOutExtension("GeoStats") 

    # Process: GA Layer To Grid...
    gp.GALayerToGrid_ga (inputGALayer, outputGrid, cell_size, points_horiz, points_vert)

except:
    # If an error occurred while running a tool, then print the messages.
    print gp.GetMessages() 


-----------------------------------------------------------------
Deepananthan Dhanasekaran
Graduate student
MS Geodetic Science - Mapping and GIS
The Ohio State University
Columbus, OH 43210-1275
Phone: +1 614-795-0465
Web: http://bprc.osu.edu/~dhanasekaran.2/
0 Kudos
0 Replies