Hi,
I am creating a GP tool that will have a input feature layer and also have output feature class path. I have a custom logic which first is converting points layer data into a group of related points and then each group of related points are converted into single line or not.
But there are different types of relationship between these related points. One basic use is to create a straight line from the points. Next one can be there will always be 3 points in that case we need to create an arc. In another use case, points will be created as closed arc and also another one is where a closed square will be created. This will be identified using a custom logic into which related points will fall into.
My first question is can we handle all these cases and different shapes to put into a line/poly line output feature class.
And second question is what is a best way to handle this? Should we iterate through all these related points to create poly lines which will be inserted into some table and then at last will be converted to our mentioned output feature class. Or is there any existing GP tool that can help?
What I have done is first I created an empty feature class and then creating lines from related points into the feature class. But I can't seem to find any API to create arc or closed arc using arcpy.
@AlfredBaldenweck @HaydenWelch @BlakeTerhune @JakeSkinner @Luke_Pinner
Creating a circle line feature in Pro (3.3.1) exports to this Esri JSON:
{
"displayFieldName" : "",
"fieldAliases" : {
"OBJECTID" : "OBJECTID",
"Shape_Length" : "Shape_Length",
"MyCustomField" : "MyCustomField"
},
"geometryType" : "esriGeometryPolyline",
"spatialReference" : {
"wkid" : 3008,
"latestWkid" : 3008
},
"fields" : [
{
"name" : "OBJECTID",
"type" : "esriFieldTypeOID",
"alias" : "OBJECTID"
},
{
"name" : "Shape_Length",
"type" : "esriFieldTypeDouble",
"alias" : "Shape_Length"
},
{
"name" : "MyCustomField",
"type" : "esriFieldTypeString",
"alias" : "MyCustomField",
"length" : 255
}
],
"features" : [{"attributes":{"OBJECTID":3,"Shape_Length":37416.412812405986,"MyCustomField":null},"geometry":{"curvePaths":[[[409829.45079999976,6584678.9290999994],{"a":[[409829.45079999976,6584678.9290999994],[404882.20972270775,6587993.5806217846],0,1]}]]}}]
}
Creating an ellipse line feature in Pro (3.3.1) export to this Esri JSON:
{
"displayFieldName" : "",
"fieldAliases" : {
"OBJECTID" : "OBJECTID",
"Shape_Length" : "Shape_Length",
"MyCustomField" : "MyCustomField"
},
"geometryType" : "esriGeometryPolyline",
"spatialReference" : {
"wkid" : 3008,
"latestWkid" : 3008
},
"fields" : [
{
"name" : "OBJECTID",
"type" : "esriFieldTypeOID",
"alias" : "OBJECTID"
},
{
"name" : "Shape_Length",
"type" : "esriFieldTypeDouble",
"alias" : "Shape_Length"
},
{
"name" : "MyCustomField",
"type" : "esriFieldTypeString",
"alias" : "MyCustomField",
"length" : 255
}
],
"features" : [{"attributes":{"OBJECTID":4,"Shape_Length":43604.943501478185,"MyCustomField":null},"geometry":{"curvePaths":[[[399919.55800000019,6592293.0635000002],{"a":[[399919.55800000019,6592293.0635000002],[403892.76152614655,6591110.3424503561],0,1,1.2814744564857963,9244.3980018598413,0.44843380967153262]}]]}}]
}