Hi All,
I'm trying to set a Geometry which is a polygon using the following code:
OGRLayer *poLayer;
poLayer = m_wfs_t->GetLayerByName("tows:poiserver");
OGRFeature *poFeature;
poFeature = OGRFeature::CreateFeature( poLayer->GetLayerDefn() );
poFeature->SetField( "name", "ahmed" );
OGRLinearRing ring1;
OGRPolygon poly;
ring1.addPoint(1116651.439379124, 637392.6969887456);
ring1.addPoint(1188804.0108498496, 652655.7409537067);
ring1.addPoint(1226730.3625203592, 634155.0816022386);
ring1.addPoint(1281307.30760719, 636467.6640211721);
ring1.closeRings();
poly.addRing(&ring1);
poFeature->SetGeometry(&poly);
if( poLayer->CreateFeature( poFeature ) != OGRERR_NONE ) // ERROR HERE
{
std::cout <<"error creating a feature"<<endl;
}
But I get Error : Transaction Response. I don't know whether the problem is in
my server or a problem in OGR itself.
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev