[Geomoose-users] select and query in postgis layers

Luis Calisto luis.calisto at hotmail.com
Tue Feb 19 10:07:52 PST 2013


Hi
i'm working with geomoose version 2.6.1
I have some layers in shapefile but the most part is postgis.Everything is ok except that with the postgis layers the select and the query services do not work. The select returns well the attributes but says that "Found Shapes: 0" and does not highlight any feature. The query service return no value at all. The select and the query service is fine with the shapefile based layers and the identify service is fine with both layers.
I followed the documentation in the demo but this documentation is made for shapefiles, maybe something is missing with my config. 
Anyone can help?
Thanks

My configs are the folowing:
mapbook describing the query and the select services:
<service name="buffered_select" title="Select Features">		<url>php/select.php</url>
		<!-- Send a selection shape + the visible layers list to the service -->		<step type="spatial" showTools="true" name="shape" line="true" polygon="true" point="true" default="polygon" edit-polygon="false" pan="false">
			<header><![CDATA[Create a selection area by clicking on the map.]]></header>
			<input type="visiblelayers" name="layers"/>
			<!-- 				Option values should be the mapbook path to the layer.				This only supports 'mapserver'-type layers.			-->			<input type="select" name="select_layer" title="Select features from:">				<option value="pontos_demo/pontos_demo">Pontos_demo</option>				<option value="pontos_shp/pontos_shp">Pontos_shp</option>				<option value="prov_shp/prov_shp">prov_shp</option>			</input>						<!--			<input type="user" name="select_buffer" title="Buffer Selected Features (m)">0</input>			-->
			<input type="length" name="selection_buffer" title="Buffer Selection Shape">0</input>			<input type="select" name="query_layer" title="Using Features In">				<option value="">No Layer</option>				<option value="pontos_demo/pontos_demo">Pontos_demo</option>				<option value="pontos_shp/pontos_shp">Pontos_shp</option>				<option value="prov_shp/prov_shp">prov_shp</option>			</input>			<input type="projection" name="projection"/>
			<footnote><![CDATA[			]]></footnote>		</step>	</service>----------------------------------------------------------------------------------------------------------------------------------------------	<service name="search_parcels" title="Search">		<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="pontos_demo/pontos_demo"/>			<input type="hidden" name="template0" value="itemquery"/>
			<input type="select" name="fieldname0" title="Search By:">				<option value="gid">ID</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>				<option value="in">In List</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>---------------------------------------------------------------------------------
map file of the postgis layer:

MAP	NAME 'pontos_demo'	SIZE 800 650	STATUS ON	EXTENT  19.069345 -27.742864 51.134315 -9.525530
	UNITS METERS
	INCLUDE "../../geomoose_globals.map"
	WEB		METADATA			'ows_title' 'Pontos'			'ows_srs' 'EPSG:4326 EPSG:3857'			'ows_enable_request' '*'			'ows_onlineresource' 'http://www.geomoose.org'		END	END
	PROJECTION		'init=epsg:4326'	END
	LEGEND	      STATUS ON	      LABEL		TYPE TRUETYPE		FONT vera_sans		SIZE 8		COLOR 0 0 0	      END			END	    	LAYER  	  NAME 'pontos_demo'	    TYPE POINT 	   DUMP true 	 EXTENT 19.069345 -27.742864 51.134315 -9.525530  	  CONNECTIONTYPE postgis  	  CONNECTION "dbname='atlas_mz' host=localhost port=5432 user='postgres' password='postgis' sslmode=disable"  	  DATA 'the_geom FROM "public"."pontos_sportgis" USING UNIQUE gid USING srid=4326'
      LABELITEM 'tipo_infra'		LABELCACHE ON		LABELMAXSCALE 500000    CLASSITEM 'tipo'    CLASS      NAME "Estadio"       EXPRESSION "1"        STYLE         SYMBOL "circle"          SIZE 17.0          OUTLINECOLOR 0 0 0         COLOR 0 0 0       END     LABEL       FONT vera_sans      TYPE truetype      SIZE 13      COLOR 0 0 0      ANGLE 0      POSITION auto      FORCE true      ANTIALIAS true      PARTIALS true     END     END    CLASS      NAME "Campo de futebol"       EXPRESSION "2"        STYLE         SYMBOL "circle"          SIZE 12          OUTLINECOLOR 0 0 0         COLOR 255 170 0       END     LABEL       FONT vera_sans      TYPE truetype      SIZE 9      COLOR 0 0 0      ANGLE 0      POSITION auto      #FORCE true      ANTIALIAS true      PARTIALS true     END     END    CLASS      NAME "Campo de tenis"       EXPRESSION "3"        STYLE         SYMBOL "circle"          SIZE 7.0          OUTLINECOLOR 0 0 0         COLOR 255 0 0       END     LABEL       FONT vera_sans      TYPE truetype      SIZE 9      COLOR 0 0 0      ANGLE 0      POSITION auto      #FORCE true      ANTIALIAS true      PARTIALS true     END     END

		METADATA			# drill-down identify service record.	      		'identify_record'	'templates/identify.html'
			# query.php / "Search Parcels" functionality.			'itemquery'	'templates/search_result.html'			'itemquery-filter'	'/.*[qstring].*/i' 			'qstring_validation_pattern' '.'						# Feature reports are stored in the conf/feature_report directory.			'feature_report' 'parcel.xml'
	      		'select_record'	'templates/select_result.html'			'select_header' 'templates/select_header.html'			'popups' 'parcels_popup.html'
		END		TOLERANCE 1		TOLERANCEUNITS PIXELS


  	  END  END ## end Map

-------------------------------postgis table:-------------------------------CREATE TABLE public.pontos_sportgis(  gid integer NOT NULL DEFAULT nextval('pontos_sportgis_gid_seq'::regclass),  the_geom geometry(MultiPoint,4326),  tipo_infra character varying(80),  fotografia character varying(80),  tipo smallint,  nome character(50),  CONSTRAINT pontos_sportgis_pkey PRIMARY KEY (gid ))WITH (  OIDS=FALSE);ALTER TABLE public.pontos_sportgis  OWNER TO postgres;
CREATE INDEX sidx_pontos_sportgis_the_geom  ON public.pontos_sportgis  USING gist  (the_geom );

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20130219/33ba4951/attachment-0001.html>


More information about the Geomoose-users mailing list