This question is similar to an earlier question about displaying vector data in a web-map. I want to have a basic web interface which uses OpenLayers and can display raster data that is currently in PostGIS, using a basemap such as google. I have installed PostGIS2.0 with the raster library and see from the documentation that there are several options to output data, such as JPEG, GeoTIFF and PNG. Is their a recommend format to use?
To display vector data I am currently using javascript to send coordinates from the user's browser to my server, and then performing a query using PHP/SQL on PostGIS. The results are then returned as GeoJSON which can be overlaid on the basemap. I wondered if a similar approach could be applied using rasters but I don't know what raster format is best, or if there are any other constraints I should consider.
I have seen a lot of references to GeoServer but I'm not sure if it is necessary for this project (I'm not entirely sure when GeoServer should be used or not).