[GRASS-user] r.contour
Maris Nartiss
maris.gis at gmail.com
Tue Feb 16 00:30:06 PST 2021
Hello Dave,
your case is even easier – TIFF and ASC both are raster formats and
thus it is a simple task: import -> contour -> export (skipping all
point cloud related tweaking).
Create a new location. Either select coordinate system directly or use
one from TIFF file. Import data with r.in.gdal – don't forget to
specify "-e" parameter – it will align the computational region with
the imported raster. Then proceed to use r.contour followed by
v.out.ogr.
In future – do not ask for help with LiDAR but ask for help with
raster data. Otherwise you'll get advices like you got from me – how
to work with point clouds although you are looking for how to work
with ordinary rasters.
Māris.
2021-02-15 22:58 GMT+02:00, Dave Marshall <43carnaby at gmail.com>:
> Maris,
>
> Many thanks for your detailed reply. My LIDAR files are not in LAS format -
> they are a mixture of ASC and TIF.
>
> I spent a long time learning how to use QGIS and don't want to have to
> repeat the process with GRASS unless I have to. If there isn't a simple way
> to get r.contour to work from within the later versions of QGIS, then I'll
> keep on using the old version as the solution requiring the least effort.
> From your comments, it would seem that it is how QGIS imports the LIDAR
> data which has changed and this is why I see the problem I reported. I also
> realise that QGIS is a global application whereas my work is restricted to
> the UK using the Ordnance Survey grid so I can't expect a huge resource to
> look at a narrow application.
>
> Cheers,
>
> Dave
>
> On Mon, 15 Feb 2021 at 10:08, Maris Nartiss <maris.gis at gmail.com> wrote:
>
>> Hello Dave,
>> QGIS hides a bit of GRASS complexity by making a guess for various
>> parameters. As with any guess – sometimes it works, sometimes it is a
>> miss (and user has no idea which is the case).
>>
>> To get contours out of LAS files:
>> 1) create a location with coordinate system matching one used by LAS
>> files (be ware – you might need to know it in advance from metadata as
>> LAS files quite often lack this information);
>> 2) create a mapset for the area of interest (could be whole region or
>> a single file in case of parallel processing);
>> 3) start GRASS in newly created mapset;
>> 4) set up your computational region (this is most important part!)
>> with g.region. Don't forget to choose appropriate resolution.
>> a) if you know the extent in advance (e.g. from a map sheet grid) use
>> that;
>> b) if you don't know the extent in advance, use actual extent from the
>> LAS file. I would advocate to use r.in.lidar -s and set the extent
>> manually with g.region – you can “snap“ your raster to coordinates.
>> 5) import data with r.in.lidar;
>> 6) run r.contour on the map;
>> 7) export with v.out.ogr to Shapefile (#teamshapefile).
>>
>> Good luck,
>> Māris.
>>
>> P.S. When you wander into area of 66000 LAS files occupying nice 14T
>> on your disk, only a few adjustments need to be done + a bit of Python
>> coding + a bit of cluster management :D
>>
>
More information about the grass-user
mailing list