How to import geospatial data and sample import formats.
url/zoom-level/x-coordinate/y-coordinate.png
https
URLs only)Parameter | Required | Description |
---|---|---|
row_data | Yes | A dictionary of{ "tile_layer_url": str, "min_zoom": int, "max_zoom": int, "bounds": \[[float, float],[float, ffloat]], "epsg": "EPSG3857" ... } For IAM Delegated Access, this URL must be in virtual-hosted-style format. |
row_data['version'] | No | Add version to your import to distinguish it from the legacy format. If version: 2 is present, Labelbox will read all coordinates as [long, lat] or [x, y] depending on the data format. If version: 1 is present, Labelbox will read all coordinates as [lat, long] or [y, x] depending on the data format. If no version is provided, the default value for Slippy map files using an espg coordinate system and COG files is version: 1 and the default value for cartesian and simple coordinate system is version: 2 |
row_data['tile_layer_url'] | Yes | URL where map data is hosted. Must be in the following format: <https://URL/{z}/{x}/{y}.png > Slippy map tiles in JPG or PNG. |
row_data['min_zoom'] | No | Minimum map zoom level down to which this layer will be displayed (inclusive). If not provided, users will potentially be able to zoom beyond where tiles are available. |
row_data['max_zoom'] | No | Maximum map zoom level up to which this layer will be displayed (inclusive). If not provided, users will potentially be able to zoom beyond where tiles are available. |
row_data['max_native_zoom'] | No | Maximum zoom number the tile source has available (maxNativeZoom & maxZoom ). If specified, the tiles on all zoom levels higher than maxNativeZoom will be auto-scaled. |
row_data['bounds'] | Yes | The bounds where the projection is valid. For the Simple coordinate system, bounds are in x,y. For the EPSG coordinate system, bounds are in lat,long. |
row_data['epsg'] | Yes | Structured dataset of coordinate reference systems and coordinate transformations. Can be EPSG3857 , EPSG3395 , EPSG4326 , Simple , or Cartesian . If using Cartesian , you must pass in the parameters for the pixel dimensions in the dimensions field. |
row_data['tile_size'] | No | Specifies the size of the individual slippy map tiles. Common sizes are 256, 512, 1024. Note: Currently, only square tiles are supported which is why tileSize is a single number that indicates the width and height of the tile. |
row_data['alternative_layers'] | No | Additional tile layers. Only alternativeLayers.tileLayerUrl and alternativeLayers.name are required. If no values for optional parameters are given, those values will default to the top-level keys. |
row_data['dimensions'] | No | This is required if using the Cartesian coordinate system. This represents the pixel height and width of the entire image. The format is: "dimensions": { "width": <Pixel width>, "height": <Pixel height> } |
global_key | No | Unique user-generated file name or ID for the file. Global keys are enforced to be unique in your org. Data rows will not be imported if its global keys are duplicated to existing data rows. |
media_type | No | "TMS_GEO" (optional media type to provide better validation and error messaging) |
metadata_fields | No | See Metadata. |
attachments | No | See Attachments and Asset overlays. |
Parameter | Required | Description |
---|---|---|
row_data | Yes | A dictionary of{ "tile_layer_url": str, "is_deep_zoom": bool, "min_zoom": int, "max_zoom": int, "bounds": [[float, float],[float, float]], "epsg": "EPSG3857" ... } For IAM Delegated Access, this URL must be in virtual-hosted-style format. |
row_data['version'] | No | Add version to your import to distinguish it from the legacy format. If version: 2 is present, Labelbox will read all coordinates as [long, lat] or [x, y] depending on the data format. If version: 1 is present, Labelbox will read all coordinates as [lat, long] or [y, x] depending on the data format. If no version is provided, the default value for DeepZoom files is version: 2 |
row_data['tile_layer_url'] | Yes | For DeepZoom servers, the URL should be the API to return the tile with parameters for {x}, {y}, and {z}. If using a Deep Zoom server, you must set up your coordinate system as ‘Cartesian’ |
row_data['is_deep_zoom'] | No | This must be set to “true” if using a Deep Zoom server |
row_data['min_zoom'] | No | Minimum map zoom level down to which this layer will be displayed (inclusive). If not populated, we will default to 0. |
row_data['max_zoom'] | No | Maximum map zoom level up to which this layer will be displayed (inclusive). If not populated, we will calculate this from your data. |
row_data['max_native_zoom'] | No | Maximum zoom number the tile source has available (maxNativeZoom & maxZoom ). If specified, the tiles on all zoom levels higher than maxNativeZoom will be auto-scaled. |
row_data['bounds'] | Yes | The bounds where the projection is valid. For the Simple coordinate system, bounds are in x,y. For the EPSG coordinate system, bounds are in lat,long. To annotate the entire asset, the bounds should match up with your values in dimensions |
row_data['epsg'] | Yes | This should be set to Cartesian for Deep Zoom use cases. |
row_data['alternative_layers'] | No | Additional tile layers. Only alternativeLayers.tileLayerUrl and alternativeLayers.name are required. If no values for optional parameters are given, those values will default to the top-level keys. |
row_data['dimensions'] | No | This is required if using the Cartesian coordinate system. This represents the pixel height and width of the entire image. The format is: "dimensions": { "width": <Pixel width>, "height": <Pixel height> } |
global_key | No | Unique user-generated file name or ID for the file. Global keys are enforced to be unique in your org. Data rows will not be imported if its global keys are duplicated to existing data rows. |
media_type | No | "TMS_GEO" (optional media type to provide better validation and error messaging) |
metadata_fields | No | See Metadata. |
attachments | No | See Attachments and Asset overlays. |
Item | Supported Options | Comments |
---|---|---|
Coordinate Systems | EPSG3857 , EPSG3395 , or EPSG4326 | If your COG files are not one of these supported coordinates systems, it must be converted prior to upload into Labelbox. We require that the the files are geo-referenced in order to render on our map |
Coordinate System Type | Projected CRS | Our editor only supports a Projected CRS (coordinate reference system). If you are using a geographic coordinate reference system, please convert it. |
Bands | We support up to 4 bands: - Red - Green - Blue - Alpha Internal color-interpretation must be set on NITF files. | If your COG files have a band outside of these four support bands, the tiles will not be able to render in our editor. The alpha band must also be an “explicit alpha” meaning that the fourth band must be grouped under the alpha band and not in the “unknown” band |
Alternative layers | Additional GeoTIFF/NITF layer, specified as a URL/path to the file. | |
NITF Version | If you are using NITF files, they must be in NITF 2.0 or 2.1 format. | |
File Size | up to 1 GB recommended | If you require larger files - please convert the files to cloud-optimized GeoTIFF and upload |
application/x-tms-geo
, the file was successfully processed.
application/json
, the file pre-processing has not yet been completed.