Supported file format

Details

Slippy maps

url/zoom-level/x-coordinate/y-coordinate.png

GeoTIFF

Standard or Cloud-optimized

NITF

NITF 2.0 or 2.1 format

❗️

IAM Delegated Access not supported with slippy maps

IAM Delegated Access is not supported with slippy maps due to the nature of how slippy maps work. We strongly encourage you to use cloud-optimized GeoTIFFs instead of slippy maps.

To use IAM Delegated Access with geospatial/tiled imagery, please use NITF, GeoTIFF, or COG files.

Slippy map specifications

When importing slippy map data, make sure your import file contains this information and follows this format.

Parameter

Required

Description

tileLayerUrl

Yes

URL where map data is hosted. Must be in the following format: https://c.tile.openstreetmap.org/{z}/{x}/{y}.png

Slippy map tiles in JPG or PNG

minZoom

Yes

Minimum map zoom level down to which this layer will be displayed (inclusive).

maxZoom

Yes

Maximum map zoom level up to which this layer will be displayed (inclusive).

maxNativeZoom

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.

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.

epsg

Yes

Structured dataset of coordinate reference systems and coordinate transformations. Can be EPSG3857, EPSG3395, EPSG4326, or Simple.

tileSize

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.

alternativeLayers

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.

version

No

Add version to your import to distinguish it from the legacy format. If version: 2 is present, Labelbox will perform the transform from bounds: [lng, lat] to bounds: [lat,lng] in the tile component and in the bounds restriction helper function for annotations. If version is absent, tiles will be imported in legacy format and you will not be able to load image tiles into the new Editor.

attachments

No

Attachments

