MCPcopy Index your code
hub / github.com/MapServer/MapServer / msPostGISBuildSQLFrom

Function msPostGISBuildSQLFrom

mappostgis.c:1798–1822  ·  view source on GitHub ↗

** msPostGISBuildSQLFrom() ** ** Returns malloc'ed char* that must be freed by caller. */

Source from the content-addressed store, hash-verified

1796** Returns malloc'ed char* that must be freed by caller.
1797*/
1798char *msPostGISBuildSQLFrom(layerObj *layer, rectObj *rect) {
1799 char *strFrom = 0;
1800 msPostGISLayerInfo *layerinfo;
1801
1802 if (layer->debug) {
1803 msDebug("msPostGISBuildSQLFrom called.\n");
1804 }
1805
1806 assert( layer->layerinfo != NULL);
1807
1808 layerinfo = (msPostGISLayerInfo *)layer->layerinfo;
1809
1810 if ( ! layerinfo->fromsource ) {
1811 msSetError(MS_MISCERR, "Layerinfo->fromsource is not initialized.", "msPostGISBuildSQLFrom()");
1812 return NULL;
1813 }
1814
1815 /*
1816 ** If there's a '!BOX!' in our source we need to substitute the
1817 ** current rectangle for it...
1818 */
1819 strFrom = msPostGISReplaceBoxToken(layer, rect, layerinfo->fromsource);
1820
1821 return strFrom;
1822}
1823
1824/*
1825** msPostGISBuildSQLWhere()

Callers 1

msPostGISBuildSQLFunction · 0.85

Calls 3

msDebugFunction · 0.85
msSetErrorFunction · 0.85
msPostGISReplaceBoxTokenFunction · 0.85

Tested by

no test coverage detected