Skip to content

Commit

Permalink
fix(cli): create instance of EPSG code if not already defined (#2141)
Browse files Browse the repository at this point in the history
  • Loading branch information
blacha authored Apr 5, 2022
1 parent 957b612 commit 9e7b508
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cli/src/cog/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export class CogBuilder {

const projection = image.valueGeo(TiffTagGeo.ProjectedCSTypeGeoKey) as number;
if (projection != null && projection !== InvalidProjectionCode) {
return Epsg.get(projection);
return Epsg.tryGet(projection) ?? new Epsg(projection);
}

const imgWkt = image.value<string>(TiffTag.GeoAsciiParams);
Expand Down

0 comments on commit 9e7b508

Please sign in to comment.