You are here: > ESRI Forums > arcgis desktop discussion forums > Thread Replies

ArcGIS Desktop Discussion Forums

ArcGIS Desktop - Geoprocessing ModelBuilder forum

Spatial Join in Model Builder   Mike Dolbow Sep 17, 2004
Re: Spatial Join in Model Builder   Matthew Stone Oct 06, 2004
Re: Spatial Join in Model Builder   Kevin Bell Oct 06, 2004
Re: Spatial Join in Model Builder   Ghislain Prince Oct 06, 2004
Re: Spatial Join in Model Builder   Mike Dolbow Oct 07, 2004
Re: Spatial Join in Model Builder   Kevin Bell Oct 07, 2004
Re: Spatial Join in Model Builder   Darryl Hilton Jul 11, 2005
Re: Spatial Join in Model Builder   Antonia-Jane Weston Feb 17, 2006
Re: Spatial Join in Model Builder   Matthew Stone Oct 07, 2004
Re: Spatial Join in Model Builder   Ghislain Prince Oct 07, 2004
Re: Spatial Join in Model Builder   Matthew Stone Oct 08, 2004
Re: Spatial Join in Model Builder   Monique Lapalme Oct 06, 2005
Re: Spatial Join in Model Builder   Antonia-Jane Weston Feb 17, 2006
Re: Spatial Join in Model Builder   Marcelo Rosensaft Apr 23, 2006
Re: Spatial Join in Model Builder   Ghislain Prince Apr 23, 2006
Re: Spatial Join in Model Builder   Simon Jackson May 10, 2006
Re: Spatial Join in Model Builder   Anja Matatko May 12, 2006
Re: Spatial Join in Model Builder   Beth Goralski Sep 10, 2007
Re: Spatial Join in Model Builder   Kevin Morrissey Mar 26, 2008
Re: Spatial Join in Model Builder   kosmas kanasiadis Mar 27, 2008
Re: Spatial Join in Model Builder   Kevin Morrissey Mar 27, 2008
Re: Spatial Join in Model Builder   kosmas kanasiadis Mar 27, 2008
Re: Spatial Join in Model Builder   Kyle Watts Jul 14, 2009
Re: Spatial Join in Model Builder   M Hawkins Jul 30, 2009
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Spatial Join in Model Builder 
Author Mike Dolbow 
Date Sep 17, 2004 
Message Anyone know how to do a spatial join in Model Builder? I've set up a join on the shape fields and that doesn't seem to work - granted, the join dialogue isn't what I expected and I'm not sure I'm using it right...but since spatial joins are essentially a separate entity within ArcGIS, I would think that the same would hold true within ModelBuilder, but I can only find one Join tool. I'd rather not delve into topology and/or relationship classes if I can help it... 
  Mike Dolbow
GIS Coordinator
MN Department of Agriculture 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Spatial Join in Model Builder 
Author Matthew Stone 
Date Oct 06, 2004 
Message I'm looking for the same thing, if you find it before I do, please email me...mstone@dhs.ca.gov


 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Spatial Join in Model Builder 
Author Kevin Bell 
Date Oct 06, 2004 
Message the only way that you can get it done is a total pain, firing off ArcObjects code as it's own tool. for info regarding that see this link.

http://forums.esri.com/thread.asp?c=93&f=983&t=132713 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Spatial Join in Model Builder 
Author Ghislain Prince 
Date Oct 06, 2004 
Message Guys,
attached is a image and a model. This model i used to basically do a "spatial join": i had the US_cities feature class (points with a field for pop1990), and a US_States (polys). I wanted to sum the US_cities's pop1990 by the state they fell in, and transfer that attribute to the appropriate US_State polygon.

Anyways, attached is a model which you can modify. I've also attached a screen shot of it.

I think this is what you guys are looking for/trying to do. Modify the model if it isn't quite it.

You won't be able to calcFields on a joined layer until you receive 90 SP2 (just in case you hit this issue, we have a fix coming).

One last thing is that we're looking at making a core tool to do spatial join. It would be for a later release (not 90 SP2).

Hope this helps. 
  Ghislain Prince
ESRI 
  model.jpg (opens in new window)
SJ Toolbox.tbx (opens in new window)
 
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Spatial Join in Model Builder 
Author Mike Dolbow 
Date Oct 07, 2004 
Message Well, I had found the identity solution in another thread, so that isn't exactly what I was looking for...but it does the trick. And now I know how to use the summary statistics function better, so thanks for that, too!

Good to know they're planning on adding this functionality in the future. 
  Mike Dolbow
