Skip to content

Commit 66b593f

Browse files
committed
modify code for connectdown
1 parent 158b0fa commit 66b593f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/ConnectDown.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,12 @@ int connectdown(char *pfile, char *wfile, char *ad8file, char *outletshapefile,
713713
OGR_G_SetPoint_2D(hGeometrysh, 0, x, y);
714714
OGR_F_SetGeometry( hFeaturesh, hGeometrysh );
715715
OGR_G_DestroyGeometry(hGeometrysh);
716+
if( OGR_L_CreateFeature( hLayersh, hFeaturesh ) != OGRERR_NONE )
717+
{
718+
printf( " warning: Failed to create feature in shapefile.\n" );
719+
//exit( 1 );
720+
}
721+
716722
OGR_F_Destroy( hFeaturesh );
717723

718724

@@ -769,6 +775,11 @@ int connectdown(char *pfile, char *wfile, char *ad8file, char *outletshapefile,
769775
OGR_G_SetPoint_2D(hGeometryshmoved, 0, x, y);
770776
OGR_F_SetGeometry( hFeatureshmoved, hGeometryshmoved );
771777
OGR_G_DestroyGeometry(hGeometryshmoved);
778+
if( OGR_L_CreateFeature( hLayershmoved, hFeatureshmoved ) != OGRERR_NONE )
779+
{
780+
printf( " warning: Failed to create feature in shapefile.\n" );
781+
//exit( 1 );
782+
}
772783
OGR_F_Destroy( hFeatureshmoved );
773784

774785

0 commit comments

Comments
 (0)