[Geomoose-users] Strange PHP error on Query
Dan Little
danlittle at yahoo.com
Tue May 3 08:03:30 EDT 2011
I think the querying it's doing is looking for metadata. Does this layer map okay? The error you're seeing is essentially "Ack, I'm MapServer and I can't figure out what the hell is going on with this layer!" Some easy stuff to try:
1) Ensure you can map the data.
2) Convert your inner query into a view and make sure there is a valid entry in geometry_columns for the view.
3) Curse aloud to others.
4) Repost to mailing list if none of the above works.
>________________________________
>From: Stephen Knox <stephenknox73 at gmail.com>
>To: geomoose-users at lists.sourceforge.net
>Sent: Monday, May 2, 2011 7:02 PM
>Subject: Re: [Geomoose-users] Strange PHP error on Query
>
>
>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> </td>
><td> </td>
></tr>
>
>
>------------------------------------------------------------------------------
>WhatsUp Gold - Download Free Network Management Software
>The most intuitive, comprehensive, and cost-effective network
>management toolset available today. Delivers lowest initial
>acquisition cost and overall TCO of any competing solution.
>http://p.sf.net/sfu/whatsupgold-sd
>_______________________________________________
>Geomoose-users mailing list
>Geomoose-users at lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/geomoose-users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geomoose-users/attachments/20110503/22c6a548/attachment.html
More information about the Geomoose-users
mailing list