How do I get the appropriate file format from Open Map Tiles? - openmaptiles

I have downloaded multiple areas from OpenMapTiles for a project. Sometimes the file contains the extent or location with the date in the .mbtiles format. Other times I get a file name like 1_EOzgCOZOqPAcEFBcsVJbgd-bvHyz5Dw with no specified file format and it appears unreadable.
The only support for this site appears to be here. How can I get the appropriate .mbtiles format for all of my downloads?

Related

How can I compose several xml-vtk files (vtu, vti) into one to get an animation?

I have a simulation which produces a bunch of vtu (also pvtu) and vti (also pvti) files which, as I understand, represent the configuration of points in one timestamp. But is there a way to group them into one close-to-vtk file to be able to visualize a simulation, which consists of many timestamps, in an app like paraview (but not only)?
ParaView can natively open many files as a time series, see the doc.
If your file names contains a number, the ParaView "open file" dialog will collapse them under a dummy filename containing dots instead of number. Open it to open the whole series.
edit: conversion
To be close to the vtk format, you may use .pvd that is a ParaView format described here or the .series from VTK (doc here )
To read it with another software, well, you will need to check the supported file formats by the application you want to use. VTK can write several other formats, including Exodus, XDMF or CGNS for instance.

converting text file to gps track file

Note:Question is edited according to suggestion
I want to geotag my images
im1.jpg
im2.jpg
Content of Images
I tried the solution with csv but getting this error
I have a csv file adata.csv
SourceFile,DateTimeOriginal,GPSLatitude,GPSLongitude,GPSLatitudeRef,GPSLongitudeRef
im1.jpg,1635.387709,52.23829321,10.54680910,52.23829321,10.54680910
im2.jpg,1645.892446,52.23828047,10.54680857,52.23828047,10.54680857
C:\EXIF>exiftool -csv=adata.csv Images
Error:
C:\EXIF>exiftool -csv=adata.csv Images
No SourceFile 'Images/im1.jpg' in imported CSV database
(full path: 'c:/exif/images/im1.jpg')
No SourceFile 'Images/im2.jpg' in imported CSV database
(full path: 'c:/exif/images/im2.jpg')
1 directories scanned
0 image files read
I don't know much about the gpx format but your example doesn't include timestamps, which are required for exiftool to be able to sync between images and the track. Another thing to watch for is the fact that the gpx timestamps are supposed to be in UTC, which may require some work to sync properly, especially if the timestamps in your text file are local time.
Instead, I'd suggest converting your TXT file to a CSV file and using the -csv option. Some simple changes would be required. The first column would need to be changed to filenames, which it looks like would only require adding .jpg to each number in the first column. The column header for the first column would need to be changed to SourceFile. The Time column could be removed, unless you need to add the timestamps to the image files, in which case I'd suggest changing the column header to DateTimeOriginal. The Latitude and Longitude column headers need to be changed to GPSLatitude and GPSLongitude. Finally, because GPS metadata is unsigned, you will need to set the reference tags. Duplicate the GPSLatitude and GPSLongitude columns and change the headers to GPSLatitudeRef and GPSLongitudeRef. This all should be relatively easy in a spreadsheet program such as Excel or LibreOffice.
At that point your new CSV file should look like this:
SourceFile,DateTimeOriginal,GPSLatitude,GPSLongitude,GPSLatitudeRef,GPSLongitudeRef
1.jpg,13:22:05,45.9874167,-76.875233,45.9874167,-76.875233
You could then run this command to fill the gps data
exiftool -csv=data.csv c:\Images

load unix executable file to ascii

I am simply trying to load ascii files with two columns of data (spectral data).
They were saved originally as .asc.
I need to open and edit them using text editor before I can load them into Matlab to erase the headers, but some of them somehow got converted to unix executable foramt with the .asc extension. And others are plain text docs also with the same extension. I have no idea why they got saved with the same extension and with my same manipulation as different kind formats.
When I use the load command in Matlab, the plain text docs load normally as expected but the ones saved as unix executable kinds give me this error:
Error using load Unable to read file filename.asc: No such file or
directory.
How can I either resave them (still with the same extension) or otherwise load them to be read by Matlab as standard two column data matrixes?
Thanks!
If these are truly plain text files, try renaming the file from xxx.asc to xxx.txt. Then, see if you are able to edit them as desired.

Extracting file names from an online data server in Matlab

I am trying to write a script that will allow me to download numerous (1000s) of data files from a data server (e.g, http://hydro1.sci.gsfc.nasa.gov/thredds/catalog/GLDAS_NOAH10SUBP_3H/2011/345/). Unfortunately, the names of the files in each directory are not formatted in a similar way (the time that they were created were appended to the end of the file name). I need to be able to specify the file name to subset the data (I have a special tool for these data types) and download it. I cannot find a function in matlab that will extract the file names.
I have looked at URLREAD, but it downloads everything including html code.
Thanks for your help!
You can easily parse the link.
x=urlread(url)
links=regexp(x,'<a href=''([^>]+)''>','tokens')
Reads every link, you have to filter all unwanted links.
For example this gets all grb files:
a=regexp(x,'<a href=''([^>]+.grb)''>','tokens')

iPhone - reading .epub files

I am engaged in preparing an application regarding reading the .epub files in iPhone. Where can I get the reference for sample applications for unzipping and parsing the files? Can anyone guide me with a best link? Thank you in advance.
An .epub file is just a .zip file. It contains a few directory files in XML format and the actual book content is usually XHTML. You can use Objective-Zip to unzip the .epub file and then use NSXMLParser to parse the XML files.
More info: Epub Format Construction Guide
On top of Ole's answer (that's a pretty good how-to guide), it's definitely worth reading the specification for the Open Container Format (OCF) - sorry it's a word file. It's the formal specification for the for zip structure used.
In brief you parse the file by
Checking it's plausibly valid by looking for the text 'mimetype' starting at byte 30 and the text 'application/epub+zip' starting at byte 38.
Extracting the file META-INF/container.xml from the zip
Parsing that file and extracting the value of the full-path attribute of the first rootfile element in it.
Load the referenced file (the full-path attribute is a URL relative to the root of zip file)
Parse that file. It contains all the metadata required to reference all the other content (mostly XHTML/CSS/images). Particularly you want to read the contents of the spine element which will list all content files in reading order.
If you want to do it right, you should probably also handle DTBook content as well.
If you want to do this right, you need to read and understand the Open Packaging Format (OPF) and Open Publication Structure (OPS) specifications as well.