GIS Coordinator
MN Department of Agriculture 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Spatial Join in Model Builder 
Author Kevin Bell 
Date Oct 07, 2004 
Message This is great, thanks a bunch... It's not what I need for my task at hand, but i'm sure i'll use it in time.

I need to summarize the nearest features to my join features, because i'm summarizing point data to line data, and the points don't intersect the lines... so i guess i could subsitute IDENTITY with POINT-DISTANCE (for a spatial join with a search tolerance!) but i'll have to figure out the additions to the model, since the outputs are so different.

I'll try it out if i get some time and post it if i get it working, and any insight is welcome! 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Spatial Join in Model Builder 
Author Darryl Hilton 
Date Jul 11, 2005 
Message Does this require an ArcInfo license to run? 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Spatial Join in Model Builder 
Author Antonia-Jane Weston 
Date Feb 17, 2006 
Message
I have tried this Identy solution BUT this has not solved my problem and I was wondering if anyone has developed any other models for Spatial Join yet?

I am new at using Model Builder and I am a non-programmer so if it isn't a model - I need a very simple script that I could incorperate somehow in a model for spatial join (points to polygons that gives me a Count field i.e. exactly what right click on the polygon file allows me to do in ArcMap BUT I ned to make a model in order for quick repetition) and I just can't find one.

This is my first time on ESRI forum so hope this is the way to ask questions!

I have also posted this at http://forums.esri.com/Thread.asp?c=93&f=1728&t=154261#452698 in the hope someone out there will answer!

Thanks in advance,
Antonia (struggerling in the UK!) 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Spatial Join in Model Builder 
Author Matthew Stone 
Date Oct 07, 2004 
Message I appreciate the model and suggestions, however, in my case, I want to join polygon attributes to the point shape file. This example seems to go the other way. Any suggestions on how I might modify? I can still use the wizard from the toolset in ArcMap, but if I could embed in a model, that would be better. 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Spatial Join in Model Builder 
Author Ghislain Prince 
Date Oct 07, 2004 
Message Hey Mattew,
hmmmm, and identity_analysis does not do what you're looking for? Have a look at the doc for that tool and if that isn't it, then post the details.

Sorry if you've done that already or are familiar with the tool. I just don't have much info on what you're trying to do. 
  Ghislain Prince
ESRI 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Spatial Join in Model Builder 
Author Matthew Stone 
Date Oct 08, 2004 
Message Well, I just played with it again and it seems to return what I wanted, via your model. I guess I have been used to doing this in one step in past versions of ArcMap using the join process from the toolbar. But embedding it in a model involves 2 or more steps. Sorry about the confusion...

Matthew 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Spatial Join in Model Builder 
Author Monique Lapalme 
Date Oct 06, 2005 
Message I see from this thread that this model is a year old. I am running ArcView 9.1 and when I tried to edit the model to run it with my data, I saw that with Arcview I am not licenced for the "identify" tool. Is there another solution for Arcview users. 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Spatial Join in Model Builder 
Author Antonia-Jane Weston 
Date Feb 17, 2006 
Message I have tried this Identy solution BUT this has not solved my problem and I was wondering if anyone has developed any other models for Spatial Join yet?

I am new at using Model Builder and I am a non-programmer so if it isn't a model - I need a very simple script that I could incorperate somehow in a model for spatial join (points to polygons that gives me a Count field i.e. exactly what right click on the polygon file allows me to do in ArcMap BUT I ned to make a model in order for quick repetition) and I just can't find one.

This is my first time on ESRI forum so hope this is the way to ask questions!

I have also posted this at http://forums.esri.com/Thread.asp?c=93&f=1728&t=154261#452698 in the hope someone out there will answer!

Thanks in advance,
Antonia (struggerling in the UK!) 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Spatial Join in Model Builder 
Author Marcelo Rosensaft 
Date Apr 23, 2006 
Message Ghislan,

Although this thread is two years old, I'd like to ask you to clearify the "make feature layer" issue in your model. What's the difference between using "make feature layer" and "make table view"? A second question: is there a difference when doing the identity on the feature class and then applying the "make feature layer"?

Thanks,

Marcelo 
  ArcInfo 9.2 with SP2
3D Analyst
Spatial Analyst
 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Spatial Join in Model Builder 
Author Ghislain Prince 
Date Apr 23, 2006 
Message Hi Marcelo,
the difference between MakeFeatureLayer and MakeTableView is what they output. A layer has geometry (like a shapefile or gdb feature class), while a a table view has no geometry, it's just a table.

About the second question, off the top of my head, i'd say there won't be any difference in the output generated. I'd say give it a try and have a good look at the output. Make sure it fits what you're trying to get.

 
  Ghislain Prince
