[Geomoose-users] query.php configuration confusion

Len Kne lkne at houstoneng.com
Wed Jun 16 16:46:41 EDT 2010


Your parameters look right.  How about this -  queryitem, query and select create a temp shape file with the results and then use a built in map file to show the results.  Look for highlight.map in htdocs/php/itemquery and/or htdocs/php/select.  In the MAP object of the file, add the 900913 projection information.  This should re-project the highlight results before returning them to GeoMOOSE.

Len

-----Original Message-----
From: Johan Forsman [mailto:Johan.Forsman at LA.GOV] 
Sent: Wednesday, June 16, 2010 3:37 PM
To: Len Kne; geomoose-users at lists.sourceforge.net
Subject: RE: query.php configuration confusion

Hi Len, thanks for the response.

On Issue 1  suspected that was it. I will attempt to craft an expanded section for each layer I wish to query.

On Issue 2:
Settings.ini contains
	projection=EPSG:900913

Mapbook contains
	<param name="projection">EPSG:900913</param>

Mapfiles contain
	PROJECTION
		"init=epsg:900913"
	END
at the top, and
	PROJECTION
		"init=epsg:26915"
	END
for each layer.

Did I miss something?

Thanks!
/Johan.

> -----Original Message-----
> From: Len Kne [mailto:lkne at houstoneng.com]
> Sent: Wednesday, June 16, 2010 3:22 PM
> To: Johan Forsman; geomoose-users at lists.sourceforge.net
> Subject: RE: query.php configuration confusion
> 
> Hi Johan
> 
> Issue 2 - check conf/settings.ini to see what the projection is set to.
> Server-based services use this value for the projection, while client- 
> based services use the mapbook.
> 
> For issue 1, I think you are going to need "fieldnameX" for each layer 
> you are querying.  As your service is now configured, I would expect 
> it to only query Layer0 using fieldname0 and value0.  I do not believe 
> you will be able to query across multiple layers with one value 
> without some custom coding of query.php.
> 
> Len
> 
> -----Original Message-----
> From: Johan Forsman [mailto:Johan.Forsman at LA.GOV]
> Sent: Wednesday, June 16, 2010 2:08 PM
> To: geomoose-users at lists.sourceforge.net
> Subject: [Geomoose-users] query.php configuration confusion
> 
> All:
> 
> Two issues to seek advice on this afternoon.
> 
> Platform is GM2.2, using webmaps as base with EPSG:900913 in the 
> mapbook and settings.ini files. Source data is in EPSG:26915, being 
> projected on- the-fly by MapServer to EPSG:900913. All layers I have 
> render very nicely in all the right spots.
> 
> Issue 1:
> I would like to use the new query.php function to search several 
> tables in my PostGIS from one dialog. I have looked at the examples in 
> the documentation but it appears I am not fully comprehending the syntax.
> 
> I have 5 layers I wish to search, each has its own table in PostGIS.
> 6 of the layers/tables have 2 identical fieldnames I wish to be able 
> to search on, "pwsid" and "sysname".
> The remaining table has two fields I wish to be able to search on, 
> "regowner" and "newid" (ignore layer4 for now).
> 
> I used the "query.php" block from the demo mapbook and added/replaced 
> my own layers.
> When I test the query layer0 and layer1 are turned on in the map, but 
> results are only returned for layer0.
> 
> I have a <input type...layer? for each layer.
> I have a <input type...template? for each layer entry, but they all 
> use value="itemquery" since each layer definition in the referenced 
> mapfiles have unique templates defined there.
> 
> I am suspecting the problem lies somewhere with the "fieldname0" and 
> "value0" parameters? In fieldname0 I have included all 4 of the 
> fields, from 5 different tables, I wish to be able to specify the search from.
> 
> At the bottom of this message I have placed the query.php block as it 
> looks currently. Please ignore the square footage bit; it's remaining 
> from the demo, and I don't have an immediate need for the boolean functions.
> 
> I have been unable to stitch together a series of input types that 
> covers the bases. Does someone on the list have a query block to share 
> that does this that I may model mine after?
> 
> 
> Issue 2:
> All the layers plot where they should, but the highlights from the 
> query results plot in Algeria. To emphasise, ONLY the highlights plot 
> in the wrong place.  Clearly a projection error, but where? This also 
> happens with the old itemquery.php since I switched from using 
> EPSG:26915 in my mapbook to EPSG:900913.
> 
> Thanks for taking the time!
> And I do apologize for the rudimentary XML skills that are apparently 
> absent in my mapbook.
> 
> /Johan.
> 
> ----------------------
> 	<service name="search_facilities">
> 		<url>php/query.php</url>
> 		<step type="input">
> 			<input type="hidden" name="highlight" value="true"/>
> 			<input type="hidden" name="mode" value="search"/>
> 
> 			<input type="hidden" name="layer0"
> value="wells/sdwis_wells"/>
> 			<input type="hidden" name="layer1"
> value="surfacewater/intakes"/>
> 			<input type="hidden" name="layer2"
> value="surfacewater/treatmentplants"/>
> 			<input type="hidden" name="layer3" value="storage/all"/>
> 			<input type="hidden" name="layer4"
> value="wells/swap_wells"/>
> 			<input type="hidden" name="layer5"
> value="wells/ldotd_all"/>
> 
> 			<input type="hidden" name="template0"
> value="itemquery"/>
> 			<input type="hidden" name="template1"
> value="itemquery"/>
> 			<input type="hidden" name="template2"
> value="itemquery"/>
> 			<input type="hidden" name="template3"
> value="itemquery"/>
> 			<input type="hidden" name="template4"
> value="itemquery"/>
> 			<input type="hidden" name="template5"
> value="itemquery"/>
> 
> 			<input type="select" name="fieldname0" title="Search By:">
> 				<option value="sysname">System Name</option>
> 				<option value="pwsid">PWSID</option>
> 				<option value="regowner">Registered owner</option>
> 				<option value="newid">Well id number</option>
> 			</input>
> 			<input type="select" name="comparitor0" title="That: ">
> 				<option value="like-icase">Contains</option>
> 				<option value="right-like-icase">Begins With</option>
> 				<option value="eq-str">Matches Exactly</option>
> 			</input>
> 			<input type="user" name="value0" title=""/>
> 
> 			<input type="hidden" name="fieldname1"
> value="FIN_SQ_FT"/>
> 			<input type="select" name="operator1">
> 				<option value="or">OR</option>
> 				<option value="and">AND</option>
> 			</input>
> 			<input type="select" name="comparitor1" title="Having Fin. Sq. Ft. 
> ">
> 				<option value="gt">Greater Than</option>
> 				<option value="eq">Equal To</option>
> 				<option value="lt">Less Than</option>
> 			</input>
> 			<input type="user" name="value1" title=""/>
> 		</step>
> 	</service>
> 
> 
> ----------------------------------------------------------------------
> ----
> ----
> ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad 
> Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit.  
> See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Geomoose-users mailing list
> Geomoose-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geomoose-users




More information about the Geomoose-users mailing list