[Qgis-user] Process Land Cover Raster Data

Andrew Harfoot ajph at geodata.soton.ac.uk
Tue Sep 5 02:28:10 PDT 2023


Hi there Richard,

The simple array format that your data is in means that it can be read 
by GDAL using the ESRI HDR driver:
https://gdal.org/drivers/raster/ehdr.html#raster-ehdr

This just requires a sidecar file named /clt02.hdr/, that contains the 
information for QGIS to interpret the binary array. I modified the 
example in the page above to create this, and saved it in the same 
folder as the data:

ncols 4000

nrows 4000

cellsize 25

xllcorner 1589000.00

yllcorner 6135000.00

nodata_value 9999.000000

nbits 16

pixeltype SIGNEDINT

byteorder msbfirst


Load the original binary file into QGIS and the hdr will be read 
automatically. It won't have a coordinate system assigned, but that can 
be done using the Assign Projection processing tool within QGIS, which 
will create a /clt02.prj/ file in the same folder containing the NZ CRS 
details.

The number of bits can be calculated from the file size, but I have 
guessed that the data is a (standard) signed integer, and indeed the 
values look reasonable (30-37).
Using the index file, equivalent .hdr files could be built for all the 
NZ tiles

The excellent Serval plugin can then be used to edit the raster values 
in place.

Cheers,

Andy


On 01/09/2023 07:28, Richard & Mary via QGIS-User wrote:
> *CAUTION:* This e-mail originated outside the University of Southampton.
>
> Greetings Team
>
> I work as a Radio Engineer in the NZ Public Safety Sector and a 
> planning tool that I work with uses a land cover and elevation rasters.
>
> New Zealand is divided up in series of 100km tiles each tile is 4000 x 
> 4000 representing a 25m square.
>
> The contents of these files are a binary number from 0 to 50 
> representing individual land cover categories, or 0 to approx 5000 
> representing the elevation
>
>
> Each of these tiles has a Xmin and Xmax for Easting and a Ymin and 
> Ymax for Northing on the NZTM2000 grid.
>
> *I want to be able to display and edit these 25m squares to fix some 
> errors that affect our radio modelling.*
>
>
> I am using QGIS 3.28.10 and have tried a variety of Raster imports but 
> get a not supported format.
>
> The file format is know as MSI Planet and is one of the default 
> formats used for land cover in the radio coverage modelling tools.
>
> I have attached a sample of the clutter file (this one was 31.25MB 
> before zipping) I have also attached the index which show where on the 
> NZTM2000 grid this tile resides.
>
> I also have the same files in a format used by EDX which embeds the 
> East - West North South Limits and the projection, but these are 
> generated from the initial plain raster.
>
>
> I have read some information about using satelite image stacks to 
> generate land cover information, if I do that i need to be able to 
> output the plain 100km x 100km block
>
>
> I would be interested to any help you can give me.
>
> Richard Hutchinson
>
>
> _______________________________________________
> QGIS-User mailing list
> QGIS-User at lists.osgeo.org
> List info:https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user


-- 
Andy Harfoot

Skype: gdi_ajph
Teams:ajph at soton.ac.uk
Phone: +44 2380 590566

GeoData Institute
University of Southampton
Southampton
SO17 1BJ

www.geodata.soton.ac.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20230905/62ba2248/attachment.htm>


More information about the QGIS-User mailing list