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 am looking through openlayers to try to figure out a consistent format for generating views of coverages that can satisfy any wcs server, but mainly I'd like to get geoserver coverages.

While I've read that openlayers does not support wcs, I see in the API that there is OpenLayers.Format.WCSGetCoverage constructor, but I'm not certain how to go about using it.

I'm not sure what to pass in to the function to get the coverage and ultimately I will parse what I retrieve. I know the call below is incorrect, but I'm using it as a mild example. Ultimately based on the configuration of my service I am going to use a describeCoverage type of function to retrieve parameters and then subsequently use the getCoverage upon success of retrieving metadata. Then I need to find a way to parse the xml/gml result, but from what I can tell openlayers may not have any parser for that schema.

 $.fn.WcsGetCoverage = function(baseUrl, coverage, onSuccess, onError){
    if(baseUrl.endsWith("wps?")){
       baseUrl = baseUrl.replace("wps?", "wcs?");
       $.ajax({
       type: "GET",
       url : baseUrl, 
       data: {
            service : "wcs",
            version : "2.0.0", 
            request : "GetCoverage",
            coverage : coverage,
            crs :, //epsg_code, 
            bbox :, //minx, miny, maxx, maxy,
            WIDTH : , //output_width: Width in pixels of map picture. One of WIDTH/HEIGHT or RESX/Y is required.
            HEIGHT : , //output_height: Height in pixels of map picture. One of WIDTH/HEIGHT or RESX/Y is required.
            RESXx: , //When requesting a georectified grid coverage, this requests a subset with a specific spatial resolution. One of WIDTH/HEIGHT or RESX/Y is required.
            RESYy: , //When requesting a georectified grid coverage, this requests a subset with a specific spatial resolution. One of WIDTH/HEIGHT or RESX/Y is required.
            FORMAT: , //output_format: Output format of map, as stated in the DescribeCoverage response.
        },
        success : onSuccess,
        error : onError
    });
share|improve this question
add comment

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.