I need tips for publishing raster data in my OpenLayers application. I published shapefiles through my postgis db (PgAdmin) to geoserver, not sure how to do that for raster?. I read that is not a clever idea in this answer.
I have a map of municipality tiff format (1,6 GB) and I want to import that map as Layer to include in LayerSwitsher window. So my question is how? I had already published my raster data in db (not on Geoserver), but now I'm thinking what to do? Maybe to try directly?
The interesting thing is when I connect QGIS with db and drag my raster into QGIS, it's incredibly slow and breaks constantly...so I ask myself would that happen through geoserver and on my OL app.
GeoServer has no built-in support for rasters in a PostGIS store. You have to install an extension in order to do this (GeoServer Docs - PostGIS Raster).
What you can do is to publish the tiff image directly using a GeoTiff store, to do that you can simple put the image in a folder accessible by GeoServer and follow this GeoServer Docs - GeoTiff.
As a recommendation, first publish your tiff image and consume it with you application. After that, if performance is not "good", begin to study how to improve it. There are several techniques to improve raster performance, from compression to pyramids and beyond.