Hello,
i need to delete a specific feature from a shapefile using IDL but i do not find any usefull tool or function. That is my simplified code:
myshape = OBJ_NEW('IDLffShape', file);
Get the number of entities so we can parse through them
myshape->GetProperty, N_ENTITIES=num_ent;
Parsing through the entities
FOR x=0, (num_ent-1) DO begin ;
Get the Attributes for entity x
attr = myshape->GetAttributes(x)
IF attr.ATTRIBUTE_0 EQ 'Roi_Test_v2 [RECORD=2]' THEN BEGIN
IF (Stats.Mean LT 7000) THEN myshape->DestroyEntity, ent
OBJ_DESTROY, shape ENDIF
ENDFOR
The myshape->DestroyEntity does not work. I obtains the following message:
Only one class has training samples within the valid image area.
Thay you for any feedback.
|