MCPcopy Create free account
hub / github.com/MapServer/MapServer / msOGRLayerWhichShapes

Function msOGRLayerWhichShapes

mapogr.cpp:2379–2412  ·  view source on GitHub ↗

* msOGRLayerWhichShapes() * * Init OGR layer structs ready for calls to msOGRLayerNextShape(). * * Returns MS_SUCCESS/MS_FAILURE, or MS_DONE if no shape matching the * layer's FILTER overlaps the selected region. **********************************************************************/

Source from the content-addressed store, hash-verified

2377 * layer's FILTER overlaps the selected region.
2378 **********************************************************************/
2379int msOGRLayerWhichShapes(layerObj *layer, rectObj rect, int isQuery)
2380{
2381#ifdef USE_OGR
2382 msOGRFileInfo *psInfo =(msOGRFileInfo*)layer->layerinfo;
2383 int status;
2384
2385 if (psInfo == NULL || psInfo->hLayer == NULL)
2386 {
2387 msSetError(MS_MISCERR, "Assertion failed: OGR layer not opened!!!",
2388 "msOGRLayerWhichShapes()");
2389 return(MS_FAILURE);
2390 }
2391
2392 status = msOGRFileWhichShapes( layer, rect, psInfo );
2393
2394 if( status != MS_SUCCESS || layer->tileindex == NULL )
2395 return status;
2396
2397 // If we are using a tile index, we need to advance to the first
2398 // tile matching the spatial query, and load it.
2399
2400 return msOGRFileReadTile( layer, psInfo );
2401
2402#else
2403/* ------------------------------------------------------------------
2404 * OGR Support not included...
2405 * ------------------------------------------------------------------ */
2406
2407 msSetError(MS_MISCERR, "OGR support is not available.",
2408 "msOGRLayerWhichShapes()");
2409 return(MS_FAILURE);
2410
2411#endif /* USE_OGR */
2412}
2413
2414/**********************************************************************
2415 * msOGRLayerGetItems()

Callers 1

msWFSLayerWhichShapesFunction · 0.85

Calls 3

msSetErrorFunction · 0.85
msOGRFileWhichShapesFunction · 0.85
msOGRFileReadTileFunction · 0.85

Tested by

no test coverage detected