Select to view content in your preferred language

Content of text box from attribute

686
2
04-07-2014 10:19 AM
JennTuomala
New Contributor
I have a set of property boundary polygons.  Each property is visited each year and a GPS track is recorded. I have to make a map for each property, every year, showing the boundary and that year's track.

It's a very simple map.  The layout needs to include the property name (from the polygon attribute table) and the date of the visit (from the GPS track shapefile).

I'm looking for an efficient template set-up that will allow me to reduce both time spent making the maps and the errors that come from manually editing the layout every time.  Errors have really been an issue in the past, so it's important to pull the info from the shapefiles.

The vision is to have one mxd that is used as a template.  Zoom to the relevant property, drop in the new GPS track, variables are automatically filled in, export to PDF, done.  Close mxd without saving or remove the track and put in the next one and repeat.  I think this could work because every track is saved with the same name, so they could be interchangeable.

My first thought was to put all my boundary polygons into one shapefile and use that as the index layer with data driven pages.  That populates the property name on the map layout and makes it simple to navigate to the individual properties.  So far this works.  The name of the property shown on the map changes with the property shown.  Ok.

My problem is getting the date on the map to come from the date in the GPS track.  It can't be a dynamic text box because it's not the index layer.  I suspect this is a python problem, but I only know enough python to know that I'm out of my depth.  I've found lots of examples that only get me part way there.

Every GPS track shapefile has the same name.  It has the same fields (FID, shape, date, time) and only one row.  This doesn't change.  It seems like I should be able to connect to that pretty easily and use it to fill in the date in the text box on the map layout.  They are all stored in separate places, though, so I was looking for a way to get the date always from the one currently loaded in the map.

I'm not married to the idea of data driven pages, though, so if there's a different way to go about this problem, I'm open to it.

I'm using ArcGIS 10.2 for Desktop, Standard

Thanks
Tags (2)
0 Kudos
2 Replies
TrishRice
Deactivated User
I agree that DDP is probably the way to go.  My first thought is to field join the data from your GPS files into your polygons, so that the date attribute is associated with the polygons.  But since you have many different GPS files it's not as simple as joining one file to another.  It would take getting all the GPS tracks listed in one file and each track knowing which polygon each belongs to.  That can be done a variety of ways depending on your needs.

One way would be to merge the GPS tracks so they are all in one layer.  Then do a spatial join so that the tracks get an attribute field containing the ID of the polygon they are inside.  (I'm assuming that the tracks fit inside their respective polygons; if they cross the boundary it can still be done with a few more steps.)  Do a table join so that your polygon file, which is your DDP index layer, gains the attributes of the tracks and now the date field can be presented as dynamic text.

Another option is to add a field to the polygons containing the path to their respective track files.  Since the file names do not change you would only have to do this part once.  Add a new field which will be populated with dates.  I'm sure Python has a way to copy/paste values from one file into another when the file path is specified.  Though like you, that kind of coding is over my head so someone else will need to assist.

Both these methods require you to run the tool again when you receive new GPS files so that the date field gets updated.  Sure beats changing it by hand, though. 🙂
0 Kudos
JennTuomala
New Contributor
Getting the date from the GPS track needs to be easier for the user than just typing in the text box, which is super easy.  Anything more complicated and the user will just change the date manually (which is error prone).  So I'm really looking for something simple and automatic.  The name of the track shapefile never changes, but the path to it does, so I'm also looking for something that can work with the shapefile that's loaded into the map.

Thank you very much for your suggestions, though.  It's always good to get a response and hear different ways of thinking about a problem.


....join the data from your GPS files into your polygons, so that the date attribute is associated with the polygons....merge the GPS tracks so they are all in one layer.  Then do a spatial join so that the tracks get an attribute field containing the ID of the polygon they are inside....add a field to the polygons containing the path to their respective track files.  Since the file names do not change you would only have to do this part once....
0 Kudos