How to set the In_Features of Create Tin / TopotoRaster Geoprocessors

2825
7
Jump to solution
10-28-2013 06:45 AM
KeaganAllan
Occasional Contributor
Hi,

I was hoping someone may be able to post the correct syntax to correctly define some of the parameters of the Create Tin / Topo o Raster Geoprocessors?

For example:

With Create Tin:

I can set the input vector, but do not know how to define the input fields, Softline / Hardline or Tags.

 Dim GP As New Geoprocessor         Dim RasConv As ESRI.ArcGIS.Analyst3DTools.TinRaster = New ESRI.ArcGIS.Analyst3DTools.TinRaster          RasConv.in_tin = Label1.Text & "\" & TextBox1.Text         RasConv.out_raster = Label1.Text & "\" & TextBox1.Text & "R1"         Inras1 = GP.Execute(RasConv, Nothing)



According to the help:

[[in_feature_class, height_field, SF_type, tag_value],...] - can all be used to define the input feature, the height field, SF_Type and Tag_Value.

For the life of me I cannot get this to work.

Thanks, if anyone can help.

K
0 Kudos
1 Solution

Accepted Solutions
SachinKanaujia
Deactivated User
Hi,
As per the sample in the link you provided it says you can pass these values in the same string. Did you try that?

CreateTin_3d (out_tin, {spatial_reference}, {in_features}, {constrained_delaunay})


.in_features = ("C:\Temp\Tin\A" & "," & "Height Field" & "," & "Tag Field") <==Modify this as below but make sure u have these fields

in_feature_class = The feature class/shapefile you want as input

height_field = Shape.Z if you have a Z value

SF_type = any of the values below
masspoints ???Elevation points that will be imported as nodes
hardline or softline ???Breaklines that enforce a height value
hardclip or softclip ???Polygon dataset that defines the boundary of the TIN
harderase or softerase ??? Polygon dataset that defines holes in the interior portions of the TIN
hardreplace or softreplace ???Polygon dataset that defines areas of constant height
hardvaluefill or softvaluefill ???Polygon dataset that defines tag values for the triangles based on the integer field specified in the tag_value column

tag_value = The integer field from the attribute table of the feature class that will be used when the surface feature type is set to a value fill option

Suppose I have a field in shapefile called TAGNAME

Example;

.in_features = ("ABC.shp" & " " & "Shape.Z" & " " & "masspoints" & " " & "TAGNAME")

This is just an example, use whatever values you have and ignore whatever you dont have. I hope that helps !!!

View solution in original post

0 Kudos
7 Replies
SachinKanaujia
Deactivated User
You should try creating a TinWorkspace using ITinWorkspace

http://help.arcgis.com/en/sdk/10.0/java_ao_adf/api/arcobjects/index.html (you can look at .net reference)

IWorkspaceFactory pWorkspaceFactory = new TinWorkspaceFactoryClass();
IWorkspace pWorkspace = pWorkspaceFactory.OpenFromFile("<Folder path>", 0);
ITinWorkspace pTinWorkspace = pWorkspace as ITinWorkspace;
ITin pTin = pTinWorkspace.OpenTin("Tin file name");

RasConv.in_tin = pTin

This is just a sample code which I haven't tested but should work with minimal modifications. I hope this helps
0 Kudos
KeaganAllan
Occasional Contributor
Hi Sachin,

Thank you for that, I will definitely look at using the  ITinWorkspace.
I am however looking at using the "Geoprocessor" route as I have a number of other small Functions running that will require the same syntax as the example I provided.

I cannot find any documentation online how to define these parameters, so was hoping to find a small example of how best to do this.

I was thinking along the lines of:

.in_features = ("C:\Temp\Tin\A" & "," & "Height Field" & "," & "Tag Field")


But of course that doesnt work, but am I on the right line of thought?

Thanks,

K
0 Kudos
SachinKanaujia
Deactivated User
Can you provide me the link to the help you are looking at for Tin to Raster Geoprocessor? Whatever parameters are available can be set using the setter methods. Look at the reference below.

http://resources.arcgis.com/en/help/arcobjects-java/api/arcobjects/com/esri/arcgis/geoprocessing/too...

0 Kudos
KeaganAllan
Occasional Contributor
Good day,

The online help has it here:

http://resources.arcgis.com/en/help/main/10.1/index.html#//00q90000001v000000

If you look at the table it defines the various input required.
I am using VB.Net and GP.execute

I use this a lot to do other processes, I just do not know how to change the input parameters from the defaults.

Thanks,

K
0 Kudos
SachinKanaujia
Deactivated User
Hi,
As per the sample in the link you provided it says you can pass these values in the same string. Did you try that?

CreateTin_3d (out_tin, {spatial_reference}, {in_features}, {constrained_delaunay})


.in_features = ("C:\Temp\Tin\A" & "," & "Height Field" & "," & "Tag Field") <==Modify this as below but make sure u have these fields

in_feature_class = The feature class/shapefile you want as input

height_field = Shape.Z if you have a Z value

SF_type = any of the values below
masspoints ???Elevation points that will be imported as nodes
hardline or softline ???Breaklines that enforce a height value
hardclip or softclip ???Polygon dataset that defines the boundary of the TIN
harderase or softerase ??? Polygon dataset that defines holes in the interior portions of the TIN
hardreplace or softreplace ???Polygon dataset that defines areas of constant height
hardvaluefill or softvaluefill ???Polygon dataset that defines tag values for the triangles based on the integer field specified in the tag_value column

tag_value = The integer field from the attribute table of the feature class that will be used when the surface feature type is set to a value fill option

Suppose I have a field in shapefile called TAGNAME

Example;

.in_features = ("ABC.shp" & " " & "Shape.Z" & " " & "masspoints" & " " & "TAGNAME")

This is just an example, use whatever values you have and ignore whatever you dont have. I hope that helps !!!
0 Kudos
RichardMoussopo
Frequent Contributor

This is good for one input feature, what if I have two?

[[in_feature_class, height_field, SF_type, tag_value], [in_feature-class2, height_field, SF_type, tag_value]]

tried this but no luck.

0 Kudos
KeaganAllan
Occasional Contributor
THANK YOU!!

your response was clear and works!
You have saved me a ton of work!

Awesome!

I will use this for the other issues I have been having. To think it was just a comma issue.

Cheers!
K
0 Kudos