Skip to content

Commit

Permalink
Merge branch 'branch-6-2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Schpidi committed Aug 28, 2012
2 parents f5c7d8c + 6308473 commit d660e3e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions mapwcs.c
Expand Up @@ -1617,6 +1617,24 @@ this request. Check wcs/ows_enable_request settings.", "msWCSGetCoverage()", par

/* make sure the layer is on */
lp->status = MS_ON;

/* If the layer has no projection set, set it to the map's projection (#4079) */
if(lp->projection.numargs <=0) {
char *map_original_srs = msGetProjectionString(&(map->projection));
if (msLoadProjectionString(&(lp->projection), map_original_srs) != 0) {
msSetError( MS_WCSERR, "Error when setting map projection to a layer with no projection", "msWCSGetCoverage()" );
return msWCSException(map, NULL, NULL, params->version);
}
}

/* If the layer has no projection set, set it to the map's projection (#4079) */
if(lp->projection.numargs <=0) {
char *map_original_srs = msGetProjectionString(&(map->projection));
if (msLoadProjectionString(&(lp->projection), map_original_srs) != 0) {
msSetError( MS_WCSERR, "Error when setting map projection to a layer with no projection", "msWCSGetCoverage()" );
return msWCSException(map, NULL, NULL, params->version);
}
}

/* we need the coverage metadata, since things like numbands may not be available otherwise */
status = msWCSGetCoverageMetadata(lp, &cm);
Expand Down

0 comments on commit d660e3e

Please sign in to comment.