I am migrating some users from MapInfo to QGIS, and before they sign off on it, they want a very simple address search in the same way that we currently have one working in MapBasic. I;ve been having a look around, but can;t seem to get my head around modifiying the quick find and find by attribute plugins which already exist.

Essentially they currently have the following: A mapbasic routine which presents the user with portions of the address which they can fill in

Such as

field 1: Building name/number
field 2: Street Name
field 3: Locality
field 4: Town
field 5: Postcode

The process then queries a specific layer using like statements, returns a list of matching records which when clicked zoom to the relevant address.

They are adamant that using the QGIS query builder is going to be 'too complicated' for these users and want me to simplify the process in QGIS to a similar one to the above.

So we have a vector layer containing addresses available in the project - is it possible to mirror this MapInfo functionality - and if so, can anyone provide me with some guidance or point to a tutorial for doing this type of task.

Edit: 15:22 11/06/2013

To Clarify: The addresses are held in a MapInfo tab file, which is loaded in to the project. All of the fields that would be queried are of type string - there is an additional useful field called searchAddr which has field 2, 1 and 3 concatenated (split by commas). The data also contains the coordinates as integers for each location.

So in terms of code (hopefully, if I use how it works in SQL to explain that will make it clear), we would be doing soemthing like:

Select * from <layer> 
where searchAddr like '%<field1>%' 
and searchAddr like'%<field2>%' 
and searchAddr like '%<field3>%' 
and Town like '%<field4>%' 
and Postcode like '%<field5>%'

Therefore if the user puts in 42 as the House Number in field 1 and postcode AB12 3CD in field 5 the query would be

Select * from <layer> 
where searchAddr like '%42%' 
and searchAddr like'%%' 
and searchAddr like '%%' 
and Town like '%%' 
and Postcode like '%AB12 3CD%'

closed as off-topic by underdark Jan 19 '17 at 21:15

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking help to debug/write/improve code must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Providing a clear problem statement and evidence of a code attempt will help others to help you. See: How to create a Minimal, Complete, and Verifiable example." – underdark
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Hi Nathan - in exactly the same way that they had to have a tool build becuase SQL Select in MI is too complicated I guess #mollycoddled – Mark Jun 11 '13 at 13:08
  • 1
    Do you have a certain datatype this would work against or would you want to be generic e.g work with shape, mapinfo tab, MS SQL, etc – Nathan W Jun 11 '13 at 13:47

Browse other questions tagged or ask your own question.