[Geomoose-users] Identify and itemquery (Search)

Dan Little danlittle at yahoo.com
Mon Oct 26 11:16:02 EDT 2009


This could be an issue with the wildcard flag, change the appropriate setting (sorry, I cannot remember it off hand) from ".*[qstring.*" to "%[qstring]%".  I will try to look at this in the afternoon when my work will be more geomoose centric.


----- Original Message ----
> From: Michael Reynolds <Mike.Reynolds at dot.state.mn.us>
> To: geomoose-users at lists.sourceforge.net
> Sent: Mon, October 26, 2009 9:56:41 AM
> Subject: Re: [Geomoose-users] Identify and itemquery (Search)
> 
> Update:  hadn't tried this before...I left the Search By: text box empty and hit 
> "Go!"  The itemquery.php returned everyone of the features.
> 
> So now I'm down to trying to figure out why it can't find specific values.
> 
> Mind numbing debugging details follow:
> 
> The feature attribute name is CABINET_ID (all caps), the values I can't find 
> include but not limited to A05W, A05Y, A12X, etc (all caps too, no padded 
> spaces).
> 
> $queryString eventually = /.*A05W.*/i as an example around line 91 of 
> itemquery.php
> 
> $queryLayer->set('filteritem', $queryItem);  where $queryItem = 'CABINET_ID'
> 
> $queryLayer->queryByRect($queryLayer->getExtent()); where 
> $queryLayer->getExtent() = ms_rect_obj Object ( [_handle_] => Resource id #41 
> [minx] => 189783.56 [miny] => 4816309.33 [maxx] => 761653.524114 [maxy] => 
> 5472346.5 )
> 
> then ...
> 
> $queryLayer->open();
> $numResults = $queryLayer->getNumResults();
> 
> and $numResults = 0 
> 
> Should be at least 1.  Returns 762 if I don't search a specific value; the total 
> number of features in the layer.
> 
> I've tried with the METAFILE entry 'itemquery-filteritem' 'CABINET_ID' in and 
> commented out leaving it to the service to pass the filteritem.  Neither made a 
> difference; it seems either way its passing the correct thing.
> 
> Is my mapfile DATA line not compatible with adding a filter operation?
> 
> DATA 'SHAPE FROM username.LIT_CABINETS USING UNIQUE OBJECTID'
> or (i've tried simple and advanced)
> DATA 'SHAPE FROM (SELECT OBJECTID, CABINET_ID, SYSTEM_ID, LAYOUT_URL,  
> ROADWAY_NAME, DATE_LOGGED, DATE_INSTALLED, DATE_TURNON, DATE_RETIRED, LOCATION,  
> QUAD, METER_VENDOR, METER_ACCOUNT, METER_ADDRESS, METER_NBR, PREMISE_NBR,  
> OWNER_CODE, CABINET_TYPE, CABINET_VOLTS, GEOMSRC_CODE, SHAPE, GLOBALID FROM 
> username.LIT_CABINETS) USING UNIQUE OBJECTID' 
> 
> 
> >>> "Michael Reynolds" 10/26/2009 8:57 AM >>>
> Your suggestion fixed the !$queryLayer->getExtent() issue.  
> 
> Still, the search (itemquery) returns no results while an identify works fine.
> 
> I'm going to brush up on and compare identify.php and itemquery.php to see 
> what's diff.
> 
> >>> Dan Little 10/25/2009 8:41 PM >>>
> If you manually set the EXTENT in the LAYER it should fix the problem.
> 
> 
> ----- Original Message ----
> > From: Michael Reynolds 
> > To: geomoose-users at lists.sourceforge.net 
> > Sent: Sun, October 25, 2009 12:18:47 PM
> > Subject: [Geomoose-users] Identify and itemquery (Search)
> > 
> > I have a feature class in oracle that displays fine in geomoose.  The identify 
> 
> > tool also works with this layer.  The problem is, I cannot get the Search 
> > service to work.
> > 
> > I feel I'm close if the data displays and I can identify a feature.  But why 
> > would the itemquery.php not work?  I receive no errors but the info tab says 
> "no 
> > results found for your query".
> > 
> > When I watched what was going on in the itemquery.php I found that 
> > $queryLayer->getExtent() against this particular layer is returning no extent 
> or 
> > zero values.  This seems to indicate bad communication between itemquery.php, 
> > mapserver, and oraclespatial. 
> > 
> > Anyone familiar with mapserver oraclespatial connections that can give me a 
> tip 
> > on my DATA line in my mapfile or any other tips? 
> > 
> > My map-source in the mapbook.xml looks like this:
> > 
> >    
> >         ./mte/lighting/lit_cabinets.map
> >        
> >    
> > 
> > 
> > My service in the mapbook.xml looks like this:
> > 
> >    
> >         php/itemquery.php
> >        
> >            
> >                 Cabinet ID
> >                 System ID
> >            
> >            
> >            
> > value="lit_cabinets/lit_cabinets"/>
> >            
> >            
> >        
> >    
> > 
> > My layer in the mapbook.xml looks like this:
> > 
> >                    
> > 
> > The mapfile looks like this:
> > 
> > MAP
> >     NAME 'lit_cabinets'
> >     SIZE 800 650
> >     STATUS ON
> >     EXTENT 189783.560000 4816309.330000 761653.524114 5472346.500000
> >     UNITS METERS
> >     FONTSET "../../fonts/fontset.list"
> >     INCLUDE "../../geomoose_globals.map"
> > 
> >     WEB
> >         INCLUDE "../../temp_directory.map"
> >     END
> >    
> >     LEGEND
> >        STATUS ON
> >        LABEL
> >             TYPE TRUETYPE
> >             FONT vera_sans
> >             SIZE 8
> >             COLOR 0 0 0
> >        END        
> >     END    
> > 
> >     LAYER
> >         NAME 'lit_cabinets'
> >        CONNECTIONTYPE oraclespatial
> >        CONNECTION "username/password at tgd"
> >        #DATA 'SHAPE FROM username.LIT_CABINETS USING UNIQUE OBJECTID'
> >        DATA 'SHAPE FROM (SELECT OBJECTID, CABINET_ID, SYSTEM_ID, LAYOUT_URL, 
> > ROADWAY_NAME, DATE_LOGGED, DATE_INSTALLED, DATE_TURNON, DATE_RETIRED, 
> LOCATION, 
> > QUAD, METER_VENDOR, METER_ACCOUNT, METER_ADDRESS, METER_NBR, PREMISE_NBR, 
> > OWNER_CODE, CABINET_TYPE, CABINET_VOLTS, GEOMSRC_CODE, SHAPE, GLOBALID FROM 
> > username.LIT_CABINETS) USING UNIQUE OBJECTID' 
> >         PROCESSING "CLOSE_CONNECTION=DEFER"      
> >         STATUS DEFAULT
> >         TYPE POINT
> >         LABELITEM 'CABINET_ID'
> >         LABELMAXSCALEDENOM 15000
> >         CLASS
> >             NAME 'Cabinets'
> >             STYLE
> >                 SYMBOL 'square'
> >                 COLOR 0 150 150
> >                 SIZE 8
> >             END
> >             LABEL
> >               COLOR 0 50 50
> >               BACKGROUNDCOLOR 200 200 200
> >               TYPE TRUETYPE
> >               FONT verdana
> >               SIZE 8
> >               ANTIALIAS TRUE
> >               POSITION UC
> >               BUFFER 4
> >               OFFSET 5 5
> >             END 
> >         END
> >         METADATA
> >            'identify_record'    'identify_lit_cabinet.html'
> >        #   'select_record'    'select_lit_cabinet.html'
> >         #    'select_header' 'select_header_lit_cabinet.html'
> >         #    'popups' 'lit_pole_popup.html'
> >             'itemquery'    'lit_cabinet_itemquery.html'
> > #            'itemquery-filteritem' 'CABINET_ID'
> >             'itemquery-filter'    '/.*[qstring].*/i' 
> >         #    'qstring_validation_pattern' '.'
> >            
> >         # Feature reports are stored in the conf/feature_report directory.
> >         #    'feature_report' 'lit_pole.xml'
> >         END
> >       TOLERANCE .05              
> >     END 
> > END ## end Map
> > 
> > 
> > 
> > 
> > ------------------------------------------------------------------------------
> > Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> > is the only developer event you need to attend this year. Jumpstart your
> > developing skills, take BlackBerry mobile applications to market and stay 
> > ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> > http://p.sf.net/sfu/devconference 
> > _______________________________________________
> > Geomoose-users mailing list
> > Geomoose-users at lists.sourceforge.net 
> > https://lists.sourceforge.net/lists/listinfo/geomoose-users 
> 
> 
> 
>       
> 
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference 
> _______________________________________________
> Geomoose-users mailing list
> Geomoose-users at lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/geomoose-users 
> 
> 
> 
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference 
> _______________________________________________
> Geomoose-users mailing list
> Geomoose-users at lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/geomoose-users 
> 
> 
> 
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> 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