Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Firstly, I've never worked in the GIS area before nor do I have much knowledge of the mathematics behind some of the stuff I am trying to implement. Perhaps i'm getting in over my head.

My Situation

I am creating a geospatial map viewer in Qt. So far I have a MapTile class which stores its center location (lat and long) and the width of the box in kilometers, which may or may not be a good idea. From this information I can construct a bounding box from the center point and the width by using the algorithm found here.

The MapTiles are all square, no irregular shapes or rectangles. Is this a bad implementation?

My Problem

Now I am stuck with implementing my MapTileMatrix class which stores a multidimensional array of MapTiles[rows][cols]. I figured I could tell the MapTileMatrix what its bounding box is, and then have it generate the MapTiles position and width from this data. I haven't been able to find any algorithm online or mention of how to split a bounding box down into n number of sub-boundingboxes.

Is there a method of dividing a bounding box into say 4 equal parts? What about 9, 16 or 25? If this is not possible perhaps I should reconsider my design.

On a side note:

Are there any guides / tutorials to implementing a map viewer application? I have read over the Web Map Tile Service and am using this as a guide. This has been my introduction to GIS programming and I have only been working on it for a few days so have little to no knowledge of the domain.

share|improve this question
Your good question describes quad-tiling -… – Mapperz Aug 27 '13 at 2:55
I'm not exactly sure this is what I'm after. – mdoran3844 Aug 27 '13 at 5:23
This might be a better example you state MapTiles[rows][cols]. Quadtiles are built like this, they can be created on the fly or in static 'cached' form for speed. – Mapperz Aug 27 '13 at 13:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.