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 learning to write a python code for ArcGis 10.2. Need help!

  1. I have some shp poly lines file, need to learn how to write multiple selection of those lines, even if a cursor of mouse pressed not exactly on line but near of it.
  2. By selecting one vertex, on the cross place of lines should be selected all the vertexes.

Will be thankful for all ideas of algorithms and methods, or reading materials, since I am not good familiar with programming algorithms, but I know the Python. Thanks in advance!

share|improve this question
    
(+1 so you can post a picture soon.) Since you are Python proficient, could you please post some pseudo code outlining what you are trying to do? I'm not really sure what you want for 2). –  Paul Aug 14 '13 at 15:02
    
I am not a good python proficient, studied it by my self on codeacademy.com. For this task I didn't wrote anything yet, just trying to read arcgis 10.2 tutorial about how to write scripts there. A teacher gave me task to write a code for geometric data, by choosing the line (even if cursor wasn't exactly on the line but near of it) the line should be selected anyway. That was first task, it would be good if I could understood how to write it first. –  DiGiS Aug 14 '13 at 15:26
    
Are you looking to emulate Select Features? –  Paul Aug 14 '13 at 15:30
    
yes, but I need to learn write an algorithm for to do that kind of task. where I can see some examples maybe? –  DiGiS Aug 14 '13 at 17:37
add comment

1 Answer

Since you expressed that you knew some Python, I think you'll want to design a Python add-in.

You can create a tool that gives you access to lots of functions that would be useful for selections such as

onRectangle()--Occurs when the mouse button is released after the rectangle is drawn on the map

share|improve this answer
    
thanks for all answeres!!! will check and try soon all the coments. In matlab i did learn how to write a function "if the pont in polygon or not", is that possible to do that kind of function for ArcGis, with the python help? That will be close to my task. –  DiGiS Aug 16 '13 at 23:39
    
@DiGiS, yes you can; I've actually implemented a point in polygon function that I used in a workflow. I used this code. –  Paul Aug 17 '13 at 0:41
add comment

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.