Doing viewsheds in bulk

Steve DSteve D Global Mapper UserPosts: 27Trusted User
edited March 2015 in Suggestion Box
I currently use an older version of GM, so pardon my ignorance if this possible in a newer version, but it'd be fantastic if I could load, say, a .csv file that GM would use to generate a number of viewsheds for.

The .csv file could have all the name, coordinates and other viewshed options for each site. In my case, most of my data is usually in a spreadsheet already and this would not be a problem to generate.

Even better could be if it downloaded the required SRTM data automatically and temporarily for each viewshed.

Basically, that is how my process works now, download SRTM data for an area as large as my expected range as centered on a site, create the viewshed, delete the srtm data and then move on to the next one and so forth.

If this is something currently scriptable (in a way that a monkey could understand), or again, something available in a newer release, let me know. Thanks!

Comments

  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited July 2014
    You can do that already in the latest release! If you load the points from the CSV file with File->Open Generic ASCII Text File, then select them with the Digitizer Tool, then go to the View Shed Tool and left-click, you will be prompted to do a view shed at each point. See View Shed Tool for documentation on the attributes that are recognized for each point to customize the parameters for the calculation at that view shed. Any points that are missing an attribute will just use the values you set up on the view shed dialog. You would also just load whatever terrain data you needed at the start with File->Download Online Imagery/Data.

    There is also a new tool in v15 under the Analysis menu to create a new layer with the count of layers at any location, so you can easily create a grid with the count of view sheds covering each location if you need that.

    You can get the latest v15 release from Global Mapper Downloads and give it a try.

    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
  • Steve DSteve D Global Mapper User Posts: 27Trusted User
    edited July 2014
    Oh, fantastic, thanks for the quick reply Mike!
  • Steve DSteve D Global Mapper User Posts: 27Trusted User
    edited July 2014
    After playing with version 15 for a bit, some thoughts:

    It would be handy if exporting viewsheds to .CSV would include the same attributes that the viewsheds take in. (Not hard to convert right now, but again, would be handy.) I had figured I'd make a quick template to play around with and discovered it would be just as easy to convert my existing data.

    It would also be great if more of the attributes of a viewshed were automated. Particularly the description of the viewshed. A couple dozen "View Shed Analysis 1" to rename is a bit unwieldy.

    It would be convenient too that if there is no terrain data layer selected, that it automatically downloads the terrain data for an area within the radius of that particular viewshed, (with a warning that it's using SRTM data, or somesuch) does its calcs, and then carries on to the next one. I've got a very large geographical area (across province of British Columbia) so downloading small areas as I need them (which doing manually is part of my current work process) would work much better than trying to download the entire province. Granted, I *do* have a copy of the entire SRTM data for the province of BC, but I'm sort of afraid of loading the entirety of that at once - I don't think my work station would be too happy about that. :)
  • samknightsamknight BMG Staff Posts: 88
    edited July 2014
    Hi Steve,
    I'll note down your suggestions as enhancement requests, thanks for the feedback on those. For handling a large area of SRTM coverage, you could tile out the dataset and create a map catalog of it for loading/processing into Global Mapper. This would allow you to only load up the parts of the data that you are working with as you move around the province. So it would only require one chunk of time to tile it out on an export, then subsequent uses of the data via map catalog would be much faster. Working with your local data would be greatly faster than relying on a web connection to get all of your data for analysis. Does that make sense?

    Regards,
    Sam Knight
    Director of Product Management
    Blue Marble Geographics
  • melburymelbury Global Mapper User Posts: 7
    edited March 2015
    You can do that already in the latest release! If you load the points from the CSV file with File->Open Generic ASCII Text File, then select them with the Digitizer Tool, then go to the View Shed Tool and left-click, you will be prompted to do a view shed at each point. See View Shed Tool for documentation on the attributes that are recognized for each point to customize the parameters for the calculation at that view shed. Any points that are missing an attribute will just use the values you set up on the view shed dialog. You would also just load whatever terrain data you needed at the start with File->Download Online Imagery/Data.

    There is also a new tool in v15 under the Analysis menu to create a new layer with the count of layers at any location, so you can easily create a grid with the count of view sheds covering each location if you need that.

    You can get the latest v15 release from Global Mapper Downloads and give it a try.

    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

    You can do that already in the latest release! If you load the points from the CSV file with File->Open Generic ASCII Text File, then select them with the Digitizer Tool, then go to the View Shed Tool and left-click, you will be prompted to do a view shed at each point. See View Shed Tool for documentation on the attributes that are recognized for each point to customize the parameters for the calculation at that view shed. Any points that are missing an attribute will just use the values you set up on the view shed dialog. You would also just load whatever terrain data you needed at the start with File->Download Online Imagery/Data.

    There is also a new tool in v15 under the Analysis menu to create a new layer with the count of layers at any location, so you can easily create a grid with the count of view sheds covering each location if you need that.

    You can get the latest v15 release from Global Mapper Downloads and give it a try.

    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

    Hey Mike, I've spent a few hours 'playing' with making and importing View Shed CSV. I've found a few funny's along the way plus got stuck so need your help :rolleyes:

    I have a spreadsheet - when i save as CSV and import I'm getting a one attribute offset when looking at attributes vs actual in CSV. My CSV contains


    GEOMETRY
    NAME
    RADIUS
    TRANSMITTER_HEIGHT
    RECEIVER_HEIGHT
    START_ANGLE
    SWEPT_ANGLE


    POINT( 2678000 6446000 )
    home
    16
    15
    2
    150
    220


    POINT( 2679000 6445000 )
    TEST 2
    25
    15
    2
    90
    120



    they appear one attribute off in the feature information as below:
    Name=<NO LABEL>
    Feature Type=Unknown Point Feature
    Geometry=Point location: 19468467.509 -4437356.507 (Lat/Lon: -37.17248410, 174.88821922)
    Index in Layer=0
    Map Name=test maxted fro import 2.csv
    NAME= [should be home from below]
    RADIUS=home [should be 16 as below]
    TRANSMITTER_HEIGHT=16 [should be 15 as below]
    RECEIVER_HEIGHT=15 [etc]
    START_ANGLE=2
    SWEPT_ANGLE=150



    If i export as tab delimited text from excel and leave import ascii on auto only point imports - I have to set TAB as delimiter in GM import then I get all attributes correctly.

    So once over that I have 2 points with some attributes and do viewshed (trial version 16.1 64 bit). I was hoping as per your text above that my values would override the default, but they don't- both viewshed are same radius, height etc. and ignore my start and sweep angles as well.

    What am i doing wrong? Main issue is my viewshed - other is FYI

    I'd also appreciate some help on defining color for each shed in my CSV - I don't know how to define that. I want each view shed use an assigned color RGB.

    Thanks in advance
    Mike
  • bmg_mikebmg_mike Global Mapper Guru Posts: 185Trusted User
    edited March 2015
    Mike,

    I took a look and was able to fix the issue with the attributes being off by one when the WKT-formatted coordinate field is at the beginning of the record rather than at the end as is more typical.

    I also added support for using RADIUS, TRANSMITTER_HEIGHT, RECEIVER_HEIGHT, START_ANGLE, and SWEPT_ANGLE for predefined attributes. What was supported before were the ArcGIS-recognized fields of RADIUS2 (for outer radius), OFFSETA (for transmitter height), OFFSETB (for receiver height), and AZIMUTH1/AZIMUTH2 for the start and end angle. See How Viewshed works for a description of the ArcGIS fields, not that you will need those.

    I also added support for a COLOR attribute to define the color for the view shed. Use a format like 'RGB(255,0,0)' for red.

    I have placed new builds with the latest changes at Global Mapper Downloads. Simply download the appropriate installer and run it to install the latest build.

    Thanks,

    Mike
    Global Mapper Guru
    geohelp@bluemarblegeo.com
    Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
  • Steve DSteve D Global Mapper User Posts: 27Trusted User
    I'm sure this is a bit of a necromancy here, but I'm doing the same thing as 5 years ago and documentation is still a bit light.  Continuing where I left off, if you will!  :)

    Mostly all I have now is a request to get the documentation up-to-date. https://www.bluemarblegeo.com/knowledgebase/global-mapper-21/ViewShed_Parameters.htm could probably use some updating.

    Mike's aforementioned addition of COLOR attribute is not documented and it appears to work fine with a format such hexadecimal RGBA, eg (ff000025) for a slightly transparent red.  So adding that and all expected formats would be nice.

    NAME for the point is appended to the viewshed's layer description as I asked once upon a time - thanks for that, but again it's also not documented.

    Anything else not documented?  It'd be nice to know all of it, I'm sure it'd help someone else who is in the same boat. 

    I don't really have any further suggestions.  Maybe, rather than hardcoding to an expected attribute name, if the viewshed dialog would allow me to assign an attribute to a function so I don't have to rename them (or duplicate them - as I have another program expecting certain names too) would be nice, but not the end of the world either.  It might help (from a user interface perspective) if the dialog hinted at the fact that attributes will take precedence over what is in the dialog too.  I can elaborate further if that doesn't make sense.

    Cheers,
    Steve
  • bmg_mikebmg_mike Global Mapper Guru Posts: 185Trusted User
    HI Steve,

    I made a todo item for our documentation to get updated. It looks like the only missing attributes in the documentation are COLOR and FRESFREQ, with FRESFREQ being used to specify the Fresnel zone frequency in GHz.

    I'll put in a request for user-selectable attribute names, but that would definitely be something for an advanced user.

    Thanks,

    Mike
    Global Mapper Guru
    geohelp@bluemarblegeo.com
    http://www.bluemarblegeo.com/
    Steve D
  • Steve DSteve D Global Mapper User Posts: 27Trusted User
    Oh, nice!  I'll be making use of that as well.  Thanks!
Sign In or Register to comment.