Commit 904ec8b2 authored by Michael Auer's avatar Michael Auer
Browse files

resolved some typescript type issues

parent 22651ee5
......@@ -20,32 +20,51 @@ export interface PostgisStore extends Store {
database: string;
}
export interface FeatureTypeConfig {
name : string;
store: Store;
horizontalTimestampColumns?: boolean; //defalut is false
createGeometry?: boolean; //default is: true
storeZeroValues?: boolean; //default is true
computeValuePerArea?: boolean; //default is false
transformToWebmercator? :boolean; //default is false
export interface FeatureTypeConfig<T extends GeoJSONStore | PostgisStore> {
name? : string;
store: T;// GeoJSONStore | PostgisStore;
}
export interface SourceFeatureTypeConfig {
geometryId: string|number;
cursor?: number;
}
export interface GeoJSONFeatureTypeConfig extends FeatureTypeConfig {
store: GeoJSONStore;
export interface TargetFeatureTypeConfig {
horizontalTimestampColumns?: boolean; // default is false
createGeometry?: boolean; // default is: true
storeZeroValues?: boolean; // default is true
computeValuePerArea?: boolean; // default is false
transformToWebmercator? :boolean; // default is false
}
export interface GeoJSONFeatureTypeConfig extends FeatureTypeConfig<GeoJSONStore> {
// store: GeoJSONStore;
}
export interface PostgisFeatureTypeConfig extends FeatureTypeConfig {
store: PostgisStore;
schema?: string;
export interface PostgisFeatureTypeConfig extends FeatureTypeConfig<PostgisStore> {
name: string;
// store: PostgisStore;
schema?: string; // default is: public
geometryColumn: string;
fetchSize?: number;
}
export interface SourceGeoJSONFeatureTypeConfig extends GeoJSONFeatureTypeConfig, SourceFeatureTypeConfig {}
export interface SourcePostgisFeatureTypeConfig extends PostgisFeatureTypeConfig, SourceFeatureTypeConfig {
fetchSize?: number; // default is 0 ( -> compute all in one )
cursor?: number | string;
}
export interface TargetGeoJSONFeatureTypeConfig extends GeoJSONFeatureTypeConfig, TargetFeatureTypeConfig {}
export interface TargetPostgisFeatureTypeConfig extends PostgisFeatureTypeConfig, TargetFeatureTypeConfig {
createIndexes?: boolean;
}
export type OhsomeQueryConfigTypes = 'node' | 'way' | 'relation' | 'node,way' | 'node,relation' | 'way,relation' | 'node,way,relation' | 'point' | 'line' | 'polygon' | 'point,line' | 'point,polygon' | 'line,polygon' | 'point,line,polygon' | '';
export type OhsomeQueryConfigFormat = 'json' | 'csv';
export interface OhsomeQueryConfig {
queryType: string; // e.g. elements/count for elements/count/groupBy/boundary
keys: string; // comma seperated values e.g.['highway','maxspeed'].join(),
......@@ -55,12 +74,12 @@ export interface OhsomeQueryConfig {
bpolys?: FeatureCollection | string;
bboxes?: string;
bcircles?: string
format?: string; // default is 'json'. Others are 'csv' | 'geojson'
format?: OhsomeQueryConfigFormat; // default is 'csv'. Others are 'json' | ('geojson' -> not yet supported)
}
export interface Ohsome2XConfig {
ohsomeApiUrl?: string;
source: FeatureTypeConfig;
target: FeatureTypeConfig;
source: SourceGeoJSONFeatureTypeConfig | SourcePostgisFeatureTypeConfig;
target: TargetGeoJSONFeatureTypeConfig | TargetPostgisFeatureTypeConfig;
ohsomeQuery: OhsomeQueryConfig;
}
\ No newline at end of file
Supports Markdown
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