2

I already tried to find the solution for my problem in any of the previous answers for similar problems, but none of it works for me.

I have two polygon shapefiles and would like to do a spatial join based on a certain field.

One polygon shapefile contains count-data for different dates. Each polygon refers to a certain date, but there could be several polygons for the same date at different locations. Each polygon is in a different row, so the date is also shown in rows.

Then I have a second polygon shapefile containing the cropstatus for different fields (parcels) at different dates of the year. The different fields (parcels) and corresponding information are listed in rows and the date with the corresponding cropstatus is in columns.

Now I would like to spatially join the count-data polygons with the cropstatus polygons based on a certain date (using the centerpoint of the count-data polygons). The result should be a new file with all count-data-polygons having a certain cropstatus at the appropiate date.

Unfortunately, I don't have any experience with Python scripting.

I'm using ArcGIS 10.2 and Windows 7

Here is an example of my data:

Pink circles/ellipses are birdcounts on different days and/or areas, and the filled polygons indicate different fields (parcels). Different colours have different cropstatus/fieldstatus.

enter image description here

And here are examples of my attribute tables:

These are the bird counts with polygons for different days and/or areas (Antal...=Number of birds).

enter image description here

This is the attribute table of the cropstatus. The different fields (parcels) are in lines and the date of the field status is in columns (fields).

enter image description here

Both attribute tables have much more columns than shown here with further information. Also, the dates for the cropstatus range from 13.Sept.2013 to 31.Dec.2013, so Johns suggestion of spatially joining each date separately will take too long.

  • Please add which license level you have as it affects which tools are available. – Stefan Nov 19 '14 at 15:52
  • Hi Stefan, thanks for your quick answer. I have the advanced licence level. – jkda Nov 19 '14 at 17:41
  • Does this provide any guidance? gis.stackexchange.com/questions/43238/… If you don't have a lot of dates you could run split by attributes on each, spatially join those with the matching dates, then merge the results. – johns Nov 19 '14 at 21:23
  • This sounds like you need to create a new attribute field to use for a unique join key. Right now you have polygon id and date as two attributes, so neither uniquely identifies a single row. However, if you create a new field based on a combination of the two, you should end up with a field you can join the two tables on. Another possible alternative might be the Make Query Table tool, as I believe that allows you to match on multiple fields rather than just one. Also, a screenshot of your tables would be helpful. – Chris W Nov 19 '14 at 21:30
2

You could try using the Spatial Join (Analysis) tool. It allows many options for you to customize the end result. Hopefully it will be helpful in what you are needing to do. enter image description here

  • Hi Nomkins, thanks for your answer. I already tried this tool. But I can only perform a spatial join with it and can't select the attributes based on a certaind date, additioanlly. At least, I couldn't figure it out how it should be possible. – jkda Nov 19 '14 at 17:47
  • 1
    Your output should have the attributes of each input feature, i.e. data_count_date and crop_date. From the results of the spatial join can select out just the features you want based on a selection? e.g. data_count date = crop_date – Dowlers Nov 19 '14 at 21:03
  • Hi Dowlers, thanks. I will try it, but I think that won't work, as the crop_date is not an attribute but a field (column). I include screenshots of my tables for better understanding. – jkda Nov 20 '14 at 8:33
  • 2
    Have a look at the Transpose Fields tool. Maybe you can transpose the dates to rows first and then do the join and select as proposed by Dowlers. – Stefan Nov 20 '14 at 9:45
  • 1
    Hi Stefan (and Dowlers), thanks a million!!! With the "Transpose Field Tool", then spatially joining, and then selecting the appropriate attributes it worked! Transposing was the clue. Thank you very much!!! – jkda Nov 20 '14 at 11:08
1

The key solution for that problem was given by Stefan, suggesting to use the "Transpose Field Tool" first on the table with dates as fields, then do a spatial join and then select features based on attributes.

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.