Note: Experimental tool. Expect the API to break as we make changes
A tool for generating search index for TerriaJS datasets.
Formats supported:
- Cesium 3D Tiles
- KML-glTFs
yarn install
yarn build
./bin/index-3d-tiles </path/to/tileset.json> </path/to/config.json> </path/to/output/directory>
Script parameters:
- Path to
tileset.json
file. - An index configuration file (See sample configuration).
- An output directory to write the index
This generates an index in the given output directory. Check the indexRoot.json
to see how the index is structured.
-
idProperty: string
- Required
- Name of the property to be used as the ID for indexing
-
indexes: Record<string, IndexConfig>
-
Required
-
An object with the property name as the key and an index configuration as its value. Only the properties specified in this object will be indexed.
To index the automatically computed feature heights, use a configuration like:
"indexes": {"height": {"type": "numeric"}}
-
The configuration for an individual properties index.
type: string
- Required
- The type of the index.
The KML files should be formatted as given below:
<Placemark>
<name>Independence Hall</name>
<Model>
<Link><href>123.gltf</href></Link>
<Location>
<longitude>152.78600626966184</longitude>
<latitude>-27.54602173027532</latitude>
<altitude>78.79797821225782</altitude>
</Location>
</Model>
<ExtendedData>
<Data name="Address">
<value>500-36 CHESTNUT ST</value>
</Data>
<Data name="Parcel_ID">
<value>313762</value>
</Data>
<Data name="Is_City_Owned">
<value>True</value>
</Data>
</ExtendedData>
</Placemark>
./bin/index-kml-gltf </path/to/kml-gltfs> </path/to/config.json> </path/to/output/directory>
The index configuration format is similar to configuration in the 3d-tiles example.