Skip to content

Commit

Permalink
fix: product version in gpkg name (#54)
Browse files Browse the repository at this point in the history
* fix: product version in gpkg name

* fix: product version in gpkg name

* fix: product version in gpkg name
  • Loading branch information
CL-SHLOMIKONCHA authored Feb 1, 2023
1 parent 9f410f1 commit 79b7107
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/createPackage/models/createPackageManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ export class CreatePackageManager {
private generatePackageName(productType: string, productId: string, productVersion: string, zoomLevel: number, bbox: BBox): string {
const numberOfDecimals = 5;
const bboxToString = bbox.map((val) => String(val.toFixed(numberOfDecimals)).replace('.', '_').replace(/-/g, 'm')).join('');
return `${productType}_${productId}_${productVersion}_${zoomLevel}_${bboxToString}.gpkg`;
const productVersionConvention = productVersion.replace('.', '_');
return `${productType}_${productId}_${productVersionConvention}_${zoomLevel}_${bboxToString}.gpkg`;
}

private extractPolygonParts(layerPolygonParts: FeatureCollection, sanitizedBboxPolygonzied: Feature<Polygon>): FeatureCollection {
Expand Down

0 comments on commit 79b7107

Please sign in to comment.