---
title: GisApi
summary: CLASS in nl.bimbase.bimworks.client.apis.
order: 10
languages: [java]
sdk-package: Java · nl.bimbase.bimworks.client.apis
---

# GisApi

[[page:reference/java/api|API catalogue]] · `nl.bimbase.bimworks.client.apis` · CLASS

````java sdk=java sdk-namespace="nl.bimbase.bimworks.client.apis"
public class GisApi
````

GIS related API calls

## Inheritance and interfaces

- [[page:reference/java/nl-bimbase-bimworks-client-apis/subapi-e2929b7e|SubApi]]

## Members

| Member | Kind | Description |
|---|---|---|
| [[page:reference/java/nl-bimbase-bimworks-client-apis/gisapi-0890af58#member-init-11f4ec7daa98|GisApi(BimWorksClient)]] | CONSTRUCTOR |  |
| [[page:reference/java/nl-bimbase-bimworks-client-apis/gisapi-0890af58#member-getgeoreference-64cfbf989107|getGeoReference(UUID)]] | METHOD | Get the stored GeoReference of a Version |
| [[page:reference/java/nl-bimbase-bimworks-client-apis/gisapi-0890af58#member-setgeoreference-7c874796363a|setGeoReference(UUID, GeoReference, Vector3d)]] | METHOD | Store a new GeoReference. This is stored in BIM.works as meta-data and does not modify the IFC model in any way; to write the georeference into the IFC data,… |
| [[page:reference/java/nl-bimbase-bimworks-client-apis/gisapi-0890af58#member-getmapconversion-9c448d4c1b87|getMapConversion(UUID)]] | METHOD | The georeference the Version carries in its IFC data, raw: the IfcMapConversion of its 3D model context and its IfcProjectedCRS ("map_conversion", null when … |
| [[page:reference/java/nl-bimbase-bimworks-client-apis/gisapi-0890af58#member-extractgeoreference-7e7126235258|extractGeoReference(UUID, String)]] | METHOD | Extract a GeoReference from the IFC model based on the given EPSG code. This API call does not modify anything in the BIM.works repository. Generally when th… |
| [[page:reference/java/nl-bimbase-bimworks-client-apis/gisapi-0890af58#member-downloadcitygml-851e349773c0|downloadCityGml(Set&lt;UUID&gt;, CityGmlFileType, CityGml2ExportSettings)]] | METHOD | Download a CityGML or CityJSON representation of a set of Versions |
| [[page:reference/java/nl-bimbase-bimworks-client-apis/gisapi-0890af58#member-generate3dtilesurl-61a0ac34c573|generate3DTilesUrl(ObjectNode)]] | METHOD | Generate a 3D Tiles URL. Warning The returned URL does not have any for of authentication, so be careful sharing this URL as it gives unlimited and irrevocab… |
| [[page:reference/java/nl-bimbase-bimworks-client-apis/gisapi-0890af58#member-listmodelsforgis-f159fe2a204c|listModelsForGis()]] | METHOD |  |

## `GisApi(BimWorksClient)` {#member-init-11f4ec7daa98}

````java sdk=java sdk-namespace="nl.bimbase.bimworks.client.apis"
public GisApi(nl.bimbase.bimworks.client.BimWorksClient bimWorksClient)
````



### Parameters

| Name | Type | Description |
|---|---|---|
| `bimWorksClient` | [[page:reference/java/nl-bimbase-bimworks-client/bimworksclient-a27e861c|BimWorksClient]] |  |

## `getGeoReference(UUID)` {#member-getgeoreference-64cfbf989107}

````java sdk=java sdk-namespace="nl.bimbase.bimworks.client.apis"
public nl.bimbase.bimworks.client.apis.GeoReferenceExtraction getGeoReference(java.util.UUID versionUuid) throws nl.bimbase.bimworks.client.BimWorksException
````

Get the stored GeoReference of a Version

### Parameters

| Name | Type | Description |
|---|---|---|
| `versionUuid` | `java.util.UUID` | The UUID of the Version |

### Returns

A GeoReference. GeoReferences in BIM.works are always stored in EPSG:4326 (also known as WGS84), so you'll always get back a GeoReference in that CRS.

### Exceptions

- `BimWorksException` — 

## `setGeoReference(UUID, GeoReference, Vector3d)` {#member-setgeoreference-7c874796363a}

````java sdk=java sdk-namespace="nl.bimbase.bimworks.client.apis"
public void setGeoReference(java.util.UUID versionUuid, nl.bimbase.bimworks.common.api.geometry.GeoReference geoReference, nl.bimbase.bimworks.common.geometry.types.Vector3d anchorPoint) throws nl.bimbase.bimworks.client.BimWorksException
````

Store a new GeoReference. This is stored in BIM.works as meta-data and does not modify the IFC model in any way;
to write the georeference into the IFC data, commit a GEOREFERENCE transaction (see [[page:reference/java/nl-bimbase-bimworks-client-apis/gisapi-0890af58#member-getmapconversion-9c448d4c1b87|#getMapConversion(UUID)]]).

### Parameters

| Name | Type | Description |
|---|---|---|
| `versionUuid` | `java.util.UUID` | The UUID of the Version |
| `geoReference` | `nl.bimbase.bimworks.common.api.geometry.GeoReference` | The new GeoReference |
| `anchorPoint` | `nl.bimbase.bimworks.common.geometry.types.Vector3d` |  |

### Exceptions

- `BimWorksException` — 

## `getMapConversion(UUID)` {#member-getmapconversion-9c448d4c1b87}

````java sdk=java sdk-namespace="nl.bimbase.bimworks.client.apis"
public com.fasterxml.jackson.databind.node.ObjectNode getMapConversion(java.util.UUID versionUuid) throws nl.bimbase.bimworks.client.BimWorksException
````

The georeference the Version carries in its IFC data, raw: the IfcMapConversion of its 3D model
context and its IfcProjectedCRS ("map_conversion", null when there is none), whether it can be written
with the BUL statement GEOREFERENCE ("supported", "reason"), and the WGS 84 value an upload of that file
stores ("map_conversion.geo_reference"). Change it with a transaction, for example
`GEOREFERENCE CRS "EPSG:28992" ORIGIN (160071.588 m, 384156.389 m, 18.753 m) ROTATION 309.64`.

### Parameters

| Name | Type | Description |
|---|---|---|
| `versionUuid` | `java.util.UUID` | The UUID of the Version |

### Returns

The JSON of GetMapConversion

### Exceptions

- `BimWorksException` — 

## `extractGeoReference(UUID, String)` {#member-extractgeoreference-7e7126235258}

````java sdk=java sdk-namespace="nl.bimbase.bimworks.client.apis"
public nl.bimbase.bimworks.client.apis.GeoReferenceExtraction extractGeoReference(java.util.UUID versionUuid, java.lang.String epsgCode) throws nl.bimbase.bimworks.client.BimWorksException
````

Extract a GeoReference from the IFC model based on the given EPSG code. This API call does not modify anything in the BIM.works repository.
Generally when the results of this calls are satisfying to the caller, the results are passed on to 
the [[page:reference/java/nl-bimbase-bimworks-client-apis/gisapi-0890af58#member-setgeoreference-7c874796363a|GisApi#setGeoReference(UUID, GeoReference, Vector3d)]] call, but that is not required

### Parameters

| Name | Type | Description |
|---|---|---|
| `versionUuid` | `java.util.UUID` | The UUID of the Version |
| `epsgCode` | `java.lang.String` | The epsgCode, must be in the following format: "EPSG:1234" |

### Returns

The GeoReference is one could successfully be extracted

### Exceptions

- `BimWorksException` — 

## `downloadCityGml(Set<UUID>, CityGmlFileType, CityGml2ExportSettings)` {#member-downloadcitygml-851e349773c0}

````java sdk=java sdk-namespace="nl.bimbase.bimworks.client.apis"
public java.io.InputStream downloadCityGml(java.util.Set<java.util.UUID> versionUuids, nl.bimbase.bimworks.CityGmlFileType cityGmlType, nl.bimbase.bimworks.CityGml2ExportSettings exportSettings) throws nl.bimbase.bimworks.client.BimWorksException
````

Download a CityGML or CityJSON representation of a set of Versions

### Parameters

| Name | Type | Description |
|---|---|---|
| `versionUuids` | `java.util.Set<java.util.UUID>` | The UUIDS of the versions |
| `cityGmlType` | `nl.bimbase.bimworks.CityGmlFileType` | The type. Currently only CITY_GML_2_0 and CITY_JSON_1_0_0 are implemented |
| `exportSettings` | `nl.bimbase.bimworks.CityGml2ExportSettings` | Additional settings |

### Returns

An InputStream, responsibility for closing the stream is on the caller

### Exceptions

- `BimWorksException` — 

## `generate3DTilesUrl(ObjectNode)` {#member-generate3dtilesurl-61a0ac34c573}

````java sdk=java sdk-namespace="nl.bimbase.bimworks.client.apis"
public java.lang.String generate3DTilesUrl(com.fasterxml.jackson.databind.node.ObjectNode input) throws nl.bimbase.bimworks.client.BimWorksException
````

Generate a 3D Tiles URL.

<b>Warning</b> The returned URL does not have any for of authentication, so be careful sharing this URL as it gives 
unlimited and irrevocable access to the models below the given Node

### Parameters

| Name | Type | Description |
|---|---|---|
| `input` | `com.fasterxml.jackson.databind.node.ObjectNode` |  |

### Returns

A URL

### Exceptions

- `BimWorksException` — 

## `listModelsForGis()` {#member-listmodelsforgis-f159fe2a204c}

````java sdk=java sdk-namespace="nl.bimbase.bimworks.client.apis"
public com.fasterxml.jackson.databind.node.ArrayNode listModelsForGis() throws nl.bimbase.bimworks.client.BimWorksException
````



### Exceptions

- `BimWorksException` — 

## Inherited members

- `java.lang.Object#equals(java.lang.Object)`
- `java.lang.Object#toString()`
- `java.lang.Object#wait(long)`
- `java.lang.Object#wait(long,int)`
- `java.lang.Object#wait()`
- `java.lang.Object#finalize()`
- `java.lang.Object#getClass()`
- `java.lang.Object#hashCode()`
- `java.lang.Object#clone()`
- `java.lang.Object#notify()`
- `java.lang.Object#notifyAll()`
- [[page:reference/java/nl-bimbase-bimworks-client-apis/subapi-e2929b7e#member-getbimworksclient-a7cb880c7470|getBimWorksClient()]]
