Hi -
I don't know how do to this in lasboundary, but I've done it using
ogrinfo and ogr2ogr in a batch file, like so:
----------
lasboundary -i *.las -use_bb -odir . -oshp
for %%f in (*.shp) do (
if not "%%f" == "merge.shp" (
ogrinfo %%f -sql "ALTER TABLE %%~nf ADD COLUMN fname character(50)"
ogrinfo %%f -dialect SQLite -sql "UPDATE '%%~nf' SET fname = '%%~nf'"
ogr2ogr -update -append merge.shp %%f -f "ESRI SHAPEFILE" -nln merge
)
)
pause
-----------
Note that one shapefile is created for each LAS file; the -merged option
is not used.
ogrinfo is used to create the attribute and assign the filename to the
attribute; ogr2ogr is used to merge all of the shapefiles into a single
shapefile.
Getting the OGR suite can be difficult; the easiest way I've found is
through the osgeo4W installer.
- Michael Hannon
On 2017-04-17 15:03, Sampath (CTR), Aparajithan wrote:
> Hi
>
> Is it possible to save file name as attribute when using lasboundary to
> generate shapefiles?
>
> I have multiple LAS files (tiles actually) in a folder, and I would like
> to create a shapefile of their boundaries.
>
> is there any way to add something to the command:
>
> lasboundary -i *.las -use_bb -merged -o merged.shp
>
> and make sure that the resulting merged.shp has an attribute field with
> the file names of individual files?
>
> Thanks
>
> Aparajithan Sampath, PhD
> Stinger Ghaffarian Technologies, Inc. (SGT)
> Contractor to the U.S. Geological Survey (USGS)
> Earth Resources Observation and Science (EROS) Center
> 47914 252nd Street
> Sioux Falls, SD 57198
> Phone:
605-594-6102
> Fax:
605-594-2828
>
aparajithan...@usgs.gov <mailto:
aparajithan...@usgs.gov>
>
> *NOTE - E-mail address change as of April 4, 2016. Please update your
> contact list accordingly!*
>
> --
> Download LAStools at
>
http://lastools.org
>
http://rapidlasso.com
> Be social with LAStools at
>
http://facebook.com/LAStools
>
http://twitter.com/LAStools
>
http://linkedin.com/groups/LAStools-4408378
> Manage your settings at
>
http://groups.google.com/group/lastools/subscribe