Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
 when the intersection points features are created
  • Loading branch information
AlbertGallegoJimenez committed Dec 15, 2023
1 parent d49f9cf commit d460d9f
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/tools/computeIntersections.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,11 @@ def execute(self, parameters, messages):
# == 1. Baseline Intersection Points ==
basePoints = intersect_baseline(transectsShapely, baseShapely)
# Create an empty Feature Class with empty field
arcpy.management.CreateFeatureclass("",
baseOutFeature,
"POINT",
if arcpy.Exists(baseOutFeature):
arcpy.Delete_management(baseOutFeature)

arcpy.management.CreateFeatureclass(out_name=baseOutFeature,
geometry_type="POINT",
spatial_reference=sr)
arcpy.management.AddField(baseOutFeature, transectsID, 'SHORT')

Expand All @@ -132,9 +134,10 @@ def execute(self, parameters, messages):
# == 2. Shoreline Intersection Points ==
shorePoints = intersect_shorelines(transectsShapely, shoreShapely)
# Create an empty Feature Class with empty fields
arcpy.management.CreateFeatureclass("",
shoreOutFeature,
"POINT",
if arcpy.Exists(shoreOutFeature):
arcpy.Delete_management(shoreOutFeature)
arcpy.management.CreateFeatureclass(out_name=shoreOutFeature,
geometry_type="POINT",
spatial_reference=sr)
arcpy.management.AddField(shoreOutFeature, transectsID, 'SHORT')
arcpy.management.AddField(shoreOutFeature, shoreID, 'SHORT')
Expand Down

0 comments on commit d460d9f

Please sign in to comment.