Skip to content

Commit

Permalink
Merge branch 'branch-6-2' into wcs-mask-6-2-backport
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonfort committed Sep 29, 2012
2 parents dd7efaa + 1903b7a commit 51d4754
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
23 changes: 11 additions & 12 deletions mapprimitive.c
Expand Up @@ -1707,18 +1707,17 @@ void msPolylineLabelPointLineString(shapeObj *p, int min_length, int repeat_dist
(*labelpoints)[index]->y = t * (p->line[i].point[k+1].y - p->line[i].point[k].y) + p->line[i].point[k].y;
}

theta = asin(MS_ABS(p->line[i].point[j].x - p->line[i].point[j-1].x)/sqrt((((p->line[i].point[j].x - p->line[i].point[j-1].x)*(p->line[i].point[j].x - p->line[i].point[j-1].x)) + ((p->line[i].point[j].y - p->line[i].point[j-1].y)*(p->line[i].point[j].y - p->line[i].point[j-1].y)))));

if(p->line[i].point[j-1].x < p->line[i].point[j].x || anglemode == MS_AUTO2) { /* i.e. to the left */
if(p->line[i].point[j-1].y < p->line[i].point[j].y) /* i.e. below */
*(*angles)[index] = -(90.0 - MS_RAD_TO_DEG*theta);
else
*(*angles)[index] = (90.0 - MS_RAD_TO_DEG*theta);
} else {
if(p->line[i].point[j-1].y < p->line[i].point[j].y) /* i.e. below */
*(*angles)[index] = (90.0 - MS_RAD_TO_DEG*theta);
else
*(*angles)[index] = -(90.0 - MS_RAD_TO_DEG*theta);
if(anglemode != MS_NONE) {
theta = atan2(p->line[i].point[j].x - p->line[i].point[j-1].x, p->line[i].point[j].y - p->line[i].point[j-1].y);
if(anglemode == MS_AUTO) {
if(p->line[i].point[j-1].x < p->line[i].point[j].x) { /* i.e. to the left */
*(*angles)[index] = (MS_RAD_TO_DEG*theta) - 90;
} else {
*(*angles)[index] = (MS_RAD_TO_DEG*theta) + 90;
}
} else { /* AUTO2 */
*(*angles)[index] = (MS_RAD_TO_DEG*theta) - 90;
}
}

point_position = left_point_position;
Expand Down
8 changes: 5 additions & 3 deletions mapwfslayer.c
Expand Up @@ -153,7 +153,7 @@ static wfsParamsObj *msBuildRequestParams(mapObj *map, layerObj *lp,
if (strstr(pszTmp, "<Filter>") !=NULL || strstr(pszTmp, "<ogc:Filter") != NULL)
psParams->pszFilter = msStrdup(pszTmp);
else {
psParams->pszFilter = msStringConcatenate(psParams->pszFilter, "<ogc:Filter>");
psParams->pszFilter = msStringConcatenate(psParams->pszFilter, "<ogc:Filter xmlns:ogc=\"http://www.opengis.net/ogc\">");
psParams->pszFilter = msStringConcatenate(psParams->pszFilter, (char*)pszTmp);
psParams->pszFilter = msStringConcatenate(psParams->pszFilter, "</ogc:Filter>");
}
Expand Down Expand Up @@ -263,7 +263,8 @@ static char *msBuildWFSLayerPostRequest(mapObj *map, layerObj *lp,
"service=\"WFS\"\n"
"version=\"1.0.0\"\n"
"maxFeatures=\"%d\"\n"
"outputFormat=\"GML2\">\n"
"outputFormat=\"GML2\"\n"
"xmlns:wfs=\"http://www.opengis.net/wfs\" xmlns:ogc=\"http://www.opengis.net/ogc\" xsi:schemaLocation=\"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:gml=\"http://www.opengis.net/gml\">\n"
"<wfs:Query typeName=\"%s\">\n"
"%s"
"</wfs:Query>\n"
Expand All @@ -273,7 +274,8 @@ static char *msBuildWFSLayerPostRequest(mapObj *map, layerObj *lp,
"<wfs:GetFeature\n"
"service=\"WFS\"\n"
"version=\"1.0.0\"\n"
"outputFormat=\"GML2\">\n"
"outputFormat=\"GML2\"\n"
"xmlns:wfs=\"http://www.opengis.net/wfs\" xmlns:ogc=\"http://www.opengis.net/ogc\" xsi:schemaLocation=\"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:gml=\"http://www.opengis.net/gml\">\n"
"<wfs:Query typeName=\"%s\">\n"
"%s"
"</wfs:Query>\n"
Expand Down
2 changes: 1 addition & 1 deletion msautotest
Submodule msautotest updated from 5930aa to f97a4a

0 comments on commit 51d4754

Please sign in to comment.