Spatial relation for related report

1300
5
Jump to solution
04-13-2021 10:23 AM
Marie-JoëlleDesgagné
New Contributor III

Hi, here is my issue: 

I have a polygon layer representing the house lots of a city (layer name is ''Lots''). Each polygon contains fields regarding the owners (ex: phone number, name, email address, etc). I created a report from this layer with this information and everything works perfectly. 

Now I would like to add a related report to summarize the trees and shrubs that are within each lot. This information if contained on another layer. To do so, I need to have add relate or create a relationship class. The problem is that it looks like I can't do a spatial relation. It seems like I need a common field to relate attributes. 

Here is a picture of what I am trying to do.

Thank you so much for your time and help!

 

0 Kudos
1 Solution

Accepted Solutions
DanLee
by Esri Regular Contributor
Esri Regular Contributor

You can get the needed information in the following way:

  1. Run Near tool on the tree points, using the Lots as the Near Features. All the points inside the same lot polygon will get the same NEAR_FID (lot) value.
  2. Run Summary Statistics on the points with NEAR_FID and tree-type fields as the Case Fields. For Statistics Fields, specify tree-type field as the Field and Count as Statistic Type. The output should have the information you want: NEAR_FID (i.e. lot FID), tree types, and count of each tree type.DanLee_0-1618418730568.png

 

There is a way to create a pdf report. Here is what I know.

  1. After step 1 above, right-click the point layer (your tree point layer) and select “New Report” to open the Create New Report pane. Leave the defaults and Click Next.
  2. On the next page, unselect all fields except NEAR_FID and TREE_TYPE. Click Next.
  3. Enter the information as shown below. Click Next.                                                                                                  DanLee_2-1618419147579.png

     

  4. Specify the basic summary template. Then click Finish.                                                                                         DanLee_3-1618419279188.png

     

  5. Go to the Share ribbon and click Export Report.                                                                                                   DanLee_4-1618419436021.png

     

  6. You can modify the output pdf file name if you like. Then click Export. When it's done, you can view the report. For each polygon, i.e. lot in your case, you should see the tree types and counts.                    DanLee_5-1618419681929.png

The report is not formatted as shown in your example. If you need further help with formatting, I can ask an expert colleague to help you.

View solution in original post

0 Kudos
5 Replies
DanLee
by Esri Regular Contributor
Esri Regular Contributor

You can get the needed information in the following way:

  1. Run Near tool on the tree points, using the Lots as the Near Features. All the points inside the same lot polygon will get the same NEAR_FID (lot) value.
  2. Run Summary Statistics on the points with NEAR_FID and tree-type fields as the Case Fields. For Statistics Fields, specify tree-type field as the Field and Count as Statistic Type. The output should have the information you want: NEAR_FID (i.e. lot FID), tree types, and count of each tree type.DanLee_0-1618418730568.png

 

There is a way to create a pdf report. Here is what I know.

  1. After step 1 above, right-click the point layer (your tree point layer) and select “New Report” to open the Create New Report pane. Leave the defaults and Click Next.
  2. On the next page, unselect all fields except NEAR_FID and TREE_TYPE. Click Next.
  3. Enter the information as shown below. Click Next.                                                                                                  DanLee_2-1618419147579.png

     

  4. Specify the basic summary template. Then click Finish.                                                                                         DanLee_3-1618419279188.png

     

  5. Go to the Share ribbon and click Export Report.                                                                                                   DanLee_4-1618419436021.png

     

  6. You can modify the output pdf file name if you like. Then click Export. When it's done, you can view the report. For each polygon, i.e. lot in your case, you should see the tree types and counts.                    DanLee_5-1618419681929.png

The report is not formatted as shown in your example. If you need further help with formatting, I can ask an expert colleague to help you.

0 Kudos
Marie-JoëlleDesgagné
New Contributor III

Hi Dan,

Thank you so much for your answer. That is almost what I need. I forgot to mention that my tree layer will be edited during all summer. Does that mean I will have to run Near tool and summary statistics on the tree points, using the Lots as the Near Features every time I add points to my tree layer?

Thank you !

0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor

You are welcome. It depends on what editing you will be doing. If you discovered additional trees and added them to your layer, or if some trees died and were deleted, then yes, you need to redo the process. If there will be no add/delete to the layer, then you don't need to redo the process; the statistics will remain unchanged.

0 Kudos
Marie-JoëlleDesgagné
New Contributor III

Ok thank you. Do you think there would be a way to do it dynamically ? I guess I would need to write some python script?

0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor

If you don't need to generate the pdf report, then you can put the tools in the two-step process in a model or a script for repeating the process when you need. I am not sure if the pdf report part can be done in scripting. Let me know if you need that. I will find out.