feat(server) Remove mapbox and use local reverse geocoding (#738)

* feat: local reverse geocoding implementation, removes mapbox

* Disable non-null tslintrule

* Disable non-null tslintrule

* Remove tsignore

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
Zack Pollard
2022-09-23 03:50:05 +01:00
committed by GitHub
parent e5459b68ff
commit f377b64065
7 changed files with 905 additions and 1296 deletions

View File

@@ -10,12 +10,8 @@ export const immichAppConfig: ConfigModuleOptions = {
DB_PASSWORD: Joi.string().required(),
DB_DATABASE_NAME: Joi.string().required(),
JWT_SECRET: Joi.string().required(),
ENABLE_MAPBOX: Joi.boolean().required().valid(true, false),
MAPBOX_KEY: Joi.any().when('ENABLE_MAPBOX', {
is: false,
then: Joi.string().optional().allow(null, ''),
otherwise: Joi.string().required(),
}),
DISABLE_REVERSE_GEOCODING: Joi.boolean().optional().valid(true, false).default(false),
REVERSE_GEOCODING_PRECISION: Joi.number().optional().valid(0,1,2,3).default(3),
LOG_LEVEL: Joi.string().optional().valid('simple', 'verbose').default('simple'),
}),
};

View File

@@ -1,5 +1,4 @@
import { AssetEntity } from '@app/database/entities/asset.entity';
import { ExifEntity } from '@app/database/entities/exif.entity';
export interface IExifExtractionProcessor {
/**
@@ -36,10 +35,9 @@ export interface IVideoLengthExtractionProcessor {
}
export interface IReverseGeocodingProcessor {
/**
* The Asset entity that was saved in the database
*/
exif: ExifEntity;
exifId: string;
latitude: number;
longitude: number;
}
export type IMetadataExtractionJob =