Skip to content
Permalink
Browse files

Take wfs gml directly from geometry

  • Loading branch information
mhugent committed Feb 10, 2017
1 parent c0eb997 commit 83c62dac671b0cd4917d0fceea456a7d2c54120b
Showing with 16 additions and 2 deletions.
  1. +16 −2 src/server/services/wfs/qgswfsgetfeature.cpp
@@ -1162,7 +1162,14 @@ namespace QgsWfs
gmlElem = QgsOgcUtils::geometryToGML( &centroid, doc, prec );
}
else
gmlElem = QgsOgcUtils::geometryToGML( &geom, doc, prec );
{
QgsAbstractGeometry* abstractGeom = geom.geometry();
if ( abstractGeom )
{
gmlElem = abstractGeom->asGML2( doc, prec, "http://www.opengis.net/gml" );
}
}

if ( !gmlElem.isNull() )
{
QgsRectangle box = geom.boundingBox();
@@ -1237,7 +1244,14 @@ namespace QgsWfs
gmlElem = QgsOgcUtils::geometryToGML( &centroid, doc, QStringLiteral( "GML3" ), prec );
}
else
gmlElem = QgsOgcUtils::geometryToGML( &geom, doc, QStringLiteral( "GML3" ), prec );
{
QgsAbstractGeometry* abstractGeom = geom.geometry();
if ( abstractGeom )
{
gmlElem = abstractGeom->asGML3( doc, prec, "http://www.opengis.net/gml" );
}
}

if ( !gmlElem.isNull() )
{
QgsRectangle box = geom.boundingBox();

0 comments on commit 83c62da

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