User Tools

Site Tools


nsw_dems

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
nsw_dems [2023/10/08 21:46] bushwalkingnsw_dems [2023/10/08 21:47] bushwalking
Line 26: Line 26:
 |8828_goulburn|8928_moss_vale|9028_kiama| | | | | |8828_goulburn|8928_moss_vale|9028_kiama| | | | |
 |8827_braidwood|8927_ulladulla|9027_jervis_bay| | | | | |8827_braidwood|8927_ulladulla|9027_jervis_bay| | | | |
 +
 +===== Loading data =====
 +
 +Loading up a large virtual raster into [[https://www.qgis.org/en/site/index.html|QGIS]] can be very slow, as can manipulating it. However, you can quickly load up a smaller section of the map using the following steps:
 +  * create the boundary of your desired area using the polygon tool at https://maps.ozultimate.com/
 +  * download the polygon using the **Export drawn data to GeoJSON** function
 +  * load up the Python console (//Plugins->Python Console// or //Ctrl+Alt+P// on Windows) in QGIS
 +  * run the following command (replace file locations with your own - the INPUT should be your virtual raster, and the MASK should be your GeoJSON boundary polygon)
 +
 +<code>
 +resultClip = processing.runAndLoadResults("gdal:cliprasterbymasklayer", { 'ALPHA_BAND' : False, 'CROP_TO_CUTLINE' : True, 'DATA_TYPE' : 0, 'EXTRA' : '', 'INPUT' : 'E:/geodata/8930_katoomba/area.vrt', 'KEEP_RESOLUTION' : False, 'MASK' : 'C:/Users/Downloads/data.geojson', 'MULTITHREADING' : False, 'NODATA' : None, 'OPTIONS' : '', 'OUTPUT' : 'TEMPORARY_OUTPUT', 'SET_RESOLUTION' : False, 'SOURCE_CRS' : None, 'TARGET_CRS' : None, 'X_RESOLUTION' : None, 'Y_RESOLUTION' : None })
 +</code>
 +
 +===== Multiple projections =====
 +
 +If you are trying to process data near zone boundaries, you may run into issues where the tiles are of multiple projections. Virtual rasters run into numerous issues in this scenario. Even if you translate the data from one projection to the other, you will hit issues with pixel sizes, and pixel starting points.
 +
 +The best approach so far seems to be to
 +  * clip each raster to a modest size
 +  * reproject one file to the other CRS (projection)
 +  * merge the two files, with 
 +    * the un-reprojected one first
 +    * the <code>-tap</code> flag set
 +    * and possibly the <code>-ps</code> flag as well
 +
 +You can then use this merged raster for operations around the zone boundaries.
  
nsw_dems.txt · Last modified: 2023/11/23 15:01 by bushwalking

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki