- To prepare the data for Mapbox's GeoJSON format, export the table tracks from Chapter 3, Working with Vector Data – The Basics using ogr2ogr with the following code:
ogr2ogr -f GeoJSON tracks.json \ "PG:host=localhost dbname=postgis_cookbook user=me" \ -sql "select * from chp03.tracks
- Remove the crs definition line on the new .json with your favorite editor:
- Go to your Mapbox account and upload in the Datasets menu the tracks.json file. After a successful upload, you will see the following message:
- Create the dataset ...