[
    {
        "tileLayerUrl": "https://s3-us-west-1.amazonaws.com/lb-tiler-layers/mexico_city/{z}/{x}/{y}.png",
        "bounds": [
            [
                19.405662413477728,
                -99.21052827588443
            ],
            [
                19.400498983095076,
                -99.20534818927473
            ]
        ],
        "minZoom": 12,
        "maxZoom": 20,
        "epsg": "EPSG4326",
        "alternativeLayers": [
            {
                "tileLayerUrl": "https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw",
                "name": "Satellite"
            },
            {
                "tileLayerUrl": "https://api.mapbox.com/styles/v1/mapbox/navigation-guidance-night-v4/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw",
                "name": "Guidance"
            }
        ]
    },
    {
        "tileLayerUrl": "https://s3-us-west-1.amazonaws.com/lb-tiler-layers/mexico_city/{z}/{x}/{y}.png",
        "bounds": [
            [
                19.400498983095076,
                -99.21052827588443
            ],
            [
                19.39533555271248,
                -99.20534818927473
            ]
        ],
        "minZoom": 12,
        "maxZoom": 20,
        "epsg": "EPSG4326",
        "alternativeLayers": [
            {
                "tileLayerUrl": "https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw",
                "name": "Satellite"
            },
            {
                "tileLayerUrl": "https://api.mapbox.com/styles/v1/mapbox/navigation-guidance-night-v4/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw",
                "name": "Guidance"
            }
        ]
    }
]
[
     {
         "tileLayerUrl": "https://labelbox.s3-us-west-2.amazonaws.com/tiler/drone-map/rgb/{z}/{x}/{y}.png",
         "bounds": [
             [17.983835501492813,74.41417694091798],
             [17.996825561127697, 74.44644927978517]
         ],
         "minZoom": 8,
         "maxZoom": 22,
         "maxNativeZoom": 22,
         "epsg": "EPSG3857",
         "version": 2,
         "alternativeLayers": [
             {
                 "tileLayerUrl": "https://labelbox.s3-us-west-2.amazonaws.com/tiler/drone-map/ndvi/{z}/{x}/{y}.png",
                 "name": "NDVI"
             },
             {
                 "tileLayerUrl": "https://labelbox.s3-us-west-2.amazonaws.com/tiler/drone-map/dtm/{z}/{x}/{y}.png",
                 "name": "DTM"
             }
         ]
     }
]
[
    {
        "tileLayerUrl": "https://public-tiles.dronedeploy.com/1499994155_DANIELOPENPIPELINE_ortho_qfs/{z}/{x}/{y}.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9wdWJsaWMtdGlsZXMuZHJvbmVkZXBsb3kuY29tLzE0OTk5OTQxNTVfREFOSUVMT1BFTlBJUEVMSU5FX29ydGhvX3Fmcy8qIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoyMTQ1OTE0MTE4fX19XX0_&Signature=O~50rrGXdEC6Hi8jPJ3dbT~UtBd7Cw6iQPTxdJ8LU2IaoxeP22R3JpKPkLN3T3~Lcw3CyX7uft2Baj0MH93qUoCYyN~~jNX3OMkYV2jbrHDezf6zQRHAabXX-L2bL-JEGfFL6z3DWccOFeCH56CuhgC29k5CJx7I34P-LQJdnAUsA-KaqKH1IyYsHStRIfmMzdXNAWU58FTfqVljq9SbKXxfgdr2SZ~7VgLaZ8IhA0WnlKUo-JgqTd~jYa5mGCpR8351IMK0aMuY4Mld4SOXssQ-rOtlZtypvo8FDp474TlGIEGz5PHxGOPsqLPF19hEYTgoPqsUj8QEuiTfg-cmsg__&Key-Pair-Id=APKAJXGC45PGQXCMCXSA",
        "bounds": [
            [
                37.87488726890353,
                -122.32488870620728
            ],
            [
                37.87280390440759,
                -122.32154130935669
            ]
        ],
        "minZoom": 10,
        "maxZoom": 23,
        "epsg": "EPSG4326",
        "version": 2
    },
    {
        "tileLayerUrl": "https://public-tiles.dronedeploy.com/1499994155_DANIELOPENPIPELINE_ortho_qfs/{z}/{x}/{y}.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9wdWJsaWMtdGlsZXMuZHJvbmVkZXBsb3kuY29tLzE0OTk5OTQxNTVfREFOSUVMT1BFTlBJUEVMSU5FX29ydGhvX3Fmcy8qIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoyMTQ1OTE0MTE4fX19XX0_&Signature=O~50rrGXdEC6Hi8jPJ3dbT~UtBd7Cw6iQPTxdJ8LU2IaoxeP22R3JpKPkLN3T3~Lcw3CyX7uft2Baj0MH93qUoCYyN~~jNX3OMkYV2jbrHDezf6zQRHAabXX-L2bL-JEGfFL6z3DWccOFeCH56CuhgC29k5CJx7I34P-LQJdnAUsA-KaqKH1IyYsHStRIfmMzdXNAWU58FTfqVljq9SbKXxfgdr2SZ~7VgLaZ8IhA0WnlKUo-JgqTd~jYa5mGCpR8351IMK0aMuY4Mld4SOXssQ-rOtlZtypvo8FDp474TlGIEGz5PHxGOPsqLPF19hEYTgoPqsUj8QEuiTfg-cmsg__&Key-Pair-Id=APKAJXGC45PGQXCMCXSA",
        "bounds": [
            [
                37.8749042065848,
                -122.32149839401245
            ],
            [
                37.87278696624341,
                -122.31810808181763
            ]
        ],
        "minZoom": 10,
        "maxZoom": 23,
        "epsg": "EPSG4326",
        "version": 2
    },
    {
        "tileLayerUrl": "https://public-tiles.dronedeploy.com/1499994155_DANIELOPENPIPELINE_ortho_qfs/{z}/{x}/{y}.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9wdWJsaWMtdGlsZXMuZHJvbmVkZXBsb3kuY29tLzE0OTk5OTQxNTVfREFOSUVMT1BFTlBJUEVMSU5FX29ydGhvX3Fmcy8qIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoyMTQ1OTE0MTE4fX19XX0_&Signature=O~50rrGXdEC6Hi8jPJ3dbT~UtBd7Cw6iQPTxdJ8LU2IaoxeP22R3JpKPkLN3T3~Lcw3CyX7uft2Baj0MH93qUoCYyN~~jNX3OMkYV2jbrHDezf6zQRHAabXX-L2bL-JEGfFL6z3DWccOFeCH56CuhgC29k5CJx7I34P-LQJdnAUsA-KaqKH1IyYsHStRIfmMzdXNAWU58FTfqVljq9SbKXxfgdr2SZ~7VgLaZ8IhA0WnlKUo-JgqTd~jYa5mGCpR8351IMK0aMuY4Mld4SOXssQ-rOtlZtypvo8FDp474TlGIEGz5PHxGOPsqLPF19hEYTgoPqsUj8QEuiTfg-cmsg__&Key-Pair-Id=APKAJXGC45PGQXCMCXSA",
        "bounds": [
            [
                37.8749042065848,
                -122.31806516647339
            ],
            [
                37.87278696624341,
                -122.31529712677002
            ]
        ],
        "minZoom": 10,
        "maxZoom": 23,
        "epsg": "EPSG4326",
        "version": 2
    }
]

