asela115 Posted December 3, 2016 Share Posted December 3, 2016 Hi,I have Arcgis shape file having polygons with corresponding landuse IDs in its attribute table. When importing .shp file, MapEditor asks for internal and external roughness values. It is possible to assign an internal roughness value for each polygon, but assigning external roughness value is difficult for a larger map. There are many cases where polygons are interfacing with multiple different other landuse types (which are having different roughness values). So external roughness value is also varying.Just assigning a internal roughness value only and importing to MapEditor gives so many crosspoint errors.Is there a better approach when dealing with .shp files (rather than manually digitizing a larger map within MapEditor)Thanks Link to comment
Ole Rathmann Posted January 3, 2017 Share Posted January 3, 2017 Hi (whoever you are) - I agree importing shape-files into the Map Editor for roughness lengths by polygons is problematic. I guess the bottleneck is really the cross-point errors, which is caused by overlapping line-segments of neighbouring polygons. The Map Editor is not sufficiently smart to see that these lines segments only touch but do not cross. How to work around? Well, do you have any possibility to change the polygons so that a a tiny space (a fraction of a meter) is left between them? Then it would be possible - although tedious - to add the necessary external roughnesses ...Another solution requires a bit of patience. We are just now finishng a new Map Editor version which is able to accept "unknown roughness" specification for e.g. external roughness of a polygon. The new Map Editor is - in the process just after reading - able to infer the missing roughness lengths from neighboring or surrounding roughness-change lines. But it would still require you to adjust the polygons to avoid overlapping. Another new feature is grid-file importing. So if you could convert the shape-file to a grid file (Surfer ASCII .grd format) the new map editor version would be able to read that right away - and convert it to a standard WAsP .map file./Ole Rathmann Link to comment
Antonio Posted November 8, 2021 Share Posted November 8, 2021 Hi, was this function implemented? We actually have a very good roughness map in shape file, and we would like to import it in Map Editor. We succeeded in importing the polygons but not the roughness values. I guess the problem is that the shape file contains / export only one z0 (not the left/right). Do you think we could try to export it in ASCII shape format, and modify with a macro by adding a right z0" value = "unknown roughness"? Do you think in this way it could work? Alternatively is it possible that we send to you the shape file and you try to convert it to .map? thank you best regards Antonio Link to comment
Rogier Posted November 30, 2021 Share Posted November 30, 2021 (edited) Hi Antonio, There is some experimental helper scripts in the free software QGIS attached. You can install these files per the instructions in the attached document and then look for a script called 'Polygons to roughness lines'. The instructions attached are for a new release of WAsP that can deal with displacement height, but if you are dealing with roughness length you only need the 'z0' field. So to save a WAsP .map file you will need to use the script 'Save WAsP roughness layer' instead of the 'Save WAsP landcover layer' that is described in the document. Regards All files are in this folder: https://data.dtu.dk/articles/software/Using_QGIS_to_create_WAsP_maps/20495178 The experimential helper scripts are called "wasp_scripts.zip" (installation instructions in the documents below) A full workflow to make both elevation and roughness maps in QGIS is included in "Creating a WAsP elevation and roughness map using QGIS" Edited September 20, 2023 by Rogier Link to comment
Gururaj Posted January 3, 2022 Share Posted January 3, 2022 On 30/11/2021 at 2:39 PM, Rogier said: Hi Antonio, There is some experimental helper scripts in the free software QGIS attached. You can unzip these file per the instructions in the attached document and then look for a script called 'Polygons to roughness lines'. The instructions attached are for a new release of WAsP that can deal with displacement height, but if you are dealing with roughness length you only need the 'z0' field. So to save a WAsP .map file you will need to use the script 'Save WAsP roughness layer' instead of the 'Save WAsP landcover layer' that is described in the document. Regards QGIS_GML.pdf 5 MB · 4 downloads QGIS_WAsP_scripts.zip 39 kB · 4 downloads Hi Antonio, I thank you for your very clear explanantion in the document provided. But i face an issue when i try to extract the roughness infomation to my buffered sqaure cut out. When i hit run for the processing, i get this error in the log box stating : CRS is EPSG:3857 Clipping to Input Polygon... Results: {'OUTPUT': 'Buffered_926a48a4_1e94_4c2e_860c_b8148151f2da'} Clipping to bounding box... Results: {'OUTPUT': 'Clipped_9c48318d_1528_497d_a078_00adafb7ec47'} Clipping to Input Polygon... Results: {'OUTPUT': 'Reprojected_3457eeea_60a7_4089_9aea_410a0a3ef6f8'} Joining CORINE roughness table Invalid join fields Execution failed after 0.79 seconds for your reference the steps i am stuck at comes in page 7 of your document. Can you please help me resolve the issue. I am looking for location UTM WGS 84 Zone 34 - 505655.34 E, 4458722.16 N BR, Link to comment
Rogier Posted January 3, 2022 Share Posted January 3, 2022 Hi Gururaj, My best guess is that you didn't unpack the file CORINE.gpkg from the ZIP file. That also has to be in the script directory as explained on page 2. Regards Rogier Link to comment
Gururaj Posted January 4, 2022 Share Posted January 4, 2022 25 minutes ago, Rogier said: Hi Gururaj, My best guess is that you didn't unpack the file CORINE.gpkg from the ZIP file. That also has to be in the script directory as explained on page 2. Regards Rogier Hi Rogier, Thank you so much for your response. There was an issue with the folder path. I could successfully create the .gml file. But when i try to read import the .gml file in WAsP. it gives this error Exception report produced at 2022-01-04 12:01:42 There is no child element with name: "wasp-chg:AerodynamicalRoughnessLength raised at: 2022-01-04 12:01:37 2022-01-04 12:01:37: Exception raised in: Rvea0254:cVectorMapGmlFilter:GetFirstImmediateChildElementOfName 2022-01-04 12:01:37: Message added: Could not restore a map from GML file 2022-01-04 12:01:37: Exception raised in: Rvea0254:cVectorMapGmlFilter:RestoreMapFromFile 2022-01-04 12:01:37: Message added: Could not restore the map from file 2022-01-04 12:01:37: Exception raised in: Rvea0254:cVectorMap:RestoreFromFile 2022-01-04 12:01:37: Message added: Failed to restore map instance 2022-01-04 12:01:37: Exception raised in: Rvea0254:VectorMapClass:RestoreInstanceFromFile 2022-01-04 12:01:37: Message added: Could not open a vector map from data file 2022-01-04 12:01:37: Exception raised in: Rvea0334:cVectorMap:OpenDataFile 2022-01-04 12:01:37: Message added: Could not insert a Vector map from file 'pk' to the hierarchy 2022-01-04 12:01:37: Exception raised in: Rvea0334:cHierarchyInsertionFromFile:InsertFromFile 2022-01-04 12:01:37: Message added: There was a problem with the insertion 2022-01-04 12:01:37: Exception raised in: WAsP:cWorkspaceController:ExecuteHierarchyInsertion 2022-01-04 12:01:37: Message added: The insertion was not successfully completed 2022-01-04 12:01:37: Exception raised in: WAsP:cMemberPopupMenuMediator:ProcessInsertionFromMenu Latest thread started in: Wiab0001:fInteractionPointQuestion:Form_QueryUnload I also tried to open the file in WAsP map editor with the options "file -> Open WAsp GML". Even there it reads out error. I could exactly follow all the steps till the end except the reading the file in WAsP software. Please guide me further to resolve the issue Thank you for your time. Link to comment
Gururaj Posted January 4, 2022 Share Posted January 4, 2022 Hi Rogier, The map does not open in WAsP 12.6. I updated the software to 12.7 and the file works in the latest verison (2022). Thanks for the support. Best Regards, Gururaj Link to comment
Rogier Posted January 5, 2022 Share Posted January 5, 2022 Yes these new GML files can contain displacements heights, which is a feature which is only available from WAsP 12.7 onwards. But I am happy you got it to work. Link to comment
Gururaj Posted January 5, 2022 Share Posted January 5, 2022 Hi Rogier, Do you also have any some experimental helper scripts for creating the orography layer for WAsP in QGIS? With the latest version of WAsP map editor i am unable to import the SRTM elevation data format .hgt (https://dwtkns.com/srtm30m/) into the map editor for contouring nor i am able to readily download the data from the GWA warehouse because of the URL issue. I would like to have a WAsP GML layer for orography, in the similar process as you have done it for landcover. Please suggest me a better way to obtain the orography layer for the site assessment. Link to comment
Rogier Posted January 6, 2022 Share Posted January 6, 2022 (edited) Hi, Yes coincidentally I just gave a course with that. You will need the same scripts as I included above. I copy the instructions below: https://data.dtu.dk/articles/software/Using_QGIS_to_create_WAsP_maps/20495178 There is a video how-to here: https://panopto.dtu.dk/Panopto/Pages/Viewer.aspx?id=f855a532-b99c-44af-b105-b08300954b2d You may also need the introduction to QGIS to give some background: https://panopto.dtu.dk/Panopto/Pages/Viewer.aspx?id=870b0413-4956-4b3f-a9b2-b0830094e790 Edited September 20, 2023 by Rogier Link to comment
Gururaj Posted January 11, 2022 Share Posted January 11, 2022 Hi Rogier, Thank you very much for the clear instructions. I could successfuly create the elevation map file with the above instruction for my desired site. I am concerned about the displacement height. If I have a wind farm at the mountain ridge and I have forest all along the slope of the mountain ridges. Does the concept of displacement height still apply? Also, Will the dispalcement height (if it applies) be automatically added as per the instruction in QGIS_GML (helper scripts) at the end or do I need to manually calculate and specify in the landcover table for a close location to the wind farm using the ID's ? If it's manual, can I use the forest canopy height value suggested by the website (https://glad.earthengine.app/view/global-forest-canopy-height-2019) and take a mean height value for the forset around the wind farm as the input parameter to find the displacement height and roughness length (displacement = (2/3)*tree height and roughness = 0.1*tree height ? Is it necessary that i need to edit the roughness length values ? since i get the roughness length values autogenerated from the CORINE database? Will it imapct significantly in the Wind resource assessment ? Your guidance would be really appreciated. Thank you very much for your time, Best Regards, Gururaj Link to comment
Rogier Posted January 11, 2022 Share Posted January 11, 2022 (edited) Hi, Yes that is a rather tricky situation. Regardless what you do you will probably have high flow-modelling uncertainty with a forest on a hill. Using the CORINE data you will have to add a displacement height, that is not done automatically because it depends on the height of the forest. You can try to use those global forest data to estimate a forest height, but I don't have experience with that myself. If you really want an accurate forest height you can in some countries download data from lidar scans (e.g sweden, denmark, finland). If you have lidar data you can also separate the orography and roughness better, because SRTM data include to some extent the tree heights within the elevation data because they are measured by satellite (i.e. it is a digital surface model and not a digital terrain model). If your wind farm is directly in the forest the displacements will for sure have big impact. If they are further away it is mostly the roughness that will have a impact. Some more links regarding forest modelling and WAsP: https://wes.copernicus.org/articles/6/1379/2021/ https://wes.copernicus.org/articles/3/353/2018/ Regards Rogier Edited January 12, 2022 by Rogier Link to comment
Alfonso Posted February 21, 2022 Share Posted February 21, 2022 On 30/11/2021 at 2:39 PM, Rogier said: Hi Antonio, There is some experimental helper scripts in the free software QGIS attached. You can install these files per the instructions in the attached document and then look for a script called 'Polygons to roughness lines'. The instructions attached are for a new release of WAsP that can deal with displacement height, but if you are dealing with roughness length you only need the 'z0' field. So to save a WAsP .map file you will need to use the script 'Save WAsP roughness layer' instead of the 'Save WAsP landcover layer' that is described in the document. Regards QGIS landcover instructions (pdf) https://files.dtu.dk/u/1j9mfoS_ZkDEP2Z-/bdb0dbc2-fbb7-4755-81fb-b353f24d3942?l WAsP scripts (zip) https://files.dtu.dk/u/4g0MU7CNDG_wDQxT/b01717a6-963c-44a4-beea-98f15ca26174?l Hi Rogier, I tried to download the script and relative instruction but I received the following error message: "Could not find shared item. It has been either moved or deleted, or the link has expired." Could you help me? Thanks Alfonso Link to comment
Rogier Posted February 23, 2022 Share Posted February 23, 2022 Hi Alfonso, Yes for some reason the permissions had changed. I have updated the link above now. There is also some new instruction videos added. Regards Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now