Hi,
I'm trying to add elevation data to existing geojson objects, but I'm running into a problem I can't seem to be able to solve.
I'm getting this error:
addElevation error [ 'TypeError: path must be a string',
' at TypeError (native)',
' at Object.fs.unlinkSync (fs.js:883:18)',
' at ImagicoElevationDownloader.<anonymous> (/home/richard/workspace/atlas_elevation/node_modules/node-hgt/src/imagico.js:20:16)',
' at /home/richard/workspace/atlas_elevation/node_modules/node-hgt/node_modules/promise/lib/core.js:33:15',
' at flush (/home/richard/workspace/atlas_elevation/node_modules/node-hgt/node_modules/promise/node_modules/asap/asap.js:27:13)',
' at process._tickCallback (node.js:355:11)' ]
The code:
client.query('SELECT naam, ST_AsGeoJSON(ST_Transform(geometery, 900913), 6) AS geometry FROM table LIMIT 1', function(error, result) {
if (error) {
console.log('Error querying', error);
process.exit();
}
dbgeo.parse({ 'data': result.rows }, function(error, geojson) {
if (error) {
console.log('dbgeo.parse error', error);
return;
}
addElevation(geojson, new TileSet(__dirname + '/data'), function(error, elevation) {
if (error) {
console.log('addElevation error', error.stack.split("\n"));
process.exit();
return;
}
});
});
Any ideas?
Cheers,
Richard
Hi,
I'm trying to add elevation data to existing geojson objects, but I'm running into a problem I can't seem to be able to solve.
I'm getting this error:
The code:
Any ideas?
Cheers,
Richard