Global Mapper Pro Coming Soon

Export duplicate points found only

I'm trying to use the 'IF' statement in gm script. I'm trying to export only files that duplicated points are founded after it process the 'MARK_DUPLICATES' but it just does not work. Please help.


GLOBAL_MAPPER_SCRIPT VERSION=1.00

DEFINE_VAR NAME="FOLDER" VALUE="folder path "
DIR_LOOP_START DIRECTORY="%FOLDER%" FILENAME_MASKS="*.shp"
IMPORT FILENAME="%FNAME_W_DIR%"

EDIT_VECTOR MARK_DUPLICATES=YES IGNORE_ATTRS=YES

DEFINE_VAR NAME="DUP" VALUE="DUPLICATE"
IF COMPARE_STR="%DUP%=Y"
EXPORT_VECTOR FILENAME="%FOLDER%\OUTPUT\%FNAME_WO_EXT%-DUP.shp" TYPE="SHAPEFILE" SHAPE_TYPE=POINTS INC_LAYER_ATTR=NO INC_ELEV_ATTR=NO
END_IF

UNLOAD_ALL
DIR_LOOP_END
Sign In or Register to comment.