Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

Thanks

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%'
share|improve this 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
    
@Nathan W Sorry - should have put that up originally. Its a MapInfo tab that contains the data currently which has all fields as strings, and a concatenated string field containing field 2, 1 and 3 mentioned in OP. So I guess the query could be something like (sorry for SQL as I try to explain BTW) - ` Select * from <layer> where searchAddr like '%<field1>%' and searchAddr like '%<field2>%' and searchAddr like '%<field3>%' and Town like '%<field4>%' and Postcode like '%<field5>%'. The Easting and Northing for the location are held as Integer ` –  Mark Jun 11 '13 at 14:01
    
Please edit the question text to clarify it. In the question you can use formatting which will make this additional information much more readable. –  underdark Jun 11 '13 at 14:20
    
Slightly off topic - If we were to look to pay someone to knock together such a tool as a 3rd party, what should our expectation be for the 'going rate'? –  Mark Jul 3 '13 at 10:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.