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 have a question regarding the address locator in ArcGIS. It is possible to create an address locator by using Python, but is it also possible to run an address locator via Python? This means, is there any Python code that does the same as the address locator toolbar in ArcGIS? The code should get the address by an user and should then locate the address and zoom on it.

I would be happy about any suggestions.

share|improve this question

3 Answers 3

up vote 3 down vote accepted

I think you are looking for GeocodeAddresses_geocoding. I'm personally still trying to get it to work, so if you get it, feel free to share!

share|improve this answer
    
I will give it a try, it seems to be the most promising solution. –  Sven Dec 31 '12 at 20:47

Yes,

Create address locator

Once you have an address event layer you could create a python add-in that queries/selects features (Select Layer By Attribute) then zooms (use Data Frame method - zoomToSelectedFeatures ()) to the selected features.

share|improve this answer
    
But this is the code to create an address locator. Is there a way to give the python code an address and the code then searches for the coordinates? –  Sven Dec 26 '12 at 12:58

I do not believe there is direct way to do what you are wanting to do. If you have an address layer then you could query for the text, then just zoom to the feature. The only option I believe you have is to use an address locater web service to pass the address and get back XYs, then you could just zoom on the XYs.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.