const gm = require('../../geomangler');

const connection = {
  host: 'vaskan.vst.local',
  user: 'DIV_Reader',
  password: 'Lasa_div',
  database: 'DIV'
};

const table = 'FIBRA_ADRESS_OMR_STATUS';
const geometryName = 'Shape';
const query = `select Status_txt,OMRNAMN,${geometryName}.STAsText() AS ${geometryName};
from "${table}";`

gm.read('mssql', query, {
  connection,
  geometryName
})
  .then((features) => {
    console.log(features);
  });
