Skip to content
Permalink
Browse files

Improve WMS server performance

  • Loading branch information
mhugent committed May 13, 2013
1 parent 0ec5dc4 commit a18ae684a062fbac7e6c9456aa44734d19049266
Showing with 9 additions and 4 deletions.
  1. +5 −0 src/core/qgscoordinatetransform.cpp
  2. +4 −4 src/mapserver/qgshttprequesthandler.cpp
@@ -321,6 +321,11 @@ void QgsCoordinateTransform::transformInPlace( double& x, double& y, double& z,

void QgsCoordinateTransform::transformPolygon( QPolygonF& poly, TransformDirection direction ) const
{
if ( mShortCircuit || !mInitialisedFlag )
{
return;
}

//create x, y arrays
int nVertices = poly.size();

@@ -571,17 +571,17 @@ void QgsHttpRequestHandler::imageColors( QHash<QRgb, int>& colors, const QImage&
int width = image.width();
int height = image.height();

QRgb currentColor;
const QRgb* currentScanLine = 0;
QHash<QRgb, int>::iterator colorIt;
for ( int i = 0; i < height; ++i )
{
currentScanLine = ( const QRgb* )( image.scanLine( i ) );
for ( int j = 0; j < width; ++j )
{
currentColor = image.pixel( j, i );
colorIt = colors.find( currentColor );
colorIt = colors.find( currentScanLine[j] );
if ( colorIt == colors.end() )
{
colors.insert( currentColor, 1 );
colors.insert( currentScanLine[j], 1 );
}
else
{

0 comments on commit a18ae68

Please sign in to comment.
You can’t perform that action at this time.