[Chameleon] RE: LocateByAttribute highlighting issues

Delfos, Jacob jacob.delfos at maunsell.com
Tue Apr 4 18:44:50 EDT 2006


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

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

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



> -----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