Global Mapper v25.0

Create points/TIN from CSV file containing Point#, distance, height, bearing from N

BillB
BillB Global Mapper UserTrusted User
edited May 2013 in Technical Support
Not sure whether this is an Elevation Data question or a GM Scripting question! Taking the output from a digital level, I can create a CSV file containing: Point#, distance from survey station, height, and bearing (0-360) from N.

I would like to generate a series of 3d points which could be converted to a TIN.

Is this process possible, would I need to use a script, and if so, can you point me to the right commands to use to read the CSV and create the points? I presume that I would need to define a start point (the survey station) as well, in the same way that the COGO input dialog can define a start point.

Many thanks, Bill.

Comments

  • global_mapper
    global_mapper Administrator
    edited May 2013
    Bill,

    There isn't currently a way to load a file of offsets from a single location like that. This is something that could easily be done with the SDK as it has the functions you need to calculate the locations and create the points, but that requires real programming and not just scripting. If you have interest in that I can provide more information.

    Another option would be to maybe add something to the Generic ASCII Text import to specify that you are loading distance and bearing and then prompt the user for a start location. This would be more complex though. It might make more sense to add it to the script first, then to the user interface.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
  • BillB
    BillB Global Mapper User Trusted User
    edited May 2013
    > requires real programming and not just scripting

    Ho ho - a bit beyond my capability I fear!

    > Another option would be to maybe add something to the Generic ASCII Text import to specify that you are loading distance and bearing and then prompt the user for a start location. This would be more complex though. It might make more sense to add it to the script first, then to the user interface.

    First option sounds great - the ASCII Text Import dialog was the first place I looked for this function. I guess it would need a new option under Coordinate Column Order / Format: Point#, distance, height, bearing. However I don't think that there is a particular format for such data - we would be creating it from a downloaded set of "Pt#, distance, elevation" - and manually adding a bearing which is read off the level as it points at the target.

    If you think that a scripted solution will get an answer sooner, I'm all for that.

    Thanks, Bill
  • BillB
    BillB Global Mapper User Trusted User
    edited May 2013
    Just thought of something else, not directly related to this question but anticipating your next move...

    When you update the GlobalMapper.exe file, do you update the GlobalEnergyMapper.exe at the same time? We have moved to GEM to try out the new features, so would hope that all updates would be made on both applications.
  • global_mapper
    global_mapper Administrator
    edited May 2013
    For the GEM builds they are always updated at the same time. So whenever you see a new global_mapper14.zip build, know there is also a new global_energy_mapper14.zip build in the same folder.

    I'll think on the other one for a bit.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
  • global_mapper
    global_mapper Administrator
    edited May 2013
    I've completed updating the IMPORT_ASCII script command to support providing a start position and a distance/bearing text file to create a series of points some distance and bearing from that start position. Here is what the IMPORT_ASCII command would look like for a file like you describe:

    IMPORT_ASCII FILENAME="D:\TEMP\EXPORT TEST\DIST_BEARING_TEST.TXT" TYPE=DIST_BEARING \
    COORD_DELIM=COMMA COORD_ORDER="CUSTOM,2,4,3" START_POS="-90,39" \
    INC_COORD_LINE_ATTRS=YES COL_HEADERS=YES PROJ="EPSG:4326"

    Note the COORD_ORDER uses a new CUSTOM type, with the columns specified being distance,bearing,height (the height column is optional). The START_POS specifies the start location in the projection of the layer, which is EPSG:4326 (lat/lon/WGS84) in this case.

    I have placed a new build at http://www.bluemarblegeo.com/downloads/global-mapper/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.bluemarblegeo.com/downloads/global-mapper/global_mapper14_64bit.zip .

    Here is the file contents that I tested with:

    Point_desc,distance,height,bearing
    500m at 45 deg,500,37.2,45
    300m at 180 deg,300,3,180
    1200m at 270 deg,1200,1,270

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.bluemarblegeo
  • BillB
    BillB Global Mapper User Trusted User
    edited May 2013
    Thank you very much, Mike, we'll play with the script and see how it goes. :)