+ Reply to Thread
Results 1 to 8 of 8

Thread: Importing Text file for Lines

  1. #1
    rayngwt is offline Global Mapper User
    Join Date
    Apr 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Importing Text file for Lines

    Hi,

    Hoping somebody can help me.
    I have a txt file in this structure, with thousands of entries records.

    F1,lat1,lon1,lat2,lon2,attrib1,attrib2,attrib3...
    D5,-35,135,-45,145,345,102,line4
    D5,-45,145,-30,132,665,203,line56

    I need to import them but I need each record line to be an individual feature-line, meaning each feature has only 2 vertices. How can I do this using the import ascii function? ... as it keep tesellating the records together which is not what I want.

    Thanks a million, Raymond

  2. #2
    global_mapper is offline Administrator
    Join Date
    Jun 2007
    Posts
    7,236
    Thanks
    2
    Thanked 611 Times in 594 Posts

    Default

    Raymond,

    Unfortunately there is not currently a way to load generic text files with anything more than one coordinate pair per line unless your ascii text file uses the WKT (well-known-text) format. You will only be able to get one pair of coordinates from each as it is now.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com

  3. #3
    rayngwt is offline Global Mapper User
    Join Date
    Apr 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Import lines

    Hi Mike,

    Thanks for the reply. Yeah, there's only one par of co-ords each line, the rest are attributes, so the example i gave might be confusing.

    Its something like that ...
    ABC,lat1,lon1,lat2,lon2,Name,label1,etc..
    The problem I have is that the pair of vertices connect to records below the first record.

    Is this possible?

    Thanks, Raymond

  4. #4
    global_mapper is offline Administrator
    Join Date
    Jun 2007
    Posts
    7,236
    Thanks
    2
    Thanked 611 Times in 594 Posts

    Default

    Raymond,

    When I say a 'pair' of coordinates, I meant one X and one Y. Your lines have 2 pairs of coordinates per line making a line segment, which is what is not supported. You could import the data as 'Point Only' and get one of the pairs of coordinates from your text file for a point feature, but you can't get both.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com

  5. #5
    rayngwt is offline Global Mapper User
    Join Date
    Apr 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Line coordinates

    Hi Mike,

    Thanks for clearing that up. I will try to imagine some other way.

    Thanks, Raymond

  6. #6
    holeinthe is offline Global Mapper User
    Join Date
    Apr 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Any luck?

    I have the exact same situation--I want a vector file with thousands of separate line segments, and I've got start and end coordinates for each segment.

    Could I treat them as polygons--e.g., draw each segment from start to end, then back to start?
    Lat1,Lon1
    Lat2,Lon2
    Lat1,Lon1

    Then throw in the other attributes, put a blank line in the script, and move on to the next line segment?

    If GM can't handle this, does anyone know what I could do?

    Thanks

  7. #7
    global_mapper is offline Administrator
    Join Date
    Jun 2007
    Posts
    7,236
    Thanks
    2
    Thanked 611 Times in 594 Posts

    Default

    So long as you just have one coordinate on each line you should be able to easily load that file using the File->Open Generic ASCII Data File menu command. See http://globalmapper.com/helpv11/Gene...structions.doc for details on the accepted ASCII formats.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com

  8. #8
    mcb9060 is offline Global Mapper User
    Join Date
    May 2008
    Posts
    38
    Thanks
    7
    Thanked 3 Times in 3 Posts

    Default More on import lines

    Hi there,

    just an idea. It may be possible to rearrange the two coordinate pairs that define the line into something like the ArcInfo generate format, see link here http://intevation.de/~jan/gen2shp/gen2shp.html, bottom of page and then open into GM as a generic ascii file. Attributes won't come in though, so possible to export as a shape file and append attributes in the dbf file. In other situations I have used ArcInfo generate format and it has worked well.

    Regards

    Mark

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts