Coder Social home page Coder Social logo

image2tiles's People

Contributors

hauke96 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

image2tiles's Issues

Create tests

Currently the code is not very testable and has to be split up into functions that can be tested separately. Think of tests using e.g. cunit as framework.

Help message

Currently the flags -h and --help are unknown. Change that. Currently I don't know a fancy way to add a help message (with correct formatting and stuff), maybe there is a good way?

Scale tiles

The tiles are in the size used in the original image. This may be 134 pixel but normally a tile as the size 256. Scale each tile to the according size.

Document calculation thoughts

There's already a detailed documentation for the calculation of the next higher tile (e.g. from zoom-level 13 to zoom-level 12). Add additional ones for other non-trivial calculations.

Only specify zoom-level and lat-long of two points in the image

Instead of specifying the first tile position inside the image with some sort of index, it would be nice to just specify die lat-long position in combination with the maximum zoon level. A calculation of the first tile position and X/Y/Z coordinates can be done in the code (as seen here).

Correctly use zoom levels

Zoom levels are currently not used. An additional for loop is needed to loop over the zoom levels. Also the tile size (in the image and from the output file), X and Y coordinate as well as the position in the image have to be calculated based on the zoom level.

Parameters

Refactor the usage of parameters in two steps:

  • Use variables instead of hard-coded values
  • Use arguments from the CLI

Multiple files?

Currently the code base is not that large. Nevertheless I don't have strong arguments against splitting the code into several files. At least a debug.h for several makros would be nice. Maybe separate files for I/O, calculations and parsing might be nice.

Create sample

When #1 is done, create a sample that cuts the sample/sample.jpg image into the according tiles.

Write README

The README should contain:

  • General description
  • Usage information
  • Requirenments (e.g. opencv and its possibly wrong location)
  • Build instructions
  • ...?

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.