bruce-models 7.1.90 → 7.1.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bruce-models.es5.js +96 -2
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +91 -1
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +2 -1
- package/dist/lib/bruce-models.js.map +1 -1
- package/dist/lib/import/import-assembly.js.map +1 -1
- package/dist/lib/import/import-tif.js +107 -0
- package/dist/lib/import/import-tif.js.map +1 -0
- package/dist/lib/tileset/tileset.js.map +1 -1
- package/dist/types/bruce-models.d.ts +2 -1
- package/dist/types/import/import-assembly.d.ts +1 -0
- package/dist/types/import/import-tif.d.ts +120 -0
- package/dist/types/tileset/tileset.d.ts +3 -0
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -17708,6 +17708,100 @@ var ImportLcc;
|
|
|
17708
17708
|
ImportLcc$$1.ImportEntities = ImportEntities;
|
|
17709
17709
|
})(ImportLcc || (ImportLcc = {}));
|
|
17710
17710
|
|
|
17711
|
+
/**
|
|
17712
|
+
* Analyse-then-import for GeoTIFF sources.
|
|
17713
|
+
*/
|
|
17714
|
+
var ImportTif;
|
|
17715
|
+
(function (ImportTif$$1) {
|
|
17716
|
+
/**
|
|
17717
|
+
* A few vertical CRSs a user is likely to be choosing between. Any EPSG vertical code is
|
|
17718
|
+
* accepted, so this is a convenience rather than the permitted set.
|
|
17719
|
+
*/
|
|
17720
|
+
let EVerticalDatum;
|
|
17721
|
+
(function (EVerticalDatum) {
|
|
17722
|
+
// Heights are already on the ellipsoid, or the source is not elevation.
|
|
17723
|
+
EVerticalDatum[EVerticalDatum["None"] = 0] = "None";
|
|
17724
|
+
EVerticalDatum[EVerticalDatum["NAVD88"] = 5703] = "NAVD88";
|
|
17725
|
+
EVerticalDatum[EVerticalDatum["EGM96"] = 5773] = "EGM96";
|
|
17726
|
+
EVerticalDatum[EVerticalDatum["EGM2008"] = 3855] = "EGM2008";
|
|
17727
|
+
EVerticalDatum[EVerticalDatum["NZVD2016"] = 7839] = "NZVD2016";
|
|
17728
|
+
})(EVerticalDatum = ImportTif$$1.EVerticalDatum || (ImportTif$$1.EVerticalDatum = {}));
|
|
17729
|
+
/**
|
|
17730
|
+
* Reads an analysis out of a completed Pending Action.
|
|
17731
|
+
* @param action the completed analyze action
|
|
17732
|
+
* @returns the result, or null when the action carries none
|
|
17733
|
+
*/
|
|
17734
|
+
function ReadAnalysis(action) {
|
|
17735
|
+
if (!(action === null || action === void 0 ? void 0 : action.Result)) {
|
|
17736
|
+
return null;
|
|
17737
|
+
}
|
|
17738
|
+
try {
|
|
17739
|
+
const parsed = typeof action.Result === "string" ? JSON.parse(action.Result) : action.Result;
|
|
17740
|
+
// A successful action wraps its answer; older ones returned it bare.
|
|
17741
|
+
const result = (parsed === null || parsed === void 0 ? void 0 : parsed.success) && (parsed === null || parsed === void 0 ? void 0 : parsed.result) ? parsed.result : parsed;
|
|
17742
|
+
return result && typeof result === "object" ? result : null;
|
|
17743
|
+
}
|
|
17744
|
+
catch (_a) {
|
|
17745
|
+
return null;
|
|
17746
|
+
}
|
|
17747
|
+
}
|
|
17748
|
+
ImportTif$$1.ReadAnalysis = ReadAnalysis;
|
|
17749
|
+
/**
|
|
17750
|
+
* Whether the user has to be asked what the heights are referenced to.
|
|
17751
|
+
* @param analysis the analysis result
|
|
17752
|
+
* @returns true for elevation that declares no vertical CRS
|
|
17753
|
+
*/
|
|
17754
|
+
function NeedsVerticalDatum(analysis) {
|
|
17755
|
+
if (!analysis) {
|
|
17756
|
+
return false;
|
|
17757
|
+
}
|
|
17758
|
+
return (analysis.type === Tileset.EType.Terrain) && (analysis.verticalDeclared !== true);
|
|
17759
|
+
}
|
|
17760
|
+
ImportTif$$1.NeedsVerticalDatum = NeedsVerticalDatum;
|
|
17761
|
+
/**
|
|
17762
|
+
* Whether the user has to be asked which CRS the source is in.
|
|
17763
|
+
* @param analysis the analysis result
|
|
17764
|
+
* @returns true when no horizontal CRS could be resolved at all
|
|
17765
|
+
*/
|
|
17766
|
+
function NeedsHorizontalCrs(analysis) {
|
|
17767
|
+
if (!analysis) {
|
|
17768
|
+
return false;
|
|
17769
|
+
}
|
|
17770
|
+
return !(analysis.epsg && analysis.epsg > 0);
|
|
17771
|
+
}
|
|
17772
|
+
ImportTif$$1.NeedsHorizontalCrs = NeedsHorizontalCrs;
|
|
17773
|
+
/**
|
|
17774
|
+
* Starts an analysis of an uploaded raster.
|
|
17775
|
+
* @param params
|
|
17776
|
+
* @returns the Pending Action to poll
|
|
17777
|
+
*/
|
|
17778
|
+
function Analyze(params) {
|
|
17779
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
17780
|
+
let { api, analyze, req: reqParams } = params;
|
|
17781
|
+
if (!api) {
|
|
17782
|
+
api = ENVIRONMENT.Api().GetBruceApi();
|
|
17783
|
+
}
|
|
17784
|
+
return api.POST("import/analyze/tif", analyze, Api.PrepReqParams(reqParams));
|
|
17785
|
+
});
|
|
17786
|
+
}
|
|
17787
|
+
ImportTif$$1.Analyze = Analyze;
|
|
17788
|
+
/**
|
|
17789
|
+
* Imports an analysed raster: the API creates the tileset and starts generating it.
|
|
17790
|
+
* @param params
|
|
17791
|
+
* @returns the created tileset and the Pending Action to poll
|
|
17792
|
+
*/
|
|
17793
|
+
function Import(params) {
|
|
17794
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
17795
|
+
let { api, fileImport, req: reqParams } = params;
|
|
17796
|
+
if (!api) {
|
|
17797
|
+
api = ENVIRONMENT.Api().GetBruceApi();
|
|
17798
|
+
}
|
|
17799
|
+
return api.POST("import/tif", fileImport, Api.PrepReqParams(reqParams));
|
|
17800
|
+
});
|
|
17801
|
+
}
|
|
17802
|
+
ImportTif$$1.Import = Import;
|
|
17803
|
+
})(ImportTif || (ImportTif = {}));
|
|
17804
|
+
|
|
17711
17805
|
/**
|
|
17712
17806
|
* Imported file records are created when a file is imported into Nextspace.
|
|
17713
17807
|
* The associated file may be attached to the record.
|
|
@@ -23268,7 +23362,7 @@ var UrlUtils;
|
|
|
23268
23362
|
})(UrlUtils || (UrlUtils = {}));
|
|
23269
23363
|
|
|
23270
23364
|
// This is updated with the package.json version on build.
|
|
23271
|
-
const VERSION = "7.1.
|
|
23365
|
+
const VERSION = "7.1.91";
|
|
23272
23366
|
|
|
23273
|
-
export { VERSION, Account, AccountAudit, AccountConcept, AccountFeatures, AccountInvite, AccountLimits, AccountTemplate, AccountType, AnnDocument, AbstractApi, Api, ApiGetters, BruceApi, GlobalApi, GuardianApi, Assembly, Calculator, ChangeSet, ClientFile, ClientFileValueMap, Bounds, BruceEvent, BruceVariable, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, GeoJson, Geometry, LRUCache, UTC, CustomForm, DashboardView, DataFeed, DataLab, DataLabGroup, DataSource, DataTransform, Comment, Entity, EntityAttachment, EntityAttachmentType, EntityAttribute, EntityComment, EntityCoords, EntityHistoricData, EntityLink, EntityLod, EntityLodCategory, EntityRelation, EntityRelationType, EntitySource, EntityTableView, EntityTag, EntityType, EntityTypeRelation, EntityTypeTrigger, Ontology, OntologyDocument, ENVIRONMENT, ExportBrz, ExportCsv, ExportNsx, ExportUsd, Hexbin, ImportAssembly, ImportCad, ImportCsv, ImportGeoJson, ImportJson, ImportKml, ImportLcc, ImportedFile, Uploader, Markup, UIMarkup, NAVIGATOR_CHAT_EVENT_ENTITY_HIGHLIGHT_APPLIED, NAVIGATOR_CHAT_EVENT_SCENE_CONTEXT_PREFETCHED, NavigatorChatClient, NavigatorMcpWebSocketClient, Plugin, PluginAiTool, ProgramKey, MenuItem, ProjectView, ProjectViewBookmark, ProjectViewBookmarkGroup, ProjectViewLegacy, ProjectViewLegacyBookmark, ProjectViewLegacyTile, ProjectViewTile, ZoomControl, Scenario, HostingLocation, MessageBroker, PendingAction, RecordChangeFeed, Style, Tileset, Tracking, Permission, Session, User, UserGroup, UserMfaMethod, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils };
|
|
23367
|
+
export { VERSION, Account, AccountAudit, AccountConcept, AccountFeatures, AccountInvite, AccountLimits, AccountTemplate, AccountType, AnnDocument, AbstractApi, Api, ApiGetters, BruceApi, GlobalApi, GuardianApi, Assembly, Calculator, ChangeSet, ClientFile, ClientFileValueMap, Bounds, BruceEvent, BruceVariable, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, GeoJson, Geometry, LRUCache, UTC, CustomForm, DashboardView, DataFeed, DataLab, DataLabGroup, DataSource, DataTransform, Comment, Entity, EntityAttachment, EntityAttachmentType, EntityAttribute, EntityComment, EntityCoords, EntityHistoricData, EntityLink, EntityLod, EntityLodCategory, EntityRelation, EntityRelationType, EntitySource, EntityTableView, EntityTag, EntityType, EntityTypeRelation, EntityTypeTrigger, Ontology, OntologyDocument, ENVIRONMENT, ExportBrz, ExportCsv, ExportNsx, ExportUsd, Hexbin, ImportAssembly, ImportCad, ImportCsv, ImportGeoJson, ImportJson, ImportKml, ImportLcc, ImportTif, ImportedFile, Uploader, Markup, UIMarkup, NAVIGATOR_CHAT_EVENT_ENTITY_HIGHLIGHT_APPLIED, NAVIGATOR_CHAT_EVENT_SCENE_CONTEXT_PREFETCHED, NavigatorChatClient, NavigatorMcpWebSocketClient, Plugin, PluginAiTool, ProgramKey, MenuItem, ProjectView, ProjectViewBookmark, ProjectViewBookmarkGroup, ProjectViewLegacy, ProjectViewLegacyBookmark, ProjectViewLegacyTile, ProjectViewTile, ZoomControl, Scenario, HostingLocation, MessageBroker, PendingAction, RecordChangeFeed, Style, Tileset, Tracking, Permission, Session, User, UserGroup, UserMfaMethod, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils };
|
|
23274
23368
|
//# sourceMappingURL=bruce-models.es5.js.map
|