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 have a land cover raster that I'd like to display as part of an Openlayers based application. I'm able to load the raster directly as a PNG but my Openlayers application becomes VERY slow. I think I want something that can tile the raster and send level of detail tiles that Openlayers can fetch, but I'm not sure since I'm a GIS newbie.

Is this something that GeoServer can handle automatically? I'd love to be able to laod rasters and shapefiles onto the server then link to those layers in Openlayers. Is this the correct approach?

Edit: I ended up using GeoServer and adding the rasters as data sources. I was able to copy and paste a lot of code from the "Layer Preview" section of GeoServer to dump into my OpenLayers application. Thanks for the help.

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

I would say you have 2 options.

1/ Use a WMS server.

  • You can then use tilecache with openlayers. Here is an example.
  • Mapproxy is also an option. You will find a very recente tutorial from FOSS4G2011.
  • Finally GeoWebCache can also be useful to you. Here a guide to set it up with geoserver.

2/ Or use gdal2tiles and display resulting tiles directly in openlayers.

share|improve this answer
add comment

Yes, that is exactly what GeoServer and the built in GeoWebCache does for you.

I'm assuming that your PNG is geocoded already (i.e. you know which area of the world it covers) in which case you'll probably want to convert it to a GeoTIFF (using GDAL). Check out http://demo.geo-solutions.it/share/foss4g2011/gt_raster_simone_foss4g2011.pdf for a full discussion of adding rasters to GeoServer and how to speed up their display.

share|improve this answer
add comment

Your Answer

 
discard

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

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