Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm brand-new to GIS and relatively new to web services. I've found a ton of great resources on the web, but I'm having trouble addressing one specific issue:

One of the data layers on my planned map is dynamically generated in Python from some scattered and dynamic data (it is the "results" output of a computational weather-related model). I can generate this layer in chunks of arbitrary size and location, and output in any standard format (a numpy array, a .png, a geotiff (using GDAL), etc.), and I can expose a function such as:

def create_tile(width, height, ulc_lat, ulc_lon, lrc_lat, lrc_lon):

to hide the implementation details.

But, how do I get this layer to display in the map? The options that I can see right now are:

  • Serve as a WMS by creating a new Layer Type in a Python-based WMS server such as TileCache or TileLite ... this is probably what I'll try unless someone has a better idea.

  • Implement as a PythonDataSource in Mapnik. Problem: It's a new feature, requires custom compilation, and causes Mapnik to segfault even on the provided examples.

  • Somehow map filenames on disk (my_tile_z0_x3_y4) so that their contents is generated on-demand by the create_tile function above... I have no idea how this would be done, though.

  • Create the layer on disk ahead of time, and re-generate it often to keep the appearance of being "dynamic". (lots of disk space, needless CPU use, etc)

Does anybody have any suggestions? It seems like this must be a common problem, but I can't find any standard solution...

Thanks! Rob

share|improve this question
    
try tilestache, its not that hard –  Below the Radar May 26 '13 at 16:36
    
thanks for the tip. I ended up using TileCache just because I needed to serve as WMS, and it went surprisingly smoothly... it was really easy to create a new Layer type. –  rdchambers May 27 '13 at 5:51

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.