Mbtiles to underlying dataset - mapbox

I have a .mbtiles and would like to convert it back to a dataset so I can edit it.
I don't see a convert/export button for this function on mapbox studio or maptiler.
Any help would be great thanks.

You could try using a tool like https://github.com/mapbox/mbtiles-extracts .
In general it's a problematic, lossy process, and you're better off trying to get the original source data from somewhere else.

Related

Multiple gpx layers in Mapbox Studio style editor

If I upload a gpx trace to
convert it into a tileset, I can use it in the Style editor just as expected. But if I upload a second and want to use it as a data source for another or even the same layer, It is greyed out with the following notice:
This source includes vector layer names that are already in your composite source. vector layer names must be unique.
I didn't set any name myself or changed the gpx traces in a weird way. I even renamed the style layer. I looked into the details of the automatically created tileset but I couldn't see a name which was the same on both sources. The only thing that both gpx traces had was the "tracks" part of the source, which contained the actual trace.
But I can't figure out how to change this name.
Is there some way to upload two gpx traces and use them in the same style?
I want to avoid workarounds if possible but if it doesn't work another way, I imagine that there are at least two workarounds:
1. Convert into a geojson file, upload as a dataset and convert into a tileset.
2. Somehow append multiple gpx files into one, but keep the traces separate.
What would be the downsides, apart from having more files to keep up2date? Is (2) even possible?
Update:
In the end I did convert the gpx files into geojson tracks. THis did work exactly as hoped. But I'm still interested if there's a shorter way or if I just did something wrong previously.
Disclaimer: I work at Mapbox.
It isn't possible to upload multiple GPX files directly to the same map style in Mapbox because their layer names are automatically set as track. To fix this, I recommend following these steps:
Convert your data to GeoJSON using a tool like toGeojson
Upload the GeoJSON to Mapbox Studio
Add the data to your map in Studio or GL JS
So to answer your question: you are going about this the correct way. One thing to note: you don't have to upload it as a dataset first. You can upload your GeoJSON as a tileset directly, unless you have some editing you want to do first.

How to expand a traineddata file in Tesseract?

I want to add a new font to my language trained data file. I can build a new trained data file, and it works fine but is there any way that I could expand the old trained data file with the new one?
I have seen here someone seems to do it... I am not able to check it since I am on Windows...
https://github.com/CavemanNinja/shell_scripts/blob/master/traintess.sh

How to compact mbtiles with mbutil

I'm creating maptiles with arc2earth and ArcGIS and it creates a lot of duplicate tiles.
I would like to reduce its size using mbtiles. I think it is possible to "compact" tiles, but I don't find the way.
Do you know if mbtiles still have compact command or it is just been deprecated?
Thanks!
At the moment mbutil doesn't expose this as an option - TileMill is the only client that supports properly compressed tiles. Of course, mbutil is an open source project, so if you're game, you can built it and add it.

modify a template PDF using iTextSharp server side

So I'm brand spanking new to iTextSharp and I know I have quite a bit of reading ahead of me but in an attempt to shave a bunch of time off a relatively trivial task I thought I reach out the stack brain-trust.
I have a very simple goal: Starting with a template pdf, I need to create new pdf with a few of the characters changed. We're talking single characters on each page. I don't need a detailed answer complete with code (although that'd be awesome) so much as a general list of tools and api's I'm going to need.
The data I need will already be in a db which I could output to xml files if need be.
So far it looks like my template will need the "editable" characters tagged somehow (not sure how to do that yet) and using PDFStamper I can modify the copy. Is that the right path or is there a better way?
Thanks for any insight.

Using Perl to Display GPX File on Google Map

I have a bunch of GPX files on our server and would like to overlay them on top of a Google Map to display them on our website. We use Perl for all our site scripts however we're having a hard time figuring out how to format the data correctly to display it in Google Maps.
I'm hoping that some GPX expert out there can explain at a high level how we can best accomplish this and provide some sample perl code to correctly process the GPX file and print out the necessary HTML to display it on a Google Map.
Thanks in advance for your help!!!
The tool you really want to use is GPSBabel. If you want a somewhat perlish interface to it, rather than just driving it from the commandline, there's also a GPS::Babel module.