Giter Club home page Giter Club logo

colorize-swisssurface3d-lidar's Introduction

Merge SwissTopo Surface3D (aerial Lidar) and SwissImage10 (orthoimages) data

Goal

This code gives an example for obtaining colorized point cloud dataset out of two SwissTopo sources:

  • SwissSurface3D: an aerial Lidar database, with the following highly accurate classification - Unclassified|Ground|Building|Vegetation|Bridges&Viaducs|Water
  • SwissImage10: an orthoimage database, with 10cm resolution.

The data comes in the form of 1km² square tiles, in CH1903+ / LV95 (EPSG:2056) CRS. See linked website for full documentation.

Running unzip_and_prepare_data.py (see below for instructions) will produce the following:

  • Tiles separated into train, validation, and test sets (see TRAIN_FRAC and VAL_TEST_FRAC for their size), as documented in a csv file.
  • Unziped point cloud with color information in colorized/train/, colorized/val/, and colorized/test/ subfolders (see RASTER_RESOLUTION to choose color resolution among 2m and 0.1m).

Process

1. Select you data

How to select data and download on SwissTopo website is explained here (EN) and [here (FR)])[https://www.swisstopo.admin.ch/fr/geodata/info.html]. Overall, the idea is to download point clouds (.las files) in the ./data/download/las/ folder, and orthoimages (.tif files) in the ./data/download/ortho/.

SwissSurface3D: Selection and download page SwissImage10: Selection and download page

Select your area of interest, click on "Export all links", and save as a .csv file with a meaningful name (e.g. DATE_AREA_SwissIMAGE10cm_Links_LV95.csv for orthoimages and DATE_AREA_SwissSURFACE3D_Links_LV95.csv).

Such files for the area of Lausanne are given under ./download_links/20220110_Lausanne as an example.

Assumptions of filename convention:

  • Download point cloud are expected to have filename format swisssurface3d_YEAR_{X}-{Y}_2056_5728.las.zip
  • Downloaded orthoimages rasters are expected to have filename format swissimage-dop10_YEAR_{X}-{Y}_0.1_2056

XY pairs will be used to match point clouds with orthoimages and are expected to be unique.

2. Download SwissSurface3D data

    wget --directory-prefix=./download/orthos/ --input-file=DATE_AREA_SwissIMAGE10cm_Links_LV95.csv
    wget --directory-prefix=./download/las/ --input-file=DATE_AREA_SwissSURFACE3D_Links_LV95.csv

3. Make a train/val/test split and colorize

In a virtual environment, you will need pdal (for installation see here and here) and numpy to be installed. Code was run using python 3.9 and PDAL 3.0.2.

Activate the environement, then run:

    python unzip_and_colorize.py

There are a few harcoded arguments you can parameter in unzip_and_prepare_data.py.

colorize-swisssurface3d-lidar's People

Contributors

charlesgaydon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.