Skip to content

Commit

Permalink
[QGIS-Server] Use layer precision in searchRect
Browse files Browse the repository at this point in the history
  • Loading branch information
rldhont committed Nov 11, 2015
1 parent de3d7eb commit 17378ba
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/server/qgswfsserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -504,10 +504,10 @@ int QgsWFSServer::getFeature( QgsRequestHandler& request, const QString& format

//map extent
searchRect = layer->extent();
searchRect.set( searchRect.xMinimum() - 0.000001
, searchRect.yMinimum() - 0.000001
, searchRect.xMaximum() + 0.000001
, searchRect.yMaximum() + 0.000001 );
searchRect.set( searchRect.xMinimum() - 1/pow(10,layerPrec)
, searchRect.yMinimum() - 1/pow(10,layerPrec)
, searchRect.xMaximum() + 1/pow(10,layerPrec)
, searchRect.yMaximum() + 1/pow(10,layerPrec) );
layerCrs = layer->crs();

QgsFeatureIterator fit = layer->getFeatures(
Expand Down Expand Up @@ -849,10 +849,10 @@ int QgsWFSServer::getFeature( QgsRequestHandler& request, const QString& format
if ( bboxOk )
searchRect.set( minx, miny, maxx, maxy );
else
searchRect.set( searchRect.xMinimum() - 0.000001,
searchRect.yMinimum() - 0.000001,
searchRect.xMaximum() + 0.000001,
searchRect.yMaximum() + 0.000001 );
searchRect.set( searchRect.xMinimum() - 1/pow(10,layerPrec),
searchRect.yMinimum() - 1/pow(10,layerPrec),
searchRect.xMaximum() + 1/pow(10,layerPrec),
searchRect.yMaximum() + 1/pow(10,layerPrec) );
layerCrs = layer->crs();

long featCounter = 0;
Expand Down

0 comments on commit 17378ba

Please sign in to comment.