Skip to content

tempDir in imagico not set #9

@rj76

Description

@rj76

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions