[Chameleon] RE: LocateByAttribute highlighting issues

Delfos, Jacob jacob.delfos at maunsell.com
Wed Apr 5 19:58:11 EDT 2006


Dejan,

The actual generating of the shapefile shouldn't take long. In fact,
once it shows the results table, it means the shapefile has already been
made. I guess the delay in having to wait for the results table, and the
map not updating until the code from the results table has been
downloaded (which contains javascript containing instructions to refresh
the map).

Maybe the drawing of the results is slow because it zooms to all
results, which can be a big extents. But I never experienced any real
slowness.... What exactly do you call slow, and how many search results
do you get (out of how many records), and what other data is being
drawn?

Good question about QueryByAttributes layer function. I don't use it
because it only works on the current map extents, and only on layers
that are queryable (i.e. have a template defined). I needed more
flexibility in terms of which layers are searchable, on which
attributes, and at all extents.

Regards,

Jacob
 

> -----Original Message-----
> From: Gambin Dejan [mailto:Dejan.Gambin at pula.hr] 
> Sent: 5 April 2006 16:11
> To: Delfos, Jacob
> Cc: chameleon at lists.maptools.org
> Subject: RE: LocateByAttribute highlighting issues
> 
> Jacob,
> 
> Sorry it was my fault...I have used the wrong layer for searching
> (ANNOTATION) so the layer was POINT not LINE. Regarding the first
> problem of not highlighting the whole set, it seems that 
> sometimes label
> covers the line (labels are sometimes wide and line is short) 
> so I think
> it is OK now.
> 
> Regarding the speed, the slowest thing is happening after showing the
> results table, when the new queryresult shapefile is being 
> drawn on the
> map. This can be pretty slow. I suppose this can't be solved 
> because of
> Chameleon nature? And the last thing - why didn't you use
> QueryByAttributes layer function for this kind of searching? 
> I suppose I
> wouldn't get any speed using it...
> 
> Anyway, thank you very much
> 
> dejan
> 
> > -----Original Message-----
> > From: Delfos, Jacob [mailto:jacob.delfos at maunsell.com] 
> > Sent: Wednesday, April 05, 2006 12:45 AM
> > To: Gambin Dejan
> > Cc: chameleon at lists.maptools.org
> > Subject: RE: LocateByAttribute highlighting issues
> > 
> > 
> > Dejan,
> > 
> > There shouldn't be any reason why it wouldn't list certain 
> > valid results. Can you give an example of something you think 
> > it should have listed which it didn't? (give searchstring and 
> > searched value). For string fields it does a "contains" 
> > check, for number fields an exact match.
> > 
> > The widget doesn't do any manipulation inside a shape object. 
> > In other words, it takes a shape directly from the original 
> > queried layer, and copies it to a new shapefile. This should 
> > not cause any corruption, unless the original shapefile is 
> > corrupt (import from CAD?).
> > 
> > The performance is not optimal, though I found it acceptable 
> > for 'normal' shapefiles. On our server (P4, 3.2GHz) it takes 
> > 2 seconds to search through 70,000 records (from button press 
> > until returned results page). That's worst case scenario (no 
> > result, so searched all records). It can help to decrease the 
> > "maxnumresults" variable, as it will stop when this value is 
> > reached (e.g. will stop immediately for unique results, where 
> > maxnumresults set to 1). Search time would be halved on average.
> > 
> > The search is a simple sequential search, so in order to 
> > optimise it you would have to alphabetically order your data 
> > and rewrite the algorithm to use a binary search. I don't 
> > have plans for this yet..
> > 
> > Bear in mind that Internet Explorer can act up sometimes. For 
> > some inexplicable reason, IE can take ~30 seconds to display 
> > a result that would normally take 1 second. It's as if the 
> > IFRAME is stuck. I do not know why, nor how to fix it (it's a 
> > browser issue, never happens in Firefox). 
> > 
> > Regards,
> > 
> > Jacob
> >  
> > 
> > > -----Original Message-----
> > > From: Gambin Dejan [mailto:Dejan.Gambin at pula.hr]
> > > Sent: 4 April 2006 21:43
> > > To: Delfos, Jacob
> > > Cc: chameleon at lists.maptools.org
> > > Subject: LocateByAttribute highlighting issues
> > > 
> > > Hi,
> > > 
> > > I have some highlighting issues on LocateByAttribute 
> > widget. I have a 
> > > line shapefile (roads). The widget finds the attributes, 
> > lists them in 
> > > a table, but:
> > > 
> > > 1. There are some results in a table which the widget doesn't
> > > highlight.
> > > I suppose you can tell me what can be the reason? Maybe some 
> > > parameters
> > > that you set when you create the queryresultshapefile...(by 
> > the way I
> > > looked into this shapefile and it is OK)...
> > > 
> > > 2. Sometimes, the line is not completely highlighted, only 
> > some points 
> > > on the line are "yellowed", not the whole line (this happens with 
> > > lines that have less "nodes")
> > > 
> > > One more question - is there a way to increase the search 
> > performance? 
> > > It is pretty slow sometimes. Can I index dbf file maybe? Or 
> > something 
> > > else?
> > > 
> > > 
> > > thanks
> > > 
> > > regards, dejan
> > > 
> > 
> 



More information about the Chameleon mailing list