ESRI 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Spatial Join in Model Builder 
Author Simon Jackson 
Date May 10, 2006 
Message Any news on Spatial Join in 9.1?
From what I have scouted around on the forums, it is apparently coming out in 9.2, for model builder that is. I phoned ESRI UK and they couldnt help me (as of yet anyhow). 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Spatial Join in Model Builder 
Author Anja Matatko 
Date May 12, 2006 
Message Yes, you're right, there'll be the spatial join in ArcToolbox in 9.2 :-) 
  Anja Matatko
University Trier, Department of Cartography
http://www.geoinformatik.uni-trier.de/ 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Spatial Join in Model Builder 
Author Beth Goralski 
Date Sep 10, 2007 
Message Hi there,
Quick question (maybe)...
So I have these large lulc shapes that I intersected with a buffer of some geocoded addresses. I would like to find the nearest point in my lulc shapes ie parks, busstops, etc. How do I get my parks frequency table to convert to a feature class in model builder so that i can use the spatial join to figure out which park is nearest to my geocoded address?? The spatial join in the toolbox isn't the same as when you do a spatial join right click.
I can do this in arc map in 5sec! But eventually I'm going to have to do this to multiple sets of addresses so it would help to do it in model builder.
Thanks,
Beth Goralski
ps my email is now goralski@pdx.edu

i also posted this question on the forum today 9/10/07 
  Elizabeth Goralski
Portland State University
Geography Department
GIS I & II Lab Instructor 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Spatial Join in Model Builder 
Author Kevin Morrissey 
Date Mar 26, 2008 
Message The spatial Join command in toolbox does not appear to be able to return nearest objects, while the help screen does indicate a search radius of -1 will do so. Any help on this would be great.

I am trying to pull polygon attributes to points.

I am also curious is there is a live connection of this join still available as there was in ArcView 3x. This would allow for refreshed data on startup - instead of output files.
Thanks

km

Thanks km 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Spatial Join in Model Builder 
Author kosmas kanasiadis 
Date Mar 27, 2008 
Message Hi there,

I want to spatially join "spatial Join" Points to polygons and vice versa (taking the nearest one). I want to do that using model bulder
I am wondering how can I do this since I am using 9.1?
Note that the points do not overlap the polygons.
Therefore, are there any ideas on how you do spatial join into non overlapping features using model builder and arcgis 9.1?
Any help will be appreciated.

Pls HELP!!! 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Spatial Join in Model Builder 
Author Kevin Morrissey 
Date Mar 27, 2008 
Message I was told by ESRI that the tool within the toolbox (therefore the model) is not able to produce the results that the Right Click - Join - Closest Feature procedure produces. There is an option in the tool that allows a user to enter a search radius of "-1" and states it will return the same results (return the closest feature) instead of only true intersecting features. However this tool DOES NOT WORK. They stated a new tool in the toolbox will be available in 9.3 (CLOSEST tool) but at this point - it must be done manualy using the right click - Join - Spatially - process.
Reference Bug Number: NIM006111
km 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Spatial Join in Model Builder 
Author kosmas kanasiadis 
Date Mar 27, 2008 
Message

a bug.....:-)

Thank you for the answer.

I thought to give a try to do a dll file the code. http://edndoc.esri.com/arcobjects/9.0/default.asp?URL=/arcobjects/9.0/Samples/Tables/Perform_a_spatial_join.htm
and then import it as a script in the toolbox.
Have you ever tried to do that?

and again there is no possible way to do spatial join in model builder. Unless you have got 9.2.
Is that correct? 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Spatial Join in Model Builder 
Author Kyle Watts 
Date Jul 14, 2009 
Message Has anyone got an update on this?

I'm trying a join with two point files.
9.3 lets you specify the closest option and also an output DISTANCE field - unfortunately, I still can't get the attributes to carry across to the target layer through the modelbuilder process.

Something I'm doing wrong or bug unresolved? 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Spatial Join in Model Builder 
Author M Hawkins 
Date Jul 30, 2009 
Message I'm having the same problem using the spatial join in a python script. None of the fields from the joined shape file show up in the output. The only new field is 'Join_Count'. Could I be using the wrong parameters?

The join works correctly when done from ArcMap. Right click target layer, select join, bullet 'each line will be given all attributes..'

Any help or suggestions would be greatly appreciated. I think I've tried it with every possible combination of parameters. : ( 
 
gp.SpatialJoin_analysis("LeadMains_Lyr", "WaterMains.shp", "LeadMains_Join.shp", "JOIN_ONE_TO_ONE", "KEEP_ALL", "", "", "-1")