Permalink
Browse files

Fix for the OGR autostyle unit calculation (#5028)

  • Loading branch information...
szekerest committed Nov 6, 2014
1 parent 5b2c46a commit e5eb628908adfec32f64a04ced223e13258f93b1
Showing with 4 additions and 2 deletions.
  1. +4 −2 mapogr.cpp
View
@@ -590,7 +590,8 @@ static char **msOGRGetValues(layerObj *layer, OGRFeatureH hFeature)
}
/* Setting up the size units according to msOGRLayerGetAutoStyle*/
if (hStylePart && layer->map)
OGR_ST_SetUnit(hStylePart, OGRSTUPixel, layer->map->cellsize*72.0*39.37);
OGR_ST_SetUnit(hStylePart, OGRSTUPixel,
layer->map->cellsize*layer->map->resolution/layer->map->defresolution*72.0*39.37);
}
}
int bDefault;
@@ -2997,7 +2998,8 @@ static int msOGRUpdateStyle(OGRStyleMgrH hStyleMgr, mapObj *map, layerObj *layer
// as long as use the same assumptions everywhere)
// That gives scale = cellsize*72*39.37
OGR_ST_SetUnit(hStylePart, OGRSTUPixel, map->cellsize*72.0*39.37);
OGR_ST_SetUnit(hStylePart, OGRSTUPixel,
map->cellsize*map->resolution/map->defresolution*72.0*39.37);
if (eStylePartType == OGRSTCLabel) {
int ret = msOGRUpdateStyleParseLabel(map, layer, c, hStylePart);

0 comments on commit e5eb628

Please sign in to comment.