I discovered a problem with TIN coordinate systems when importing a TIN using the LandXML to TIN tool. First the tool did not recognize the current output coordinate system environment, and to boot, the Define Projection tool does not work with TINs.
This problem was verified with 10.0 sp5 and 10.1 SP1.
- NIM085938 Cannot use Define Projection Tool on TINs.
- NIM085906 LandXML to TIN tool is not respecting the environment setting for output coordinate system.
Two workarounds were identified:
1. Open the properties of the TIN and then manually define it
2. I wrote a little python function that works around the issue. (You could use this within a Python script, implement this as a script tool, or use it in ModelBuilder inside the Calculate Value tool.)
import os
import shutil
import arcpy
def DefineProjectionForTin(tin,prj):
wks = os.path.dirname(tin)
tempGrid = arcpy.CreateScratchName("","","RasterDataset",wks)
arcpy.CreateRasterDataset_management(wks,
os.path.basename(tempGrid))
arcpy.DefineProjection_management(tempGrid,dataPrj)
shutil.copyfile(os.path.join(tempGrid,"prj.adf"),
os.path.join(tin,"prj.adf"))
arcpy.Delete_management(tempGrid)
return tin