Global Mapper Pro

Adding attributes to features from a text file

mirlz
mirlz Global Mapper User
edited March 2010 in GIS Data Sources
Hi,
I have this shp file which consists of more than 40000 features, I have a text file which contains all the attributes that I need to add in to each and every one of the feature (attributes are different for every feature).
How do I go about adding the attributes in through the text file?

Comments

  • global_mapper
    global_mapper Administrator
    edited March 2010
    While you can't add attributes directly from a text file, if your text file has attributes for each feature in order, you can load the text file into Excel and then save it as a DBF file in the same folder and with the same name as the SHP file, then the attributes will be picked up from the DBF file when you load the SHP file.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • mirlz
    mirlz Global Mapper User
    edited March 2010
    Hm, so let's say I want to add ID to each feature, I'll do it like this?
    untitled-11.jpg

    There is specific attributes that needs to be added to the specific feature though, how should I do it so that the correct attributes are added to the correct feature?

    Thanks so much for your prompt reply =)

    Regards
    Eugenia
  • global_mapper
    global_mapper Administrator
    edited March 2010
    Eugenia,

    It wouldn't be quite like that, the column header would be ID, with the values below it. Each attribute name would only exist once at the top of the file. For this to work with the features from the SHP file there would have to be a record in your DBF file for each feature in the SHP file, and they would both have to be in the same order (i.e. the attributes for the first feature in the SHP file would be the first line of data in the DBF file).

    If that isn't possible there really isn't any way to automatically match the attributes to features, you would have to manually assign them by editing the features.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • mirlz
    mirlz Global Mapper User
    edited March 2010
    Oh~ so you mean its something like this instead right?
    untitled-12.jpg

    Okay, because the shp file was passed to me from another person, he did gave me a txt file which contains all the attributes in order but I'm not sure whether or not the first line of attributes is the first feature in the shp file.

    Is there any way for me to know which is the first feature made in shp file? If not, I guess I could try this method first.

    Thanks =)

    Regards
    Eugenia
  • mirlz
    mirlz Global Mapper User
    edited March 2010
    I've found the solution to my problem already.

    Thanks a lot!

    Regards
    Eugenia
Sign In or Register to comment.