Verified Commit 40c802bf authored by Michael Auer's avatar Michael Auer
Browse files

code cleanup

parent 4f9c1a0c
...@@ -162,7 +162,7 @@ class Ohsome2X extends EventEmitter { ...@@ -162,7 +162,7 @@ class Ohsome2X extends EventEmitter {
this.emit('progress', {type:'progress', processed: this.currentFeatureCount, total: this.totalFeatureCount, cursor: cursor, fetchSize: fetchSize, timestamp: new Date().toISOString()}); this.emit('progress', {type:'progress', processed: this.currentFeatureCount, total: this.totalFeatureCount, cursor: cursor, fetchSize: fetchSize, timestamp: new Date().toISOString()});
const sourceFeatureCollection: any = await this.sourceFeatureType.getFeaturesByCursorAndLimit(cursor, fetchSize); const sourceFeatureCollection: any = await this.sourceFeatureType.getFeaturesByCursorAndLimit(cursor, fetchSize);
console.log(JSON.stringify(sourceFeatureCollection,null,2));
let targetFeatureCollection: any; let targetFeatureCollection: any;
featureCount = sourceFeatureCollection.features.length; featureCount = sourceFeatureCollection.features.length;
......
...@@ -164,7 +164,7 @@ export class PgFeatureType extends FeatureType { ...@@ -164,7 +164,7 @@ export class PgFeatureType extends FeatureType {
ORDER BY "${this.geometryId}" ASC ORDER BY "${this.geometryId}" ASC
LIMIT ${fetchSize};`; LIMIT ${fetchSize};`;
console.log('Get cells from ' + this.tableName + ' with id > ' + cursor + ' with fetchSize: ' + fetchSize); console.log('Get cells from ' + this.tableName + ' with id > ' + cursor + ' with fetchSize: ' + fetchSize);
console.log(sql);
const result = await this.db.any(sql, cursor); const result = await this.db.any(sql, cursor);
let features = result.map((row: any) => turfHelpers.feature(row.geom, {id: row.id})); let features = result.map((row: any) => turfHelpers.feature(row.geom, {id: row.id}));
let featureCollection = turfHelpers.featureCollection(features); let featureCollection = turfHelpers.featureCollection(features);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment