[mapguide-commits] r5380 - trunk/MgDev/Server/src/Services/Mapping
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue Nov 9 16:48:46 EST 2010
Author: brucedechant
Date: 2010-11-09 13:48:46 -0800 (Tue, 09 Nov 2010)
New Revision: 5380
Modified:
trunk/MgDev/Server/src/Services/Mapping/MappingUtil.cpp
Log:
Small update to debugging information.
Modified: trunk/MgDev/Server/src/Services/Mapping/MappingUtil.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Mapping/MappingUtil.cpp 2010-11-09 09:04:11 UTC (rev 5379)
+++ trunk/MgDev/Server/src/Services/Mapping/MappingUtil.cpp 2010-11-09 21:48:46 UTC (rev 5380)
@@ -368,7 +368,7 @@
{
#ifdef _DEBUG
long dwStart = GetTickCount();
- printf("\nStylizeLayers() **MAPSTART** Layers:%d Scale:%f\n", layers->GetCount(), scale);
+ printf("StylizeLayers() **MAPSTART** Layers:%d Scale:%f\n", layers->GetCount(), scale);
#endif
// Cache coordinate system transforms for the life of the
@@ -431,7 +431,8 @@
Ptr<MgLayerBase> mapLayer = layers->GetItem(i);
#ifdef _DEBUG
- printf(" StylizeLayers() **LAYERSTART** Name:%S VAS:%S\n", (mapLayer->GetName()).c_str(), mapLayer->IsVisibleAtScale(scale)? L"True" : L"False");
+ long dwLayerStart = GetTickCount();
+ printf(" StylizeLayers(%d) **LAYERSTART** Name:%S VAS:%S\n", i, (mapLayer->GetName()).c_str(), mapLayer->IsVisibleAtScale(scale)? L"True" : L"False");
#endif
if(mapLayer->GetLayerResourceContent() == L"")
@@ -475,10 +476,6 @@
if (vl) //############################################################################ vector layer
{
- #ifdef _DEBUG
- long dwLayerStart = GetTickCount();
- #endif
-
// Modify the layer scale range to also support infinite
// Need to apply default style as one will not be defined
if (selection)
@@ -501,7 +498,7 @@
if (scaleRange)
{
#ifdef _DEBUG
- printf(" StylizeLayers() **Stylizing** Name:%S\n", (mapLayer->GetName()).c_str());
+ printf(" StylizeLayers(%d) **Stylizing** Name:%S\n", i, (mapLayer->GetName()).c_str());
#endif
// get feature source id
@@ -523,7 +520,7 @@
}
#ifdef _DEBUG
- printf(" StylizeLayers() **Stylizing** Name:%S Extents:%f,%f to %f,%f Expanded:%d\n", (mapLayer->GetName()).c_str(), extent.minx, extent.miny, extent.maxx, extent.maxy, expandExtents);
+ printf(" StylizeLayers(%d) **Stylizing** Name:%S Extents:%f,%f to %f,%f Expanded:%d\n", i, (mapLayer->GetName()).c_str(), extent.minx, extent.miny, extent.maxx, extent.maxy, expandExtents);
#endif
//get a transform from layer coord sys to map coord sys
@@ -555,7 +552,7 @@
overrideFilter = overrideFilters->GetItem(i);
#ifdef _DEBUG
- printf(" StylizeLayers() **Stylizing** Name:%S Override Filter(size=%d):\n%S\n", (mapLayer->GetName()).c_str(), overrideFilter.length(), overrideFilter.empty() ? L"(Empty)" : overrideFilter.c_str());
+ printf(" StylizeLayers(%d) **Stylizing** Name:%S Override Filter(size=%d):\n%S\n", i, (mapLayer->GetName()).c_str(), overrideFilter.length(), overrideFilter.empty() ? L"(Empty)" : overrideFilter.c_str());
#endif
// create the reader we'll use
@@ -564,7 +561,7 @@
FdoPtr<FdoIFeatureReader> fdoReader = (NULL == rsReader) ? NULL : rsReader->GetInternalReader();
#ifdef _DEBUG
- printf(" StylizeLayers() **Stylizing** Name:%S Query Done.\n", (mapLayer->GetName()).c_str());
+ printf(" StylizeLayers(%d) **Stylizing** Name:%S Query Done.\n", i, (mapLayer->GetName()).c_str());
#endif
if (NULL != fdoReader.p)
@@ -578,11 +575,11 @@
if (extractColors)
{
#ifdef _DEBUG
- printf(" StylizeLayers() //ExtractColors// -Vector- Name:%S Time:%6.4f (s)\n\n", (mapLayer->GetName()).c_str(), (GetTickCount()-dwLayerStart)/1000.0);
+ printf(" StylizeLayers(%d) //ExtractColors// -Vector- Name:%S Time:%6.4f (s)\n", i, (mapLayer->GetName()).c_str(), (GetTickCount()-dwLayerStart)/1000.0);
#endif
ExtractColors(map, scaleRange, ds);
#ifdef _DEBUG
- printf(" StylizeLayers() ##ExtractColors## -Vector- Name:%S Time:%6.4f (s)\n\n", (mapLayer->GetName()).c_str(), (GetTickCount()-dwLayerStart)/1000.0);
+ printf(" StylizeLayers(%d) ##ExtractColors## -Vector- Name:%S Time:%6.4f (s)\n", i, (mapLayer->GetName()).c_str(), (GetTickCount()-dwLayerStart)/1000.0);
#endif
}
}
@@ -590,12 +587,12 @@
else // not scaleRange
{
#ifdef _DEBUG
- printf(" StylizeLayers() **NOT Stylizing - NO SCALE RANGE** Name:%S\n", (mapLayer->GetName()).c_str());
+ printf(" StylizeLayers(%d) **NOT Stylizing - NO SCALE RANGE** Name:%S\n", i, (mapLayer->GetName()).c_str());
#endif
}
#ifdef _DEBUG
- printf(" StylizeLayers() **LAYEREND** -Vector- Name:%S Time:%6.4f (s)\n\n", (mapLayer->GetName()).c_str(), (GetTickCount()-dwLayerStart)/1000.0);
+ printf(" StylizeLayers(%d) **LAYEREND** -Vector- Name:%S Time:%6.4f (s)\n", i, (mapLayer->GetName()).c_str(), (GetTickCount()-dwLayerStart)/1000.0);
#endif
}
else if (gl) //############################################################################ grid layer
@@ -603,10 +600,6 @@
// TODO: FDO RFP - Make FdoPtr's reference counter thread-safe.
static ACE_Recursive_Thread_Mutex sg_fdoRfpMutex;
- #ifdef _DEBUG
- long dwLayerStart = GetTickCount();
- #endif
-
// make sure we have a valid scale range
MdfModel::GridScaleRange* scaleRange = Stylizer::FindScaleRange(*gl->GetScaleRanges(), scale);
@@ -620,7 +613,7 @@
RS_Bounds extent = dr->GetBounds();
#ifdef _DEBUG
- printf(" StylizeLayers() **Stylizing** Name:%S Extents:%f,%f to %f,%f\n", (mapLayer->GetName()).c_str(), extent.minx, extent.miny, extent.maxx, extent.maxy);
+ printf(" StylizeLayers(%d) **Stylizing** Name:%S Extents:%f,%f to %f,%f\n", i, (mapLayer->GetName()).c_str(), extent.minx, extent.miny, extent.maxx, extent.maxy);
#endif
//now get the coordinate system of the layer data
@@ -695,7 +688,7 @@
double ury = ur->GetY();
#ifdef _DEBUG
- printf(" StylizeLayers() **Stylizing** Name:%S Extents(SpatialContext):%f,%f to %f,%f\n", (mapLayer->GetName()).c_str(), llx, lly, urx, ury);
+ printf(" StylizeLayers(%d) **Stylizing** Name:%S Extents(SpatialContext):%f,%f to %f,%f\n", i, (mapLayer->GetName()).c_str(), llx, lly, urx, ury);
#endif
if (NULL != xformer)
@@ -716,7 +709,7 @@
MG_CATCH_AND_RELEASE()
#ifdef _DEBUG
- printf(" StylizeLayers() **Stylizing** Name:%S Extents(Using):%f,%f to %f,%f\n", (mapLayer->GetName()).c_str(), extent.minx, extent.miny, extent.maxx, extent.maxy);
+ printf(" StylizeLayers(%d) **Stylizing** Name:%S Extents(Using):%f,%f to %f,%f\n", i, (mapLayer->GetName()).c_str(), extent.minx, extent.miny, extent.maxx, extent.maxy);
#endif
double pixelsPerMapUnit = dr->GetMetersPerUnit() / METERS_PER_INCH * dr->GetDpi() / dr->GetMapScale();
@@ -741,15 +734,11 @@
}
#ifdef _DEBUG
- printf(" StylizeLayers() **LAYEREND** -Grid- Name:%S Time:%6.4f (s)\n\n", (mapLayer->GetName()).c_str(), (GetTickCount()-dwLayerStart)/1000.0);
+ printf(" StylizeLayers(%d) **LAYEREND** -Grid- Name:%S Time:%6.4f (s)\n", i, (mapLayer->GetName()).c_str(), (GetTickCount()-dwLayerStart)/1000.0);
#endif
}
else if (dl) //############################################################################ drawing layer
{
- #ifdef _DEBUG
- long dwLayerStart = GetTickCount();
- #endif
-
// make sure we have a valid scale range
if (scale >= dl->GetMinScale() && scale < dl->GetMaxScale())
{
@@ -804,7 +793,7 @@
}
#ifdef _DEBUG
- printf(" StylizeLayers() **LAYEREND** -Drawing- Name:%S Time = %6.4f (s)\n\n", (mapLayer->GetName()).c_str(), (GetTickCount()-dwLayerStart)/1000.0);
+ printf(" StylizeLayers(%d) **LAYEREND** -Drawing- Name:%S Time = %6.4f (s)\n", i, (mapLayer->GetName()).c_str(), (GetTickCount()-dwLayerStart)/1000.0);
#endif
} // end layer switch
More information about the mapguide-commits
mailing list