3

I'm a mediocre to intermediate ArcGIS user. I have created several point shapefiles, one for each section of a national cemetery, roughly 200-600 points in each section in a grid. Attached to these points in the attribute table are the names of the people buried there, along with some fields such as rank, honors, etc.

I've attached a screenshot so you get the idea.

I'd like to write a program (should be pretty simple) to query this map and highlight different attributes on command. For example, if I wanted to see where all the members of the 7th Cavalry are buried, I could just enter "7th_Cav" (or whatever string I wanted). The idea is that someone with limited GIS experience (like many of the people I work with) could use this program.

6
  • 1
    Do you want this program/tool to run within ArcMap?
    – ianbroad
    Jan 21, 2015 at 1:59
  • If it would be more simple that way, then sure. I guess I'm envisioning a script where they enter a string of interest (i.e. "Fort_Buford") and the map would select or highlight the relevant graves/people.
    – Steve Cary
    Jan 21, 2015 at 2:10
  • Yeah, it just depends on how many different attribute fields there are to query. It sounds like you could basically just have an input box for each field, and then for the query just use wildcards around both ends. So, if you have a field called Name, you could have an input field in the tool called Name, and the query would add wildcards on both ends. So it would be, Name LIKE "%Bob%" - and do that for each field, while adding to the selection. It just depends on how fancy you want to get.
    – ianbroad
    Jan 21, 2015 at 2:16
  • Could you elaborate a little on what "wildcards" are? I'm pretty new to programming.
    – Steve Cary
    Jan 21, 2015 at 2:21
  • It's so if someone typed Bob as the name it would return Bobby or Bob Jones or Carl Bobbleton. Anything that has Bob in it. Google it for a better explanation. Honestly, a webmap would be cool for this, but also more work than a geoprocessing tool. Someone else might have a good idea.
    – ianbroad
    Jan 21, 2015 at 2:28

1 Answer 1

1

I may be able to weigh in here, as I did a similar cemetery project a few years back.

It is not too difficult to use a python script to pass variables through to an SQL statement to select certain graves, but it can become very frustrating if you are unfamiliar with the syntax. It is a good idea to search this site for hints like Including variable in where clause of arcpy.Select_analysis()? and Multi Value User Input as Variable in SQL Statement

A relevant bit of advice in this situation is 'if you fail to plan, you plan to fail'. Will the graves be divided into several feature classes (as they appear to be in the TOC), or merged into one large feature? Will the user be able to select or enter multiple 'honors' for one individual? How much experience does the user have with ArcMap - will they be able to open the attribute table if more than one grave is selected?

Additionally, are you sure you want people to be able to manually enter something like "7th_Cav"? It may be easier to use a value list with preselected values. For example, you could have a parameter named 'rank', and select Filter > Value List in the Parameter Properties at the bottom of the Parameters tab to create a list that the user may choose from.

From my experience, it is easier in the long run if you limit what people can enter in the queries. It may initially be more difficult to setup and write a script, but can save you time overall.

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