Skip to content

Commit

Permalink
When WFS changes the map->projection, also project the default map->e…
Browse files Browse the repository at this point in the history
…xtent (#5065)
  • Loading branch information
msmitherdc authored and dmorissette committed Feb 12, 2015
1 parent 1fdcb04 commit cf065f3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion mapwfs.c
Expand Up @@ -368,9 +368,21 @@ static int msWFSGetFeatureApplySRS(mapObj *map, const char *srs, int nWFSVersion
same srs. For wfs 1.1.0 an srsName can be passed, we should validate that It is valid for all
queries layers
*/

/* Start by applying the default service SRS to the mapObj,
* make sure we reproject the map extent if a projection was
* already set
*/
pszMapSRS = msOWSGetEPSGProj(&(map->projection), &(map->web.metadata), "FO", MS_TRUE);
if(pszMapSRS && nWFSVersion > OWS_1_0_0)
if(pszMapSRS && nWFSVersion > OWS_1_0_0){
projectionObj proj;
msInitProjection(&proj);
if (map->projection.numargs > 0 && msLoadProjectionStringEPSG(&proj, pszMapSRS) == 0) {
msProjectRect(&(map->projection), &proj, &map->extent);
}
msLoadProjectionStringEPSG(&(map->projection), pszMapSRS);
msFreeProjection(&proj);
}

if (srs == NULL || nWFSVersion == OWS_1_0_0) {
for (i=0; i<map->numlayers; i++) {
Expand Down

0 comments on commit cf065f3

Please sign in to comment.