Giter Club home page Giter Club logo

meta2tile's Issues

Noduplicate option doesn't work

The --noduplicate option would be very useful to reduce big mbtiles but when I add it to the command, I get the following error:

Cannot create map index: index map_index already exists

This error also happens when the mbtiles is already created, but even if I delete the mbtiles before executing I get it.

The full command is: ./meta2tile --noduplicate --mbtiles /var/lib/mod_tile/default ./foo.mbtiles

Please delete this post - by some reason got posted twice

I have compiled meta2tile.c and got it working to make a lot of single tiles from the meta tiles directory.
But I would like to make an mbtile file. Could someone provide some examples on what syntax to use when running meta2tile to produce mbtile (hopefully without having to change the c code)? After some trail and error - I found some text inside the meta2tile.c file that said one must define WITH_MBTILES
So then I created a copy of meta2tile.c - named meta2mbtile.c and added:
#define WITH_MBTILES
compiled and run it without luck.
then I changed
static int mbtiles = 0
to
static int mbtiles = 1
and now it created an mbtile file without any other input from command line than meta-tile-dir and target file name:
like this:
./meta2mbtile /var/lib/mod_tile/default /media/test/tissd/mbtiles/wz12.db

and then the file reported creating same number of tiles as when creating single tiles. So far so good....
But by some reason the numbering in tile_row column in the wz12.db file is wrong.
zoom_level is set correct to 12
tile_column is set correct from 0 to 4095
tile_row is from 1248 to 3943 - but should have been from 158 to 2847

Is there something else I have to change i the c file to make it work to get the tile_row value (and corresponding tile_data) correct, or even better - if there was some examples on how to use the original file with some parameters when running it from command line - to produce mbtile.

Cannot detect image type in meta file

I have a problem with meta2tile. I have a tile server and I pre-generated the tiles with render_list command. When I run the meta2tile program, I got error messages:
"cannot detect image type in meta file var/lib/mod_tile/default/660/0/0/50/128.meta" Why?
And converted only 1 file in zoom level 0. I generated this tile when I tested the server.

How do I make it work to make mbtile file?

I have compiled meta2tile.c and got it working to make a lot of single tiles from the meta tiles directory.
But I would like to make an mbtile file. Could someone provide some examples on what syntax to use when running meta2tile to produce mbtile (hopefully without having to change the c code)?

I tried to do this:
./meta2tile --mbtiles /var/lib/mod_tile/default /media/test/tissd/mbtiles/wz12.db
that gives this error:
cannot create directory /media/tore/tissd/mbtiles/wz12.db/12: No such file or directory

So even if I use --mbtiles as parameter meta2tile still want to create single meta tiles inside a directory that does not exist - because the last part in the last parameter (wz12.db) is the target filename for the mbtile file to be created (and not an existing directory).

After some trail and error - I found some text inside the meta2tile.c file that said one must define WITH_MBTILES
So then I created a copy of meta2tile.c - named meta2mbtile.c and added:
#define WITH_MBTILES
compiled and run it without luck.
then I changed
static int mbtiles = 0
to
static int mbtiles = 1
and now it created an mbtile file without any other input from command line than meta-tile-dir and target file name:
like this:
./meta2mbtile /var/lib/mod_tile/default /media/test/tissd/mbtiles/wz12.db

and then the file reported creating same number of tiles as when creating single tiles. So far so good....
But by some reason the numbering in tile_row column in the wz12.db file is wrong.
zoom_level is set correct to 12
tile_column is set correct from 0 to 4095
tile_row is from 1248 to 3943 - but should have been from 158 to 2847

Is there something else I have to change i the c file to make it work to get the tile_row value (and corresponding tile_data) correct, or even better - if there was some examples on how to use the original file with some parameters when running it from command line - to produce mbtile.

Seg fault

Was using metat2tile for a while, but I have now a segfault on a new server (Debian Stretch).


