Skip to content

Commit

Permalink
Improve WMS server performance
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed May 13, 2013
1 parent 0ec5dc4 commit a18ae68
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions src/core/qgscoordinatetransform.cpp
Expand Up @@ -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();

Expand Down
8 changes: 4 additions & 4 deletions src/mapserver/qgshttprequesthandler.cpp
Expand Up @@ -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
{
Expand Down

0 comments on commit a18ae68

Please sign in to comment.