Hi,
What i intend to do is to get all points from Table A that fall within some records of Table B.
- Table A: point geometry. Represents events that occur in certain spots
- Table B: polygon geometry. Represents geographic, non overlapping, areas
- I turn them into feature layers so they can be fed to "select layer by location".
- "Table A layer" is the input feature
- "Table B layer" contains the selecting features
I've checked visually that there indeed exist points in table A that fall within polygons present in Table B, however all i get, when i publish the service, is an empty collection in "results".
Any ideas,
thanks
Solved! Go to Solution.
ok, this is funny, this happened while preparing the mock data:
1 - opened arccatalog
2 - right clicked Table B, copied it on the same dataset, the copy is called Table B1
3 - did the same for Table A, got Table A1
4 - imported both Table A1 and Table B1 in arcmap
5 - ran select location and...
6 - it worked! o_o
So, what can account for this? are there some kind of background operations being made on the data when you create a copy of a table? why the originals, which should have the exact same data as the copies, do not work but their supposed mirrors do?
I don't want to take more of your time, so i'm thinking of closing the thread and giving as a solution: "just create a copy of the conflicting tables". but you know, it feels like a lack of proper closure.
thanks
Vandana Raghunathan Dan Patterson Todd Blanchette Chad Kopplin
Hello David,
Are the points and polygons in the same coordinate system when you look at their properties in ArcCatalog?
-
Vandana
Hi, yes, both are in 4686. thanks
What happens when you run this in arcmap? Do you get results from the Select by Location?
Ok, first off, turning both layers (table A and table B) in arcmap correctly displays this (note the dark red dot):
Second, trying with select by location:
-selection method: select features from
-target layers: table A
- source layer: table B
- spatial selection: tried with intersect and within
result: no joy
thanks
Addendum.... save both as shapefiles in a folder and try those
I suspect Vandana is probably correct...It is quite possible that one of the two things are possible
1 the polygon layer isn't a polygon (highly unlikely)
2 they are in different coordinate systems
Never rely on ArcCatalog or two files in the same data frame to resolve this issue...the only way you will know is to create 2 separate data frames...add one...and only one file into each of those data frames. Mouse around on screen in both data frames and look at the coordinates in the bottom right corner of the data frame...particularly for a location that you "think" overlaps. If the coordinates differ they are not in the same coordinate system and one is either undefined, or has been defined incorrectly by using the Define Projection tool instead of the Project too. This generally happens when one file is in degrees and the other is projected...don't pay attention to the units showing in the data frame, they are meaningless unless everything is defined correctly
Hi Dan, i did the data frames experiment. Units are ok, both in decimal degrees and visually the points' coordinates match with what should be their enclosing polygons. thanks
more options...
1 make sure that there are no current selections in the layer...it may be that one point feature got selected and doesn't fall within a polygon
2 Do it manually...if it works... good...clear the selection
3 Although visually nice, perhaps you have the parameters out of order or you have selected the wrong selection type...which should be a parameter in your model and it isn't. for example, you can select polygons that are 'within' a point...it will yield none. or if you have specified a distance which isn't in the same units as your coordinates (in this case...decimal degrees)
4... lastly...time for a screen grab...
Hello David and Dan,
Looks like the Select by Location did return results in ArcMap when run using the GP tool or Selection > Select by location? If this does not work, it probably will not work in the model as well.
Like Dan mentioned, you could export both the layers to a different format (file geodatabase feature class perhaps) and then try the Select by Location GP tool.
-
Vandana