I am trying to figure out a way to sub-divide a vector based map into smaller blocks. I can tile the map based on different strategies such as q-tree. However, it is unavoidable to cut some polylines and polygons that cross the boundaries of the blocks. By doing this, we will lose their geometric and topological attributes.

The tiled data can only be used for display but not for spatial analyses because they have partly lost their geometric and topological attributes. Do you have any suggestion or experience with sub-dividing the vector data and still maintaining their us usability for spatial analyses?


Tilestache is an open source tool for serving tiles, and serves tiled vector data as well as tiled images that may be worth looking at (either as a tool, or through the source code).

The PostGis GeoJSON driver creates GeoJSON vector tiles and has the option to clip them or not.

clipping: Boolean flag for optionally clipping the output geometries to the bounds of the enclosing tile. Defaults to fales. This results in incomplete geometries, dramatically smaller file sizes, and improves performance and compatibility with Polymaps (http://polymaps.org).

There is a recent blog post on using TileStache & OpenLayers to create hand-rolled vector tiles here.

  • 1
    but once they are clipped doesn't that break the spatial analysis he wants to do? – Ian Turton Feb 27 '11 at 23:46
  • thanks, geographika. but iant is right. once we tile them, the spatial information will be impaired. – weliam Feb 28 '11 at 1:47
  • 2
    But setting the flag to true will result in the complete geometries – geographika Feb 28 '11 at 6:56
  • but then the features can extend along way past the tile (in the US interstate 80 runs from New York to San Francisco) which kills you performance gain. – Ian Turton Feb 28 '11 at 15:31

You may be running up against the theory of No Free Lunch...

Depending on your use case, it may be that you want tiled vector data for display, but a second non-tiled instance of the data for analysis. I could see this being useful if the analysis to display ratio is low.

  • 2
    We have Operational and Warehouse db's. The operational have many relational tables, and little to no duplication across tables. The warehouse db's are flattened, no relationships, many duplicated fields, but fast -- no calculations on the fly. The trick is automating the process from Analytical to Tiled, with no user intervention. Essentially what ArcMap does in it's new on the fly basemap layer feature, and Google Maps & Tilestache and friends: Grab feature classes X,Y,Z in the area of interest, throw out all their intelligence, mash them into a dumb bitmap (saved in cache), and draw. – matt wilkie Feb 28 '11 at 20:57
  • From a Web perspective, kind of like sending all of your data layers to the client in one, WMS layer? – DavidF Feb 28 '11 at 21:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.