Skip to content

Commit

Permalink
Merge branch 'branch-6-2'
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonfort committed Aug 7, 2012
2 parents 9e6ff18 + 6c11604 commit ddd4a53
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 7 additions & 2 deletions mapgml.c
Original file line number Diff line number Diff line change
Expand Up @@ -1215,8 +1215,13 @@ int msGMLWriteQuery(mapObj *map, char *filename, const char *namespaces)

#ifdef USE_PROJ
/* project the shape into the map projection (if necessary), note that this projects the bounds as well */
if(pszOutputSRS == pszMapSRS && msProjectionsDiffer(&(lp->projection), &(map->projection)))
msProjectShape(&lp->projection, &map->projection, &shape);
if(pszOutputSRS == pszMapSRS && msProjectionsDiffer(&(lp->projection), &(map->projection))) {
status = msProjectShape(&lp->projection, &map->projection, &shape);
if(status != MS_SUCCESS) {
msIO_fprintf(stream, "<!-- Warning: Failed to reproject shape: %s -->\n",msGetErrorString(","));
continue;
}
}
#endif

/* start this feature */
Expand Down
4 changes: 3 additions & 1 deletion mapproject.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,10 @@ int msProjectPoint(projectionObj *in, projectionObj *out, pointObj *point)
msReleaseLock( TLOCK_PROJ );
#endif

if( error || point->x == HUGE_VAL || point->y == HUGE_VAL )
if( error || point->x == HUGE_VAL || point->y == HUGE_VAL ) {
msSetError(MS_PROJERR,"proj says: %s","msProjectPoint()",pj_strerrno(error));
return MS_FAILURE;
}

if( pj_is_latlong(out->proj) ) {
point->x *= RAD_TO_DEG;
Expand Down

0 comments on commit ddd4a53

Please sign in to comment.