Global Mapper v25.0

WAsP roughness map

vkumar
vkumar Global Mapper User
edited March 2014 in Raster Data
Hi,

I have spent quite a lot of time trying to create a WAsP roughness map using Global Mapper.
First, I want to use the MRLC land cover data. This data is in the form of a geotiff. I have tried opening the geo-tiff, exporting it as a BIL and then re-loading it as an elevation file. However, this results in it displaying negative elevations while it should be actually displaying land use categories.

If that works, the next step would be to replace the land use categories with roughness lengths and then generating contours.
The contour map would then have to be somehow exported it in the WAsP roughness map which is different than the regular contours.

Searching for this on the web revealed the following:
"What's New in Version 9.03
"Updated WASP .map area export to support roughness values in a RV attribute in addition to ROUGH_L and ROUGH_R."

This implies that there is some kind of functionality in Global mapper for WAsP roughness maps but I can not find any further documentation.

Any further help on any of these topics would save my last remaining hair.

Thanks in advance.
vkumar
«1

Comments

  • global_mapper
    global_mapper Administrator
    edited September 2008
    vkumar,

    When you export your GeoTIFF as a BIL, what is going to be stored is the grayscale equivalent of the rendered color from the GeoTIFF file. Global Mapper has no way of knowing what the original land use codes were that the rendered image was created from. You would just need to compare the BIL map imported as elevations and converted to contour areas or lines with the color map to properly assign roughness values.

    Once you have your BIL "elevation" data in and have generated contour lines from it using the File->Generate Contours menu command (use a contour interval of 1 so that you get a line/area at the boundary of each land use type), you can then use the Search->Search by Attributes menu command to find lines with a particular value and assign attributes (like ROUGH_L and ROUGH_R) with the corresponding roughness values that you want to use. Those attributes will then be picked up on export to your Wasp .map file.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • mbaker
    mbaker Global Mapper User
    edited July 2010
    I am very interested in purchasing GM if it can help me with creating WAsP roughness maps. I haven't quite been able to tell if it can do what I want it to do through the forum, so I thought I'd reopen this thread...

    I have roughness raster files already created that I can bring to GM in any number of formats through conversion outside GM, including Idrisi RST or VCT, ESRI SHP (polygons) or grid, or even XYZ.

    I need to convert those files to WAsP .map roughness maps. Traditionally we've created the roughness maps by converting an XYZ file to .map in a utility in a program called WindFarm, but will no longer have access to that soon. Will I be able to create the WAsP roughness 'island' polygons from a raster or shapefile in some way? They will not be rougness contour lines.

    Thanks in advance for any insight!
    Matt
  • global_mapper
    global_mapper Administrator
    edited July 2010
    Matt,

    Your best bet would be to get the roughness polygons in ESRI SHP files, then load those into Global Mapper. If your files have roughness values for the left and right side of the polygons as attributes, if you rename those attributes to ROUGH_L and ROUGH_R, then export to a WASP MAP file, you should get roughness polygons.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • mbaker
    mbaker Global Mapper User
    edited July 2010
    Mike,
    Thanks for the quick response. Unfortunately my shapefiles would not have a left or right attribute. All they would have is a single value for the polygon. Is there any way to generate those attributes? It doesn't sound like it can be done automatically by GM. The WindFarm conversion takes an XYZ point data text file that is derived from a gridded raster and creates the WAsP roughness polygons in .map format.

    Thanks again,
    Matt
  • global_mapper
    global_mapper Administrator
    edited July 2010
    Matt,

    Actually a single value will work too, you just need to rename the single roughness attribute to have a name of "RV" and then that will be used in the absence of separate left and right roughness values.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • mbaker
    mbaker Global Mapper User
    edited July 2010
    Thanks Mike, I didn't realize that. Is there any chance that you could e-mail me a sample .map file that has been converted in this manner? I have never loaded a file into WAsP like that, and would like to take a look.

    Matt
  • global_mapper
    global_mapper Administrator
    edited July 2010
    Matt,

    I have attached a WASP .map file that I created from just a single area feature with a RV attribute value.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.comwasp_roughness_area.zip
  • JennM
    JennM Global Mapper User
    edited August 2010
    I recently started using Global Mapper and am trying to convert a WAsP roughness .map file to something I can use to create a continuous raster, either in ArcGIS format or Idrisi. So far I have been able to convert the roughness to shapefile in polygon and line format, but the attributes give a left and right field which makes turning this into a raster difficult. I understand that the right field gives the roughness for the particular polygon or line and the left field gives the roughness outside the polygon or line, but is there a way to determine where the left field of 1 polygon meets the left field of another polygon? Any tips you may have would be helpful.

    Thanks,
    Jenn
  • global_mapper
    global_mapper Administrator
    edited August 2010
    Jenn,

    What you might do is go to the Options dialog for the .map layer and set the right roughness attribute to be used for the 'elevation', then right-click on the .map layer in the Control Center and select to create an elevation grid. Check the option to Flatten Areas then your grid should be filled within each area with the right roughness value, which is I think what you want.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • dave306
    dave306 Global Mapper User
    edited August 2010
    mbaker wrote: »
    Mike,
    Thanks for the quick response. Unfortunately my shapefiles would not have a left or right attribute. All they would have is a single value for the polygon. Is there any way to generate those attributes? It doesn't sound like it can be done automatically by GM. The WindFarm conversion takes an XYZ point data text file that is derived from a gridded raster and creates the WAsP roughness polygons in .map format.

    Thanks again,
    Matt

    Matt,
    Sorry I can't offer any help on the use of GM. However, I was wishing to ask if you know how to convert .shp files to .map with WindFarm? I have tried to export the polygons from a shapefile viewer as x,y coords. But this fails in the conversion tool of WindFarm, as the points are not a regular grid!?! I'm not sure if it is possible, but if I could it would save a lot of manual digitising of forestry.

    hope you can spare the time to offer some advise

    dave
  • Nikki
    Nikki Global Mapper User
    edited November 2010
    I'm also having trouble exporting the MRLC land cover data into a WAsP .map file. I exported to a specific bounded area, and the map file that is exported has no data. Is there an intermediate step I'm missing? Thanks in advance!
  • global_mapper
    global_mapper Administrator
    edited November 2010
    For areas or lines to export to a WAsP .map file the features must have elevation and/or roughness attributes, which the land cover data would not have to start with. If you can assign roughness attributes based on the land cover type (use attribute names like ROUGH or RV or ROUGHNESS to store the roughness for the areas), then you can export them to WAsP .map files.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • JennM
    JennM Global Mapper User
    edited November 2010
    Hello,

    A couple months ago I had some questions on creating a WAsP roughness file using Global Mapper. While creating a file today I realized that when I convert a shapefile with attribute field RV to .map, the output map has matching Rough_L and Rough_R values when I click around. I know in traditional WAsP roughness maps created using other methods, the left and right values differ.

    Do you know if files created this way will still work in WAsP, and if not, if you think there is a better way to go about it?

    Thanks
  • global_mapper
    global_mapper Administrator
    edited November 2010
    I think the WAsP .map file should work fine, but if you know the separate left and right roughness you could specify those as ROUGH_L and ROUGH_R attributes and you will get separate values.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • JennM
    JennM Global Mapper User
    edited December 2010
    Thanks Mike. The whole point of the conversion for us is to be able to give Global Mapper a shapefile or raster file and get back a valid WAsP roughness map. If it needs to have L and R values, then we would need Global Mapper to create those for us. We have been creating a file with just R values, but would need Global Mapper to help us create those L values. Any ideas?

    Thanks
  • global_mapper
    global_mapper Administrator
    edited December 2010
    Are you creating area or line .map files? For area .map files I don't think it would even be possible to determine a roughness value outside the area as there could be a lot of differing roughness values outside the area. So assuming a clockwise area only the ROUGH_R value could be determined. Really if the roughness is areas the outside value shouldn't matter anyway as it should be included in another area feature.

    For lines it could be possible to split whenever the roughness value changes on either side, but I really think that areas are what is primarily used.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • ahc8
    ahc8 Global Mapper User
    edited January 2011
    Hi,

    I'm working with WindPro and WAsP for wind modeling. I have a TOPO map (also dem files) of Flagstaff, AZ and I want to define roughness on it on Global Mapper and then export ".map" file from it. Is this a possiblity? How do you do it?
  • global_mapper
    global_mapper Administrator
    edited January 2011
    What format is your TOPO map in? You would need to first have vector area or line features before you can export a Wasp .map file. You would also need to have the roughness values provides as attributes of the area or line features, such as a ROUGH or RV attribute for an area feature. You can also create contour lines from DEM data using the File->Generate Contours menu command and those will export to .map files using the File->Export Vector Data menu command.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • ahc8
    ahc8 Global Mapper User
    edited January 2011
    My TOPO map is in the .JPG format. Does this work?

    Does Global Mapper only export the roughness area or the background map as well?
  • global_mapper
    global_mapper Administrator
    edited January 2011
    The WaSP .map format only supports areas and lines (like roughness areas and contour lines), I'm not sure how WaSP supports background imagery.

    What type of information does your topo map contain? You typically need something like land cover information to generate a good roughness map. Assuming you have something with that information, there is a new tool in the v12.01 release of Global Mapper allowing you to create area features from a raster image (like a JPG) for similar-colored areas. You do this by right-clicking on the layer in the Control Center and selecting the option to create areas from regions of the same color/elevation. Once you have that you can edit those areas of a particular color to have a ROUGH attribute with the desired roughness. That will then export to a WaSP .map file.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • ahc8
    ahc8 Global Mapper User
    edited January 2011
    Mike,

    I was not sure what the TOPO file was showing, so I attached my workspace. I have digitized the roughness area and given values to each. I exported this as you said as a WAsP map file. Once i uploaded this map to WindPro and WAsP, the coordinate of this map was waaaay off than what it had to be! ( although i defined the coordinates of the TOPO map in global mapper with 3 points)

    Thank you for your helps :)
  • global_mapper
    global_mapper Administrator
    edited January 2011
    The projection that you have assigned for the data looks wrong. The coordinates are projected coordinates of some kind, but you have them defined as lat/lon coordinates. What projection are the coordinates that you assigned supposed to be in? Perhaps UTM?

    Also you will want to rename your 'Roughness Length' attribute to just ROUGHNESS, RV, or ROUGH so it will be recognized on export.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • ahc8
    ahc8 Global Mapper User
    edited January 2011
    Mike,

    I needed the data to be in UTM. So, I changed everything back to UTM( Zone 12, WGS84, meters). I defined 2 points in the background map(TOPO). But, when i exported the WAsP roughness map, still the coordinate system of the map was wrong in WindPro.

    I tried to define 2 points on the roughness map, but since the background map was not attach to it, it was not accurate enough so the roughness area would shrink and would become out of place!!!

    I again attached the new file to this.

    Thank you for all your helps.

    Arshiya
  • global_mapper
    global_mapper Administrator
    edited January 2011
    Arshiya,

    I'm not sure how WindPro works, but your data seems to be properly placed in Global Mapper now (near Flagstaff, AZ right?), so you should be getting the proper coordinates out of Global Mapper. Does WindPro perhaps require a certain type of projection, like lat/lon values? If so you could change your projection on the Projection tab of the Configuration dialog to Geographic/WGS84 and then export to a WaSP .map to see if WindPro likes that better.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • solarwind
    solarwind Global Mapper User
    edited February 2011
    Hello,

    I'm looking for a solution to be able to generate wasp roughness maps for months with Global Mapper and other softwares without success.
    Let me explain what I found and sorry for any fault, English is not my mother tongue.
    It will maybe help Global Mapper team to develop some code to achieve this goal.
    First, Wasp roughness maps can contain polygons (islands inside other polygons) or lines having left and right values. WindPro uses wasp maps.

    The input file into Global Mapper wouldn't be a problem from my point of view because Global Mapper can easily convert vector to elevation grid or the opposite. I'll give some detail on this below.

    Most of the land cover files that I've seen are polygons with one value (inside of course). Polygons are "glued" together with theoritically no empty space in the map. The maps are quite complex and can cover big areas, so a manual editing is not feasible.
    Here are the different steps that I would see for Global Mapper to convert simple value polygons to left-right lines :
    - analyze the points inside each polygon to determine the direction of "drawing"
    - "break" the polygon into multiple lines. Each line starting and finishing at a point of contact with the neighbouring polygons,
    - give attribute ROUGH-L and ROUGH-R depending on direction of drawing and neighbor value

    Easy to write here, but....

    Alternatively, it could be easier to analyze a DEM and to generate left-right lines (in a similar way as the option "Create Area Features From Equal Values".
    The user would prepare the DEM by selecting all the polygons in his land cover shapefile, edit area feature, copy the land cover attribute to ELEVATION attribute, create elevation grid from 3D vector data.
    Then, the option to create area features from equal values would work in a similar ways but instead of drawing polygons, would draw lines. For each point of each line the code would look what is its surrounding on the left and on the right. Any change in a left or right value is ending the current line. Wasp map editor (option in Wasp) can join lines together, so it's not even necessary to be precise here. WAsp map editor will snap lines even if separated with a quite big distance (let's say 20 to 50m as reasonnable)
    This option would need probably one user input for the outside boundary where there is no polygon thus no information.

    I kept the simplest approach for the end and I have to admit that I took the idea after hours of research on internet.
    From the original land cover shapefile (remember polygons are stucked together with no empty spaces) :
    - select all, advanced feature creation option, create buffers around selected features, and type a -2m (yes, minus 2m) for example. I'm testing this solution right now and have a lot of errors on big maps but succeed once on a small part of a map.
    - by keeping only the buffers, all the polygons will be separated by a distance of 4 meters
    - the new Global Mapper code will have to analyze the direction of the drawing of each polygon and to copy the land cover attribute to either ROUGH_L or ROUGH_R attribute. Unfortunately, Wasp can't deal with INSIDE and OUTSIDE otherwise this step won't have to be done.
    - the user will fix an external value for all the area that will be valid for all the polygons. Again, the code will have to ask the user to enter the general external value because this value will go either in ROUGH_L or ROUGH_R attribute depending on the direction of drawing of each polygon.

    I think this third option is the simplest one. For you to understand, Wasp won't really see these 4 meters corridors because they are too small. So whatever the user will enter (a logical value of course is better), this value representing a false description of the terrain cover won't influence Wasp calculations.

    I hope this long description will help users and ideally encourage Global Mapper team to code something for this problem that lasts for several years.

    I'm ready to test any part of a solution.

    Thanks
  • global_mapper
    global_mapper Administrator
    edited February 2011
    I think if you are coming from land use polygons what you should do is edit the polygons by land use code (use Search->Search by Attributes) and assign an "ELEVATION" attribute to each set with the value really being the roughness associated with that land use code. Once that is done, right-click on the layer and generate an elevation grid, making sure to choose to flatten the area features. This should give you a grid with the roughness values. Then, right-click on that layer and select the option to create equal value areas and assign the unique values to an attribute name of ROUGH_R. Finally, edit all of the area features in the new layer and add a ROUGH_L attribute value with whatever value that you want to assign for the roughness outside any area. I think this should work without having to split everything into separate lines.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • solarwind
    solarwind Global Mapper User
    edited February 2011
    Hello Mike and thank you for your answer.

    I tried what you suggested and unfortunately that didn't solve the problem.
    I see 2 reasons :
    First, polygons drawing direction still matters. Wasp opens lines looking at rough_l and rough_r attributes but since Global Mapper doesn't take care of drawing direction of each polygon, rough_l and rough_r are just attributed randomly from a Wasp point of view.
    Secondly, Wasp doesn't like overlapping polygons or lines : each polygon have one or several common boundary(ies) with its neighbour(s). It's not real overlapping but just that polygons sides are exactly on top or under each other. That what the reason of my buffer attempt in my previous post.

    Still and ungoing issue unfortunately.
    Keep me informed if you have any other idea.
    Thanks
  • global_mapper
    global_mapper Administrator
    edited February 2011
    I have updated the WaSP map exporter to always make sure that the exported areas are clockwise, which should fix the drawing direction issue. You would still likely need to use the negative buffer distance though until WaSP can better handle touching polygons with just an internal roughness value. I have placed a new build at http://www.globalmapper.com/global_mapper12.zip with the change for you to try. Simply download that file and extract the contents into your existing v12.xx installation folder to give it a try. If you are using the 64-bit v12 version there is a new build at http://www.globalmapper.com/global_mapper12_64bit.zip .

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • solarwind
    solarwind Global Mapper User
    edited February 2011
    Hello Mike and thank you for this impressive technical support !
    I did some tests with the modified version (64 bits) and it seems to work !
    Here are the different steps I've done :
    - elevation grid
    - create equal values areas »» rough_r
    - select all and add rough_l attribute
    - attempt to create negative buffers
    Regarding this last step, it seems that the program doesn't succeed with the buffers. I needed to validate errors for I would say every polygon (I cancelled the job cause it was too long to wait for it to finish).
    Here is the text of the error message :
    "Error creating buffer for feature
    Error joining areas for buffer
    PolygonUtils.cpp - 175
    Version: v12.01
    Build Time: Feb 14 2011 23:28:25"

    I tried to select one area (a simple and small island) and the message is the same, so I guess buffers are not possible for Areas generated from Triangulated Grids.
    If I try on the same area but from the original shapefile, it works instantly.

    So, I tried another solution. I generated buffers first from my original shapefile. I chose finally -10m buffers because -2m wasn't enough due to some relatively rough polygons generated at the "create equal values areas" step, leading to crossed polygons everywhere. With 10m value, it seems to not overlapping.
    Then I did all the steps mentionned above, opened the map in the wasp map editor, corrected a few errors (a few extra tiny polygons appearing at some corners of bigger polygons, 2 overlapping polygons that I had to delete), and it worked !
    I still need to do some tests and particularly a Wasp wind mapping calculation but I would say that we have a solution. Also, it will be necessary to test other maps.
    A see two points to check : influence of these 20m (2x10m) corridors on calculations, and influence of having polygons with same rough-l and rough_r values (because it's logical to choose an external rough_l value consistent with another value already in the map).
    I'm not really worried about these 2 points.

    So, for the benefit of Wasp users (or Windpro or others softwares compatible with wasp maps), I detail below the full process I have tried.
    1 - First, my land cover maps come from a gouvernemental and free source in Canada. They cover very big areas of roughly 150km x 100km, which I think are too big for Wasp (points and lines limitation). Furthermore, processing these whole shapefiles in Global Mapper is time consuming.
    So my first step is to export another shapefile while choosing export bounds reduced to my study area. On this particular point, I tried first to copy and paste in a new layer my area of interest but the shapefiles are made of some overlapping polygons so by doing this you won't have a clean square area (as it is usual to use it for Wasp) and some polygons may be missing.
    2 - Then I changed land cover codes to roughness codes compatible for Wasp (values are user choice).
    I did that by selecting Search by attributes, names and description (don't use search and replace because it works on parts of the numbers so you'll alter your shapefile).
    3 - Then I selected all the polygons and did the negative buffers of -10m (it worked without problems on my small test map but I'm not sure there won't be an error in case of a very big and complex polygon)
    4 - deselect your original shapefile and select your buffer layer (by default called User created features), select all, edit selected features, select the attribute with roughness values, copy to new attribute ELEVATION.
    5 - Select your buffer layer, right click, create elevation grid from 3D vector data
    6 - Select the new layer (by default named Triangulated elevation grid 1), right click and select create area features from equal values in selected layer. Type ROUGH_R for Value attribute name.
    7 - Select all on the new layer (Triangulated elevation Grid 1 Areas by default), edit selected features, new attribute ROUGH_L and choose a value being coherent with your map.
    8 - export as a Wasp map.
    9 - correct your map in Wasp map Editor as usual

    Any feedback from other users is appreciated.
    And thanks again to you Mike for having solved an issue lasting for years !
  • global_mapper
    global_mapper Administrator
    edited February 2011
    I'm glad to hear you have it working! The issue with buffers is that they can't always be generated from "invalid" areas, such as the self-intersecting areas that are often created as part of the equal-value area creation process. Your source areas were likely valid so they worked fine.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com