Skip to content
Permalink
Browse files

[QGIS-Server] Use layer precision in searchRect

  • Loading branch information
rldhont committed Nov 11, 2015
1 parent 6ee8001 commit ed598c12e9e3bb31e43de1ba345988cdfca8b532
Showing with 8 additions and 8 deletions.
  1. +8 −8 src/server/qgswfsserver.cpp
@@ -507,10 +507,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(
@@ -853,10 +853,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;

0 comments on commit ed598c1

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