Crates.io | las-kml-to-stl |
lib.rs | las-kml-to-stl |
version | 0.1.0 |
source | src |
created_at | 2024-06-18 06:00:00.470713 |
updated_at | 2024-06-18 06:00:00.470713 |
description | A short description of my package |
homepage | https://github.com/paulwrath1223/las-kml-to-stl |
repository | https://github.com/paulwrath1223/las-kml-to-stl |
max_upload_size | |
id | 1275151 |
size | 132,921 |
This library take Lidar data like freely available data from the US Geolocical Survey and any number of KML files to create a 3d printable mesh of the terrain in the specified area.
Yes. But also I couldn't get TouchTerrain to work, so this library just implements it in Rust with proper (ish) error handling and Much better documentation in the code. It also uses local LAS files instead of going through Google Earth explorer because google didn't reply to my request :(. In addition to local file 'support', It also has support for KML files as masks. More on this in KML section.
This library also lets you create masks for 3d data based off of KML files. You can import files containing Polygons, Trails, and Waypoints. Internally the KML files are turned into Geo types so you don't have to use KML files if you provide a valid Polygon, LineString, or Point. These masks can be used to select the portion of the data to turn into an STL and adjust height values using the mask. These features together let you print paths in different colors, or even split the trails into a separate object that can be slotted into the terrain model. (letting you print the object separately and hence use different colors even without a material switching printer)
This library is pretty slow. Straight up. Loading LAS data has not yet been implemented for multithreading and can take up to an hour if you want to load a whole country or something. However, processed height maps can be saved and loaded pretty quickly, allowing you to change STL setting with a fairly quick iteration time.
This library uses UTM and normal Lat, Lon GPS decimal degrees. Be careful about what units various objects are, because all units use the same Structs. Please also check the units of your LAS input because while it's probably in UTM, it might be in some abomination conjured out of the ass of your local city officials. (Like California 2 SP83 survey feet). If you are unlucky enough to have data in a deprecated standard you can still load it as a height map, but then you need to convert the bounding coordinates to UTM. I recommend espg.io for this, as they support many deprecated systems. I have not tested the conversion method, so if you have issues, Las2Las can convert between coordinate systems of the raw LAZ/LAS files although it seems to be a port from MS Dos or something equally legacy.
UTM uses various zones to better project GPS coordinates, and honestly that all I know, I don't normally work with GEO data. I don't know if you can mix zones or if they must be constant, my data is only in one zone, so I never tested it. You can definitely look up what zone a coordinate is in however thanks to google.