Skip to content

DoFabien/edigeoToGeojson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);

About

Convertit le cadastre du format EDIGEO en Geojson

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published