Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    sosipublic

    SOSi (Node.js)

    Streaming .sos files. Very basic functionality

     
    var  join = require('path').join
      , file = join(__dirname, "data",'Grimstad Vest-Landvik 1.sos')
      , dir = join(__dirname, "data")
      , SOSI = require('../');
      
      
       var stream = new SOSI.stream(dir);   
       stream.on("data",function(data) {
            console.log(data); 
       });
     
     
       var streamFile = new SOSI.streamFile(file);   
       streamFile.on("data",function(data) {
            console.log(data);
       });
     
     
      
      

    The objects returned are:

    expected = { type: 'punkt',
                         objtype: 'StolpeStor',
                         kvalitet: '96',
                         driftsmerking: '"LB.NAU.MO.S-AG.HOLBE"',
                         'g-nord': '"6467771.091100',
                         'g-øst': '"474086.635900',
                         mastenummer: '"29"',
                         plassering: '"GRI-LANDVIK"',
                         'nøh': {},
                         coordinates: [ '646777109', '47408663', '0' ] };
                         

    Keywords

    none

    install

    npm i sosi

    Downloadsweekly downloads

    4

    version

    0.0.2

    license

    none

    repository

    githubgithub

    last publish

    collaborators

    • avatar