Select to view content in your preferred language

Defining Vertical Datum using Python

2084
2
Jump to solution
10-25-2012 01:45 PM
JohnWall
Regular Contributor
I am attempting to define the vertical datum for over 1,000 shapefiles using Python batch geoprocessing. However, I am strugling with figuring out the code to add in the vertical datum. This is what I have so far:

#Start Space import sys import os import arcpy from arcpy import env from arcpy.sa import *  arcpy.env.workspace = "C:/gis/indian" LASdata = "C:/gis/indian"  #Check out extensions arcpy.CheckOutExtension("3D") arcpy.CheckOutExtension("Spatial") arcpy.CheckOutExtension("GeoStats")  #Begin processing files = os.listdir(LASdata) for file in files:     if file.endswith(".las"):         baseNom = "C:/gis/indian/" + file[:-4]          #LAS to Multipoint         outname = baseNom+".shp"         try:             arcpy.LASToMultipoint_3d(file, outname, 1, "5", "ANY_RETURNS")             print "I've finished Shapefile with " + file          except:             print "I had LAS to Multipoint issues with file: " + file          try:             coor = arcpy.SpatialReference('WGS 1984 UTM Zone 16N', 'North American Vertical Datum 1988')             arcpy.DefineProjection_management(outname, coor)         except:             print "I had issues projecting the data"             print arcpy.GetMessages()


Can someone please help me with defining the vertical datum for this data?

Thanks in advance.
-John
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
NeilAyres
MVP Alum
As a first thought, why not dump the shapefile output and instead create the output of the LAS conversion in a goedatabase inside a feature dataset where the vertical datum has been defined.
Cheers,
N

View solution in original post

0 Kudos
2 Replies
NeilAyres
MVP Alum
As a first thought, why not dump the shapefile output and instead create the output of the LAS conversion in a goedatabase inside a feature dataset where the vertical datum has been defined.
Cheers,
N
0 Kudos
JohnWall
Regular Contributor
As a first thought, why not dump the shapefile output and instead create the output of the LAS conversion in a goedatabase inside a feature dataset where the vertical datum has been defined.
Cheers,
N


Thanks for the reply and sorry for the long delay in responding. That did the trick I was wanting!
0 Kudos