I have an MBTiles file that contains vectors. I'm attempting to upload it to a remote GeoServer, but running into issues. The file will upload to the geoserver but with errors and I cannot create a layer from the coverage store. I've been able to upload it manually and that works. I've tampered with the code below several times with no luck. What am I missing here?

store_url = f"{geoserver_url}/workspaces/{workspace}/coveragestores"
payload = {
    "coverageStore": {
        "name": store_name,
        "workspace": workspace,
        "type": "MBTiles with vector tiles",
        "url": f"file:{mbtiles_fp}"  # Update with your directory path

# Set up the URL for creating a layer
layer_url = f"{geoserver_url}/workspaces/{workspace}/coveragestores/{store_name}/coverages"

auth = HTTPBasicAuth(username, password)
auth_response = requests.get(geoserver_url, auth=auth)

if auth_response.status_code == 200:
    print("Authentication successful!")

    # Create the GeoTIFF store
    store_response = requests.post(store_url, auth=auth, json=payload)
  • What are the errors?
    – Ian Turton
    Commented Jul 11 at 9:30
  • "Could not list layers for this store, an error occurred retrieving them: Could not find the raster plugin for format MBTiles with vector tiles" I think it has something to do with "type":"MBTiles with vector tiles" in the payload in the code. However if I change it to just MBTiles, it tries uploading it as a raster MBTiles
    – JWB
    Commented Jul 11 at 14:25


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.