GeoTIFF (standard or cloud-optimized) and NITF specifications

When you upload a NITF file, Labelbox will convert it to a COG file and upload the asset. If it is already a COG file, Labelbox will skip the conversion and upload the asset natively. Since COG files can have many extension names, Labelbox will check the header of the file to verify that it is a COG file.

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

[
    {
        "tileLayerUrl": "https://storage.googleapis.com/labelbox-sample-datasets/Docs/base_rendered_cog.tif",
        "alternativeLayers": [
            {
                "tileLayerUrl": "https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw",
                "name": "Satellite"
            }
        ]
    }
]
[
    {
        "externalId": "https://a.com/tiles1.tif",
        "tileLayerUrl": "https://lb-test-data.s3.us-west-1.amazonaws.com/library001.tif"
    },
    {
        "externalId": "https://a.com/tiles2.tif",
        "tileLayerUrl": "https://lb-test-data.s3.us-west-1.amazonaws.com/library002.tif"
    }
]
[
    {
        "tileLayerUrl": "https://storage.googleapis.com/labelbox-sample-datasets/Docs/base_rendered_NITF.NTF",
        "alternativeLayers": [
            {
                "tileLayerUrl": "https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw",
                "name": "Satellite"
            }
        ]
    }
]
[
    {
        "externalId": "https://a.com/tiles1.ntf",
        "tileLayerUrl": "https://lb-test-data.s3.us-west-1.amazonaws.com/library001.ntf"
    },
    {
        "externalId": "https://a.com/tiles2.ntf",
        "tileLayerUrl": "https://lb-test-data.s3.us-west-1.amazonaws.com/library002.ntf"
    }
]

📘

For additional questions or special requests, please reach out to [email protected]

Verify files are processed

🚧

File processing can take up to 20 mins

Since GeoTIFF or NITF files can be very large, the conversion can sometimes take up to 20 minutes to perform a data upload.

You can verify whether a file conversion is complete by checking the Media Attributes section.

If the Mime type shows as application/x-tms-geo, the file was successfully processed.

If the Mime type still shows as application/json, the file pre-processing has not yet been completed.

Import geospatial data via the Python SDK

For geospatial and custom-defined Data Rows, you have to specify the Data Row in a JSON format. Here's an example with alternative layers, bounds, attachments (text, image, and google maps widget).

import labelbox 
import json

#Enter your API key
API_KEY = ""
client = labelbox.Client(api_key=API_KEY)

#create a new dataset
dataset = client.create_dataset(name="Geospatial import example")

#Create data row
payload = {"tileLayerUrl":"https://s3-us-east-2.amazonaws.com/<your_directory>/{z}/{x}/{y}.png","bounds":[[19.405662413477728,-99.21052827588443],[19.400498983095076,-99.20534818927473]],"minZoom":12,"maxZoom":20,"epsg":"EPSG4326","alternativeLayers":[{"tileLayerUrl":"https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw","name":"Satellite"},{"tileLayerUrl":"https://api.mapbox.com/styles/v1/mapbox/navigation-guidance-night-v4/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw","name":"Guidance"}]}
data_row = dataset.create_data_row(row_data=json.dumps(payload))

#Create attachments
data_row.create_attachment(attachment_type="TEXT", attachment_value="Mexico")
data_row.create_attachment(attachment_type="IMAGE", attachment_value="https://storage.googleapis.com/labelbox-sample-datasets/Docs/mexico_city.jpeg")
data_row.create_attachment(attachment_type="HTML", attachment_value="https://storage.googleapis.com/labelbox-sample-datasets/Docs/google_maps_mexico.html")