A tool for automatically generating 3D printable STLs from freely available lidar scan data.

Overview

mini-map-maker

A tool for automatically generating 3D printable STLs from freely available lidar scan data.

Screenshots

image image

Tutorial

To use this script, go to the USGS LidarExplorer

https://prd-tnm.s3.amazonaws.com/LidarExplorer/index.html#/

Select an area, and then click the "Download list" button under "Lidar within AOI" image This should give you a file called downloadlist.txt. Simply place this text file in the same directory as the script, and then run the script (convert.py, or convert.exe if you don't want to deal with Python). By default, mini-map-maker will generate an STL file for each tile in the lidar data. However, there are quite a few command line arguments that you can use to customize the output.

>convert.py -h

usage: convert [-h] [--input INPUT] [--reduce REDUCE] [--vscale VSCALE]
               [--base BASE] [--merge] [--no_stl] [--cleanup] [--filter FILTER] [--prj]

A utility for automatically generating 3D printable STLs from USGS lidar scans.

optional arguments:
  -h, --help            show this help message and exit
  
  --input INPUT, -i INPUT
                        The name of the file containing the URLs of all of the lidar scan data.
                        
  --reduce REDUCE, -r REDUCE
                        A decimal value that will decrease the output file size as it increases.
                        The default value is 1.0
                        
  --vscale VSCALE, -v VSCALE
                        A decimal value that will make artificially make things taller as it increases.
                        The default value is 1.0
                        
  --base BASE, -b BASE  A decimal value that sets the base height of the model. The default value is 0.0
  
  --merge, -m           Using this flag will merge all of the point clouds into one file before converting into a DEM.
  
  --no_stl, -s          Using this flag will disable STL generation.
  
  --cleanup, -c         Using this flag will cause the program to automatically delete the unzipped point cloud files
                        after running.
                        
  --filter FILTER, -f FILTER
                        A percent value (0-100, for the slope of the points being smoothed) that will enable the spike
                        smoothing option. This is good if you have points that are floating way up above the model and
                        causing spikes in your final model.
                        
  --prj, -p             Using this flag will cause the program to automatically download and use lastools to generate
                        projection files for the elevation models. This is important if you want to generate the STLs
                        yourself in QGIS, but it means you'll have to be mindful of lastool's license limitations.
                        More info on lastool's website (https://rapidlasso.com/lastools/).
                        
  --external_files, -e  Using this flag will grab las/laz files from the LAS directory instead of downloading them from
                        an input list.

Additional Examples:

External Files

Let's say you already have some las files you want to use. Simply place them into a directory called LAS, and then call the script from from the directory containing the LAS folder, using the --external_files flag, like so:

convert.py --external_files

This trick also works with LAZ files, or even a mix of LAZ and LAS files.

Adding a Base and Manipulating the Output

For one project, I had a LAZ file that had a section of ocean. This caused the output to be super flat, and too thin in several places to print well. Additionally, it was a pretty high resolution file, so the output STL was very large, and I wasn't happy with the vertical scale of the file either. So, after placing my LAZ file into a directory labeled LAS like mentioned above, I used the following command:

convert.py --external_files --filter 50 --base 10 --vscale 0.5 --reduce 2

Filtering got rid of some weird spikes in the output STL, and the base command increased the total height of the output. The vscale command made the model shorter, and reduce significantly decreased the size of the STL.

Support This Project

Like this project? Feel free to make a donation.

ko-fi

Licensing

With the default options, this program is completely open source, and the output is usable in a commercial environment. This code itself is MIT License, as is r-barnes' DEMto3D library that this program makes use of.

https://github.com/r-barnes/DEMto3D

If you want to use the output in QGIS or another GIS program, and enable .prj file generation, then the sript will automatically download lastools. The .prj files generated are free to use if it's not for commercial purposes. If you plan on using the .prj files for commercial purposes, you will need to purchase a lastools license in accordance with the information on lastool's website:

https://rapidlasso.com/lastools/

Additionally, this script makes use of some public domain utilities from FUSION by the US Forest Service

http://forsys.sefs.uw.edu/FUSION/fusion_overview.html

With the addition of LAZ processing, this project now utilizes LASzip, an LGPL-2.1 tool. It is included as a precompiled binary (laszip-cli.exe), and no modifications have been made.

https://github.com/LASzip/LASzip

Owner
Mike Abbott
Mike Abbott
Geospatial Data Visualization using PyGMT

Example script to visualize topographic data, earthquake data, and tomographic data on a map

Utpal Kumar 2 Jul 30, 2022
Color scales in Python for humans

colorlover Color scales for humans IPython notebook: https://plot.ly/ipython-notebooks/color-scales/ import colorlover as cl from IPython.display impo

Plotly 146 Sep 25, 2022
🎨 Python3 binding for `@AntV/G2Plot` Plotting Library .

PyG2Plot 🎨 Python3 binding for @AntV/G2Plot which an interactive and responsive charting library. Based on the grammar of graphics, you can easily ma

hustcc 990 Jan 05, 2023
Histogramming for analysis powered by boost-histogram

Hist Hist is an analyst-friendly front-end for boost-histogram, designed for Python 3.7+ (3.6 users get version 2.4). See what's new. Installation You

Scikit-HEP Project 97 Dec 25, 2022
An interactive dashboard for visualisation, integration and classification of data using Active Learning.

AstronomicAL An interactive dashboard for visualisation, integration and classification of data using Active Learning. AstronomicAL is a human-in-the-

45 Nov 28, 2022
Yata is a fast, simple and easy Data Visulaization tool, running on python dash

Yata is a fast, simple and easy Data Visulaization tool, running on python dash. The main goal of Yata is to provide a easy way for persons with little programming knowledge to visualize their data e

Cybercreek 3 Jun 28, 2021
An(other) implementation of JSON Schema for Python

jsonschema jsonschema is an implementation of JSON Schema for Python. from jsonschema import validate # A sample schema, like what we'd get f

Julian Berman 4k Jan 04, 2023
This is a super simple visualization toolbox (script) for transformer attention visualization ✌

Trans_attention_vis This is a super simple visualization toolbox (script) for transformer attention visualization ✌ 1. How to prepare your attention m

Mingyu Wang 3 Jul 09, 2022
Simple and lightweight Spotify Overlay written in Python.

Simple Spotify Overlay This is a simple yet powerful Spotify Overlay. About I have been looking for something like this ever since I got Spotify. I th

27 Sep 03, 2022
With Holoviews, your data visualizes itself.

HoloViews Stop plotting your data - annotate your data and let it visualize itself. HoloViews is an open-source Python library designed to make data a

HoloViz 2.3k Jan 04, 2023
Python package for the analysis and visualisation of finite-difference fields.

discretisedfield Marijan Beg1,2, Martin Lang2, Samuel Holt3, Ryan A. Pepper4, Hans Fangohr2,5,6 1 Department of Earth Science and Engineering, Imperia

ubermag 12 Dec 14, 2022
Data parsing and validation using Python type hints

pydantic Data validation and settings management using Python type hinting. Fast and extensible, pydantic plays nicely with your linters/IDE/brain. De

Samuel Colvin 12.1k Jan 06, 2023
Here are my graphs for hw_02

Let's Have A Look At Some Graphs! Graph 1: State Mentions in Congressperson's Tweets on 10/01/2017 The graph below uses this data set to demonstrate h

7 Sep 02, 2022
These data visualizations were created as homework for my CS40 class. I hope you enjoy!

Data Visualizations These data visualizations were created as homework for my CS40 class. I hope you enjoy! Nobel Laureates by their Country of Birth

9 Sep 02, 2022
A concise grammar of interactive graphics, built on Vega.

Vega-Lite Vega-Lite provides a higher-level grammar for visual analysis that generates complete Vega specifications. You can find more details, docume

Vega 4k Jan 08, 2023
Peloton Stats to Google Sheets with Data Visualization through Seaborn and Plotly

Peloton Stats to Google Sheets with Data Visualization through Seaborn and Plotly Problem: 2 peloton users were looking for a way to track their metri

9 Jul 22, 2022
ScisorWiz: Differential Isoform Visualizer for Long-Read RNA Sequencing Data

ScisorWiz: Vizualizer for Differential Isoform Expression README ScisorWiz is a linux-based R-package for visualizing differential isoform expression

Alexander Stein 6 Oct 04, 2022
Joyplots in Python with matplotlib & pandas :chart_with_upwards_trend:

JoyPy JoyPy is a one-function Python package based on matplotlib + pandas with a single purpose: drawing joyplots (a.k.a. ridgeline plots). The code f

Leonardo Taccari 462 Jan 02, 2023
Some useful extensions for Matplotlib.

mplx Some useful extensions for Matplotlib. Contour plots for functions with discontinuities plt.contour mplx.contour(max_jump=1.0) Matplotlib has pro

Nico Schlömer 519 Dec 30, 2022
Monochromatic colorscheme for matplotlib with opinionated sensible default

Monochromatic colorscheme for matplotlib with opinionated sensible default If you need a simple monochromatic colorscheme for your matplotlib figures,

Aria Ghora Prabono 2 May 06, 2022