Loading Line files into GM

munfordmunford Global Mapper UserPosts: 14Trusted User
edited September 2012 in Technical Support
Hi,

I have an excel dataset of start of line and end of line coordinates in the following format...



SOL x

SOL y

EOL x

EOL y






530912.18




5407864.52




5407864.52







5405881.86







Can someone please tell me the best way to load this data into global mapper so that it creates lines.

Comments

  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited July 2012
    If you can add an additional column to each row that is formatted as WKT text, like LINESTRING( SOLx SOLy, EOLx EOLy ) then you can load the file with the File->Open Generic ASCII Text File menu command and select the WKT coordinate formatting option and it would load as lines. See http://en.wikipedia.org/wiki/Well-known_text for information about the WKT format for spatial data.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • munfordmunford Global Mapper User Posts: 14Trusted User
    edited July 2012



    x
    y
    x
    y


    LINESTRING( SOLx SOLy, EOLx EOLy)
    530875.67
    5407949.82
    533017.14
    5405881.86



    Hi Mike,

    I tried the format above and selecting the WKT format and it still didnt work....


    Am I doing something wrong still?

    Thanks

    Sarah
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited July 2012
    Sarah,

    The actual numeric values need to be in the line replacing SOLx, etc. Like the following:

    LINESTRING( 530875.67 5407949.82, 533017.14 5405881.86 )

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • melburymelbury Global Mapper User Posts: 7
    edited September 2012
    HI Mike, I'm pulling my hair out on what is probably a very simple issue. I cannot color the lines I'm importing! Can you please advise.
    I have a csv with linestring + some attributes. I can define line (pen) style and width but not color. I've tried line_color, Pen_color, color and RGB + name. Can you help - it's driving me nuts I've spent all morning trying stuff!

    V13.2 import looks fine except color which is always Gray!



    NAME
    PEN_COLOR
    Pen_style
    Pen_width
    Line string for export


    148866
    RED
    DASH
    3
    LINESTRING(1801656 5825471,1825465 5814409)


    123569
    RGB ( 0, 255, 0)
    DOT
    6
    LINESTRING(1800656 5805471,1828565 5814309)


    227408
    RGB ( 25, 0, 250)
    solid
    9
    LINESTRING(1802656 5845471,1825565 5814309)

  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited September 2012
    You should be able to use PEN_COLOR, but don't put spaces in the color definition. Try RGB(0,255,0) and see if that works. I think I will also update this to make it less picky for future releases.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • melburymelbury Global Mapper User Posts: 7
    edited September 2012
    Thanks Mike, color lines now work :) great if you could add some flexibility for spaces as it consumed a lot of my time...

    Is there a way I can color the points at the ends of my line, preferably define different colors, and maybe even icons?

    Appreciate your expertise as always

    Mike
  • melburymelbury Global Mapper User Posts: 7
    edited September 2012
    Thanks Mike, color lines now work :) . Great if you could add some flexibility for spaces as it consumed a lot of my time...


    Is there a way I can color the points at the ends of my line, preferably define different colors, and maybe even icons?

    Appreciate your expertise as always

    Mike
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited September 2012
    Mike,

    Actually I added just that flexibility in v14, so if you upgrade to that anything should work, as should some common color names, like Blue, Red, Green, etc.

    For the points at the end of the lines, you would need separate feature lines for the end points and then you can assign whatever symbol you want to those points.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • melburymelbury Global Mapper User Posts: 7
    edited September 2012
    Can I also add - is there a way to define the label (color, size, attribute used, etc) - each of my lines has attributes with different values so I cannot apply a common style.

    Finally - FYI if I have a csv I import with the LINESTRING in the middle of some columns it plots location OK however when I view the attributes in GM it seems to misalign by one from the point of the linestring onwards. I overcome this by putting linestring as last column. make sense?












    Line Name
    Line_color
    Line string for export
    Pen_style
    Pen_width


    219802 RADIOWORKS STUDIO MASTERTON, POPOITI
    RGB(255,0,0)
    LINESTRING(1822886 5462479,1815480 5439777)
    SOLID
    6



    In GM messed up values + missing last attribute and of course it doesn't use pen size or width attributes.

    Name=<NO LABEL>
    Feature Type=Unclassified Line Feature
    Geometry=2 vertices, Length: 23.875 km, Bounds: (2725499.607, 6001499.721, 2732900.245, 6024199.639)
    Map Name=fm export last.csv
    Line Name=219802 RADIOWORKS STUDIO MASTERTON, POPOITI
    Line_color=RGB(255,0,0)
    Line string for export=SOLID
    Pen_style=6


    Thanks Mike
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited September 2012
    Ah right you are, the column indices did get shifted by one if the WKT string wasn't the last one. I've got that fixed now. I have placed a new build at http://www.globalmapper.com/global_mapper14.zip with the latest changes for you to try. Simply download that file and extract the contents into your existing v14.xx installation folder to give it a try. If you are using the 64-bit v14 version there is a new build at http://www.globalmapper.com/global_mapper14_64bit.zip .

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
Sign In or Register to comment.