[Geomoose-users] Strange PHP error on Query

Stephen Knox stephenknox73 at gmail.com
Mon May 2 20:02:53 EDT 2011


Excuse my inexperience but I have another query about getting query
functionality to work in GeoMoose. It seems to be querying the database for
a few seconds, then I get no Valid Response and the following error in PHP:
httpd: mappostgis.c:1882: msPostGISLayerResultsGetShape: Assertion
`layer->layerinfo != ((void *)0)' failed.

I have the following section of mapbook:

    <service name="search_oas">
        <url>php/query.php</url>
        <step type="input">

            <input type="select" name="comparitor0" title="Percentage Travel
by UG 2001">
                <option value="gt">Greater Than</option>
                <option value="eq">Equal To</option>
                <option value="lt">Less Than</option>
            </input>
            <input type="user" name="value0" title=""/>
            <input type="hidden" name="highlight" value="true"/>
            <input type="hidden" name="mode" value="search"/>

            <input type="hidden" name="layer0" value="uglines/oas"/>
            <input type="hidden" name="template0" value="itemquery"/>
            <input type="hidden" name="zoom_to_first" value="false"/>
            <input type="hidden" name="fieldname0" value="per_ttw_lu"/>
        </step>
    </service>

and the layer definition below:

LAYER
CONNECTIONTYPE postgis
NAME "oas"
CONNECTION "user=postgres password=postgres dbname=lustations
host=localhost"
DATA "the_geom from (SELECT gid, the_geom, census_code,  ttw_by_lu,
(ttw_by_lu::REAL/tot_pop::REAL)*100 as per_ttw_lu, tot_pop FROM oa_data) as
foo using srid=27700 using unique gid"
STATUS ON
TYPE POLYGON

METADATA
identify_record "identify_oas.html"
itemquery "oa_itemquery.html"
END

CLASS
    STYLE
        OUTLINECOLOR 0 0 0
        #COLOR 216 250 138
        WIDTH 1
    END
END
END

my oa_itemquery.html looks like this:

<!-- MapServer Template -->
<tr bgcolor="#DEE5EB"><td colspan="2"><b><u>Output Areas</u></b></tr>
<tr>
<td align="right"><b>Census Code:</b></td>
<td>[census_code]</td>
</tr>
<tr>
<td align="right"><b>Percentage travel by LU:</b></td>
<td>[per_ttw_lu]</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geomoose-users/attachments/20110503/98eece5f/attachment.html


More information about the Geomoose-users mailing list