0.4.2 • Published 4 years ago

edigeo-to-geojson v0.4.2

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

edigeoToGeojson

Convertit les fichiers du cadastre français de l'EDIGEO en GEOJSON

Installation

    npm install edigeo-to-geojson

Exemple

const path = require('path');
const edigeoTogeojson = require('edigeo-to-geojson');
const decompress = require("decompress");

decompress('MonFichierEdigeo-cc-38001000AS01.tar.bz2').then(files => {
    const bufferData = { 'THF': undefined, 'QAL': undefined, 'GEO':undefined, 'VEC':[]}

    for (let i = 0; i < files.length; i++){
        if (/\.THF$/.test(files[i].path)){
            bufferData.THF = files[i].data;
        } else if (/\.VEC$/.test(files[i].path)){
            bufferData.VEC.push(files[i].data);
        } else if (/\.QAL$/.test(files[i].path)){
            bufferData.QAL = files[i].data;
        } else if (/\.GEO$/.test(files[i].path)){
            bufferData.GEO = files[i].data;
        }
    }

   const data = edigeoTogeojson(bufferData);
0.4.1

4 years ago

0.4.2

4 years ago

0.4.0

4 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago