Export Vector / Split by attributes syntax

VincentVincent Global Mapper UserPosts: 28Trusted User
edited November 2013 in GM Script Language
Hi
I have XYZ + Class (as a fourth column) ASCII files. Here is an example:
147305.30 6787000.20 -0.68 23
147307.27 6787008.97 -1.53 23
147311.74 6787009.74 -1.59 23
147314.25 6787001.83 -1.22 23
147000.00 6787889.90 -0.45 20
147000.02 6787905.63 -0.58 20
147000.02 6787908.77 -0.60 20
147000.03 6787911.15 -0.53 20
....
I would like to split these files based on the class attribute (4th colum = ATTR_1), in this case one file containing the Class 20 points and onother file with the Class 23 points.
I tried to use the SPLIT_BY_ATTR=YES command with the FILENAME_ATTR_LIST and FILENAME_INCLUDE_ATTR_NAME options, but I did not undertsand the syntax for the FILENAME_ATTR_LIST.
I trid somthing like this
FILENAME_ATTR_LIST="ATTR_1=20,ATTR_1=23"
but It does not work.
Thanks for your help.
Best regards

Vincent

Comments

  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited November 2013
    Vincent,

    The FILENAME_ATTR_LIST is an "and" list, so all of the attribute conditions have to be true. Since ATTR_1 cannot be both 20 and 23 it wouldn't work for any features. You should instead use 2 separate EXPORT_VECTOR commands, one with FILENAME_ATTR="ATTR_1=20" and another FILENAME_ATTR="ATTR_1=23" to export just those values. Or if really you just want a separate export for each value use FILENAME_ATTR="ATTR_1".

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Guru
    geohelp@bluemarblegeo.com
    Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
  • VincentVincent Global Mapper User Posts: 28Trusted User
    edited November 2013
    Hi Mike,
    Thanks for your answer. It works fine (it was finally much miore easier than expected !)
    Regards

    Vincent
Sign In or Register to comment.