[GRASS-SVN] r73068 - grass-addons/grass7/raster/r.in.pdal
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Aug 8 19:45:57 PDT 2018
Author: wenzeslaus
Date: 2018-08-08 19:45:56 -0700 (Wed, 08 Aug 2018)
New Revision: 73068
Modified:
grass-addons/grass7/raster/r.in.pdal/r.in.pdal.html
grass-addons/grass7/raster/r.in.pdal/r.in.pdal.py
Log:
r.in.pdal: add proj specified by user
Useful when proj is missing or wrong.
Using proj_in as in m.proj.
Modified: grass-addons/grass7/raster/r.in.pdal/r.in.pdal.html
===================================================================
--- grass-addons/grass7/raster/r.in.pdal/r.in.pdal.html 2018-08-09 02:09:02 UTC (rev 73067)
+++ grass-addons/grass7/raster/r.in.pdal/r.in.pdal.html 2018-08-09 02:45:56 UTC (rev 73068)
@@ -36,7 +36,8 @@
<h2>EXAMPLES</h2>
-Import of a LAS file using PDAL. The sample LAS file is available
+Import of a LAS file using PDAL into a mapset in the sample NC SPM
+location. The sample LAS file is available
<a href="https://www.grassbook.org/wp-content/uploads/ncexternal/lidar_raleigh_nc_spm_height_feet.las">here</a>.
<div class="code"><pre>
@@ -50,8 +51,9 @@
r.in.pdal input=lidar_raleigh_nc_spm_height_feet.las output=lidar_raleigh -s -g
# import while aligning pixel geometry to existing "elevation" 10m res. raster map
+# specifying EPSG manually because SRS information is missing in this LAS file
r.in.pdal input=lidar_raleigh_nc_spm_height_feet.las raster_reference=elevation \
- resolution=10 output=lidar_raleigh method=mean
+ resolution=10 output=lidar_raleigh method=mean proj_in=EPSG:3358
# optionally: footprint=lidar_raleigh_footprint
@@ -93,7 +95,10 @@
<h2>AUTHORS</h2>
-Anika Bettge, mundialis GmbH & Co. KG
+Anika Bettge, mundialis GmbH & Co. KG<br>
+Vaclav Petras,
+<a href="https://geospatial.ncsu.edu/geoforall/">NCSU GeoForAll Lab</a>
+(projection, computational region)
<p>
Documentation: Markus Neteler, mundialis GmbH & Co. KG
<p>
Modified: grass-addons/grass7/raster/r.in.pdal/r.in.pdal.py
===================================================================
--- grass-addons/grass7/raster/r.in.pdal/r.in.pdal.py 2018-08-09 02:09:02 UTC (rev 73067)
+++ grass-addons/grass7/raster/r.in.pdal/r.in.pdal.py 2018-08-09 02:45:56 UTC (rev 73068)
@@ -6,6 +6,7 @@
#
# AUTHOR(S): Anika Bettge <bettge at mundialis.de>
# Thanks to Markus Neteler <neteler at mundialis.de> for help
+# Vaclav Petras <wenzeslaus at gmail com>
#
# PURPOSE: Creates a raster map from LAS LiDAR points using univariate statistics and r.in.xyz.
#
@@ -33,6 +34,14 @@
#% required: yes
#%end
+#%option
+#% key: proj_in
+#% type: string
+#% label: SRS information for input as EPSG code or PROJ string
+#% description: Override input SRS using EPSG code (e.g. EPSG:3358) or PROJ string
+#% required: no
+#%end
+
#%option G_OPT_R_OUTPUT
#% key: output
#% description: Name for output raster map
@@ -261,6 +270,8 @@
pth = options['pth']
trim = options['trim']
footprint = options['footprint']
+ # user-supplied projection (overrides the actual one)
+ user_provided_srs = options['proj_in']
# flags
scan = flags['s']
shell_script_style = flags['g']
@@ -409,6 +420,8 @@
"type": "filters.reprojection",
"out_srs": location_srs
}
+ if user_provided_srs:
+ reproj_filter.update({"in_srs": user_provided_srs})
data['pipeline'].append(reproj_filter)
data['pipeline'].append({
'type': 'writers.text',
More information about the grass-commit
mailing list