$ ./meta2tile --verbose --bbox -5,42,8,51.5 --mbtiles /home/admin/Planet/tools/meta2tile_links/ /var/tmp/france_pistes_only.mbt

Converting tiles from directory /home/admin/Planet/tools/meta2tile_links/ to mbtiles file /var/tmp/france_pistes_only.mbt

opened '/var/tmp/france_pistes_only.mbt' for mbtiles output

Segmentation fault

Here is Valgrind output

opened '/var/tmp/france_pistes_only.mbt' for mbtiles output
==32139== Conditional jump or move depends on uninitialised value(s)
==32139== at 0x4C31CAE: __memcmp_sse4_1 (vg_replace_strmem.c:1094)
==32139== by 0x10A99A: ispng (meta2tile.c:159)
==32139== by 0x10BAEA: expand_meta (meta2tile.c:522)
==32139== by 0x10CC47: descend (meta2tile.c:830)
==32139== by 0x10CC00: descend (meta2tile.c:824)
==32139== by 0x10CC00: descend (meta2tile.c:824)
==32139== by 0x10CC00: descend (meta2tile.c:824)
==32139== by 0x10CC00: descend (meta2tile.c:824)
==32139== by 0x10CC00: descend (meta2tile.c:824)
==32139== by 0x10D9D5: main (meta2tile.c:1174)
==32139==
==32139== Use of uninitialised value of size 8
==32139== at 0x4C31CF5: __memcmp_sse4_1 (vg_replace_strmem.c:1094)
==32139== by 0x10A99A: ispng (meta2tile.c:159)
==32139== by 0x10BAEA: expand_meta (meta2tile.c:522)
==32139== by 0x10CC47: descend (meta2tile.c:830)
==32139== by 0x10CC00: descend (meta2tile.c:824)
==32139== by 0x10CC00: descend (meta2tile.c:824)
==32139== by 0x10CC00: descend (meta2tile.c:824)
==32139== by 0x10CC00: descend (meta2tile.c:824)
==32139== by 0x10CC00: descend (meta2tile.c:824)
==32139== by 0x10D9D5: main (meta2tile.c:1174)
==32139==
==32139==
==32139== Process terminating with default action of signal 11 (SIGSEGV)
==32139== Bad permissions for mapped region at address 0x824B384
==32139== at 0x4C31CF5: __memcmp_sse4_1 (vg_replace_strmem.c:1094)
==32139== by 0x10A99A: ispng (meta2tile.c:159)
==32139== by 0x10BAEA: expand_meta (meta2tile.c:522)
==32139== by 0x10CC47: descend (meta2tile.c:830)
==32139== by 0x10CC00: descend (meta2tile.c:824)
==32139== by 0x10CC00: descend (meta2tile.c:824)
==32139== by 0x10CC00: descend (meta2tile.c:824)
==32139== by 0x10CC00: descend (meta2tile.c:824)
==32139== by 0x10CC00: descend (meta2tile.c:824)
==32139== by 0x10D9D5: main (meta2tile.c:1174)
==32139==
==32139== HEAP SUMMARY:
==32139== in use at exit: 1,048,890 bytes in 4,017 blocks
==32139== total heap usage: 5,472 allocs, 1,455 frees, 1,479,546 bytes allocated
==32139==
==32139== LEAK SUMMARY:
==32139== definitely lost: 64 bytes in 1 blocks
==32139== indirectly lost: 0 bytes in 0 blocks
==32139== possibly lost: 4,104 bytes in 1 blocks
==32139== still reachable: 1,044,722 bytes in 4,015 blocks
==32139== of which reachable via heuristic:
==32139== length64 : 463,488 bytes in 186 blocks
==32139== suppressed: 0 bytes in 0 blocks
==32139== Rerun with --leak-check=full to see details of leaked memory
==32139==
==32139== For counts of detected and suppressed errors, rerun with: -v
==32139== Use --track-origins=yes to see where uninitialised values come from
==32139== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
Segmentation fault

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.