Question

Has anyone been able to automate the upload of data to Mapbox? I would really like help with this process if you have successfully completed this. Thanks in advance

  • 18 March 2021
  • 6 replies
  • 23 views

Has anyone been able to automate the upload of data to Mapbox? I would really like help with this process if you have successfully completed this. Thanks in advance

6 replies

Userlevel 1
Badge +10

Hi @liboc​. Hoping to get more information on your question.

 

Would you mind sharing what you have tried so far and what, if any, challenges/errors you are experiencing?

 

What are you trying to upload/write to MapBox? Are you trying to write MBTiles Rasters, MBTiles Vector Tiles, MapBox Vector Tiles, or MapBox Vector Tile Tileset?

 

Alternatively, do you have a workspace created and want to automate it on a schedule, for example, with FME Server?

@liboc​  I am wondering if you have made any progress on this, and if so, would you be willing to share your experiences. I am very new to Mapbox and am trying to figure out how to publish tilesets to our Mapbox account. I can figure out how to make the geojson files, but I can't figure out how to actually publish. Thanks in advance for any info.

Userlevel 2
Badge +10

@liboc​  I am wondering if you have made any progress on this, and if so, would you be willing to share your experiences. I am very new to Mapbox and am trying to figure out how to publish tilesets to our Mapbox account. I can figure out how to make the geojson files, but I can't figure out how to actually publish. Thanks in advance for any info.

Hi @Tara Preston​ I believe you can go to https://studio.mapbox.com/tilesets/ (make sure you are logged in already) and click New Tileset to upload your GeoJSON files.

Hi @Tara Preston​ I believe you can go to https://studio.mapbox.com/tilesets/ (make sure you are logged in already) and click New Tileset to upload your GeoJSON files.

Thanks for responding @danminneyatsaf​ . I appreciate it. I'm actually trying to automate that portion of the process as well. Similar to using the Mapbox Tilesets CLI. I am now thinking the best option will be to use a SystemCaller transformer to run the CLI tools. My current sticking point is how I use the Mapbox Tilesets writer to export to a format (and folder structure) that can easily be used by our recipes and the CLI tools (this writer export to .mvt and not GeoJson). Again, I apologize if I'm not making any sense. I'm very new to Mapbox and I'm still trying to figure out the required architecture and necessary processes. You wouldn't happen to know if there are any Mapbox & FME tutorials or example workspaces for different processes? I have looked all over the Knowledge Base, but I'm not finding anything this generic. Thanks again!

Userlevel 2
Badge +10

Hi @Tara Preston​ I believe you can go to https://studio.mapbox.com/tilesets/ (make sure you are logged in already) and click New Tileset to upload your GeoJSON files.

@Tara Preston​ hah, I had a feeling my response was a bit simplified!

In that case you could perhaps follow along with this documentation here that outlines how to upload to Mapbox with their Uploads API. If you are looking to integrate this with FME, it could look something like this:

  1. Use an HTTPCaller to retrieve the temporary credentials
  2. Write the GeoJSON out with a FeatureWriter and then connect this to a SystemCaller
  3. Use the SystemCaller to Stage the file on Amazon S3 (as per the instructions in the Mapbox tutorial)
  4. Use the HTTPCaller to call the cURL command (which to me looks like a simple POST call to upload the file)

I found a great Community Question that explains how to call the cURL command in an HTTPCaller here.

 

I may have a go at this myself sometime and see if I can get it working, but for now these are just some concepts I'm throwing out there. Hope this helps generate some ideas!

Hi @Tara Preston​ I believe you can go to https://studio.mapbox.com/tilesets/ (make sure you are logged in already) and click New Tileset to upload your GeoJSON files.

Thank you @danminneyatsaf​ . I will play with this and will update the feed if I find out that any of this does or doesn't work. I appreciate the guidance!

Reply