Hi All,

 

I'm trying to index OGR Point features using geos. In the function
Quadtree::insert, can I pass an Envelope created using the x,y coordinates
of the point and the item as the point feature (OGRFeature) converted to
GEOSGeom? Please refer the sample code below.

 

Sample Code:

/*---------------------------------------

GEOSGeom poGEOSGeom = poOGRFeature->GetGeometryRef()->exportToGEOS();

 

double dfXCoord = poOGRFeature->GetFieldAsDouble( "X" );

double dfYCoord = poOGRFeature->GetFieldAsDouble( "Y" );

 

geos::geom::Envelope *poEnvelope = new geos::geom::Envelope( dfXCoord,
dfXCoord, dfYCoord, dfYCoord );

 

poQuadtree->insert( poEnvelope, poGEOSGeom );

---------------------------------------*/

 

Kindly pass your suggestions.

 

Thanks.

Regards,

Ela.

_______________________________________________
geos-devel mailing list
geos-devel@geos.refractions.net
http://geos.refractions.net/mailman/listinfo/geos-devel

Reply via email to