Gis
Class in @bimworks/jssdk.
API catalogue · @bimworks/jssdk · Class
API Namespace Gis is used for GIS related API calls.
Members#
| Member | Kind | Description |
|---|---|---|
| constructor | Method | |
| copyGeoReference | Method | Gives the Version versionUuid the georeference of fromVersionUuid: the same location, rotation and north, and the same anchor point converted to its length u… |
| downloadCityGml | Method | Download one or multiple models serialized to CityGML; options.ui: the part of the UI a person asked this from |
| exportCityGML3 | Method | |
| extractGeoReferenceFromIfcMapConversion | Method | Extract the GeoReference from the given Version by using the IfcMapConversion object, this is only available in IFC4 and later. This is the recommended way t… |
| extractGeoReferenceFromIfcMapConversionPset | Method | Extract the GeoReference from the given Version by using the IfcMapConversion information from a Pset, this is a fallback method in Ifc2x3 and not recommende… |
| extractGeoReferenceUsingEpsg | Method | Extract the GeoReference from the given Version by using a specific EPSG code. This method assumes that the LocalPlacement of IfcSite was used to write the x… |
| extractGeoReferenceUsingIfcSite | Method | Extract the GeoReference from the given Version by using the latitude/longitude stored as attributes on the IfcSite object. This is not the recommended way t… |
| extractGeoReferenceUsingWkt | Method | Extract the GeoReference from the given Version by using a specific WKT string. This can be useful for CRS definitions that do not exist in the EPSG database… |
| generate3DTilesUrl | Method | Generate a 3D Tiles URL for all models in a specific Node or for a set of Version UUIDs. Also the content available on this URL is dynamic, when models are a… |
| getGeoReference | Method | Get the GeoReference that is currently stored on the given Version. placedPoints adds where the model's origin, the centre of its bounds and the corners of i… |
| getMapConversion | Method | The georeference the Version carries in its IFC data, raw: the IfcMapConversion of its 3D model context with its IfcProjectedCRS (map_conversion, null when t… |
| setGeoReference | Method | Set/update the GeoReference of the given Version. rotationNorth says which north geoReference.rotation is from: "GRID", against the grid of originalEpsg (an … |
constructor#
constructor()copyGeoReference#
public copyGeoReference(versionUuid: string, fromVersionUuid: string): Promise<CopiedGeoReference>Gives the Version versionUuid the georeference of fromVersionUuid: the same location, rotation and north, and the same anchor point converted to its length unit. A georeference places a Version's aligned coordinates, so a drawing (PDF, DWG) aligned onto a model and given that model's georeference lies on the earth where the model is. Needs write rights on versionUuid and read rights on fromVersionUuid.
Parameters#
| Name | Type | Description |
|---|---|---|
versionUuid |
string |
|
fromVersionUuid |
string |
downloadCityGml#
public downloadCityGml(versionUuids: (string)[], fileType: string, settings: CityGmlDownloadSettings, options?: CallOptions): Promise<string>Download one or multiple models serialized to CityGML; options.ui: the part of the UI a person asked this from
Parameters#
| Name | Type | Description |
|---|---|---|
versionUuids |
(string)[] |
|
fileType |
string |
|
settings |
CityGmlDownloadSettings | |
options |
CallOptions |
exportCityGML3#
public exportCityGML3(versionUuids: (string)[], fileType: string, settings: CityGML3ExportSettings, options?: CallOptions): Promise<string>Parameters#
| Name | Type | Description |
|---|---|---|
versionUuids |
(string)[] |
A list of Version UUID |
fileType |
string |
Can be either CITY_GML_3_0 or CITY_JSON_2_0_0 |
settings |
CityGML3ExportSettings | The settings for this export |
options |
CallOptions | ui: the part of the UI a person asked this from |
extractGeoReferenceFromIfcMapConversion#
public extractGeoReferenceFromIfcMapConversion(versionUuid: string): Promise<GeoReferenceExtractionResult>Extract the GeoReference from the given Version by using the IfcMapConversion object, this is only available in IFC4 and later. This is the recommended way to extract geo references. Note, this to persist this extracted EPSG code on the model, subsequently use setGeoReference
Parameters#
| Name | Type | Description |
|---|---|---|
versionUuid |
string |
extractGeoReferenceFromIfcMapConversionPset#
public extractGeoReferenceFromIfcMapConversionPset(versionUuid: string): Promise<GeoReferenceExtractionResult>Extract the GeoReference from the given Version by using the IfcMapConversion information from a Pset, this is a fallback method in Ifc2x3 and not recommended to use. Note, this to persist this extracted EPSG code on the model, subsequently use setGeoReference
Parameters#
| Name | Type | Description |
|---|---|---|
versionUuid |
string |
extractGeoReferenceUsingEpsg#
public extractGeoReferenceUsingEpsg(versionUuid: string, epsgCode: string): Promise<GeoReferenceExtractionResult>Extract the GeoReference from the given Version by using a specific EPSG code.
This method assumes that the LocalPlacement of IfcSite was used to write the x/y coordinates of the given EPSG system
This method is not the recommended to extract geo refererences from models because it requires external data (the EPSG code) to extract the information and because it makes working with models in local coordinates confusing because of the large numbers
Note, this to persist this extracted EPSG code on the model, subsequently use setGeoReference
Parameters#
| Name | Type | Description |
|---|---|---|
versionUuid |
string |
|
epsgCode |
string |
extractGeoReferenceUsingIfcSite#
public extractGeoReferenceUsingIfcSite(versionUuid: string): Promise<GeoReferenceExtractionResult>Extract the GeoReference from the given Version by using the latitude/longitude stored as attributes on the IfcSite object. This is not the recommended way to extract geo references from models because it's generally not accurately exported. Note, this to persist this extracted EPSG code on the model, subsequently use setGeoReference
Parameters#
| Name | Type | Description |
|---|---|---|
versionUuid |
string |
extractGeoReferenceUsingWkt#
public extractGeoReferenceUsingWkt(versionUuid: string, wkt: string): Promise<GeoReferenceExtractionResult>Extract the GeoReference from the given Version by using a specific WKT string. This can be useful for CRS definitions that do not exist in the EPSG database.
This method assumes that the LocalPlacement of IfcSite was used to write the x/y coordinates of the given EPSG system
This method is not the recommended to extract geo refererences from models because it requires external data (the EPSG code) to extract the information and because it makes working with models in local coordinates confusing because of the large numbers
Note, this to persist this extracted EPSG code on the model, subsequently use setGeoReference
Parameters#
| Name | Type | Description |
|---|---|---|
versionUuid |
string |
|
wkt |
string |
generate3DTilesUrl#
public generate3DTilesUrl(settings: TilesSettings): Promise<string>Generate a 3D Tiles URL for all models in a specific Node or for a set of Version UUIDs. Also the content available on this URL is dynamic, when models are added/removed to/from this node, it will be reflected in the tile stream
A URL is valid for 90 days and cannot be revoked.
Parameters#
| Name | Type | Description |
|---|---|---|
settings |
TilesSettings | A settings object that specifies which models to load and other settings |
Returns#
A URL that serves the 3D Tileset
getGeoReference#
public getGeoReference(versionUuid: string, targetEpsg?: string | null, options?: { includeSource?: boolean; placedPoints?: boolean }): Promise<GeoReferenceResult | null>Get the GeoReference that is currently stored on the given Version. placedPoints adds where the model's origin, the centre of its bounds and the corners of its bounds land on the earth (GeoReferenceResult.zero_point, GeoReferenceResult.bounds_centre, GeoReferenceResult.bounds_outline); includeSource where a copied georeference came from (GeoReferenceResult.geo_reference_source).
Parameters#
| Name | Type | Description |
|---|---|---|
versionUuid |
string |
|
targetEpsg |
string | null |
|
options |
{ includeSource?: boolean; placedPoints?: boolean } |
getMapConversion#
public getMapConversion(versionUuid: string): Promise<MapConversionResult>The georeference the Version carries in its IFC data, raw: the IfcMapConversion of its 3D model context with its IfcProjectedCRS (map_conversion, null when there is none), whether it can be edited with the BUL statement GEOREFERENCE (supported, reason), and the WGS 84 value an upload of the file stores (map_conversion.geo_reference). Lengths are in the map unit (crs.map_unit_metres, null = project unit).
Parameters#
| Name | Type | Description |
|---|---|---|
versionUuid |
string |
setGeoReference#
public setGeoReference(versionUuid: string, geoReference: GeoReference | null, anchorPoint?: Vector3d, originalEpsg?: string, rotationNorth?: "GRID" | "TRUE"): Promise<unknown>Set/update the GeoReference of the given Version. rotationNorth says which north geoReference.rotation is from: "GRID", against the grid of originalEpsg (an IfcMapConversion's rotation), or "TRUE". Omitted, the server stores none, and the rotation counts as grid-relative when the version has an original EPSG, else as true north. A null geoReference removes the Version's georeference, with its anchor point, north and EPSG.
Parameters#
| Name | Type | Description |
|---|---|---|
versionUuid |
string |
|
geoReference |
GeoReference | null |
|
anchorPoint |
Vector3d | |
originalEpsg |
string |
|
rotationNorth |
"GRID" | "TRUE" |