[geos-devel] Quadtree Spatial Indexing
Elavazhagan.M
elavazhagan.mouniandy at kcubeconsulting.com
Wed Nov 29 00:42:35 EST 2006
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geos-devel/attachments/20061129/4f28f0de/attachment.html
More information about the geos-devel
mailing list