2

I have a streets feature class that has name, from, and to fields. Using this feature class, I want to zoom to locations such as these:

  1. Main St, from 1st Ave to 2nd Ave (single feature)
  2. Main St, from 2nd Ave to 5th Ave (multiple features)

Note: My street names aren't actually numerical in reality. I just used street names like 2nd Ave and 5th Ave because it's easy to imagine what comes in between.

I can do a couple of similar things using the Find tool:

  • Search for a street by name
  • Search for a specific address

However, these options aren't the same thing as searching for a street stretch, using the from and to in conjunction with the name.

How can I search & zoom to a street stretch using the name, from, and to fields?


I don't know if it's relevant or not, but there is a fourth field, sort (integer) that orders the features from west to east, south to north.

  • I suppose scenario #1 could be described as search and zoom (for single feature) using multiple fields. But scenario #2 is a little more complicated than that. – Wilson Sep 23 '17 at 23:23
  • 1
    It is network analyst task to find route between nodes. – FelixIP Sep 24 '17 at 3:04
2

For scenario 2 you can try Select by attributes using the expression:

"Name"='Main St' AND left("From",1) > 1 AND left("From",1) < 5

I don't use ArcGIS anymore (cheapskate company moved to QGIS) so I can't test the expression. Should point you in the right direction though

  • Sorry for the confusion. My street names aren't actually numerical in reality. I just used street names like 2nd Ave and 5th Ave because it's easy to imagine what comes in between. – Wilson Oct 29 '17 at 10:36
0

I can use a subquery when selecting by attributes. This query makes use of the sort field.

objectid in
(SELECT objectid FROM roads 
WHERE   
    name = 'Main St'
    AND sort Between 
                (select sort from roads where name = 'Main St' and from_ = '2nd Ave')
                and (select sort from roads where name = 'Main St' and to_ = '5th Ave'))

I use a similar technique in a question here: Select rows where column values don't match the domain.

The holy grail would be something with parameters such as a python add-in. But I'm horrible with python, so I'm not going to attempt this right now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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