Select to view content in your preferred language

select layer by location returns empty results

10003
42
Jump to solution
01-23-2015 12:20 PM
davidzornosa
New Contributor III

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

0 Kudos
42 Replies
ChadKopplin
Regular Contributor

Sure, in the in mean time, for a shapefile to work it needs the shp file,

the shx, and the dbf, the shp file stores all of the geometry information

and uses the object ID to connect the geometry to the attribute file (the

dbf file) one of the attributes that is pushed to attribute table is the

shape to let you know what kind of shape your attributes are associated

with. If I choose the attribute file at any point to create features from,

this file is static by itself, at this point the shapefile is meaningless

unless I have the other 2 files that the attributes are associated with.

If I see coordinate fields in this dbf file they are associated with the

point location, the centroid of a polygon, or the centroid of a line

feature. So, when I create a layer from this table the only thing the

table will give me is a point shapefile, because the program only sees one

cooridinate associated with the record. If I use the actual shapefile

associated with the attibute file then I will get the polygon or line that

is associated with the attribute field, because the program looks at the

attribute table and sees the shape attribute, it sees that it needs

polygons, it hits to shapefile and sees yes I have polygon's associated

with this table, and returns the polygons. This gives a very rough

overview of what is happening. This is the same if you are looking at an

Oracle feature class or a SQL feature class, there are separate tables for

the attributes and the geometry for each feature class that you have in the

database.

0 Kudos
davidzornosa
New Contributor III

thanks for the explanation. i wonder why shapefiles are stored in separate files instead of a unique compressed folder in the likes of  a .war file.

for exploration purposes, which would be the geometry tables. Browsing from an oracle client, the only strange tables i see are the d's the a's an the s's.

d's and a's, as far as i understand, are just for versioning control. are the s's (e.g. s14_idx$) the tables with the actual geometry?

thanks

0 Kudos
ChristianWells
Esri Regular Contributor

Hi David,

Here are what those tables are used for:

A##: Versioning changes that have been inserted or updated

D##: Versioning changes that have been deleted

F##: Feature information for SDEBinary or SDELOB feature classes

S##: Geometry information for SDEBinary or SDELOB feature classes

ArcGIS Help (10.2, 10.2.1, and 10.2.2)

-Chris

0 Kudos
davidzornosa
New Contributor III

thanks christian

0 Kudos
davidzornosa
New Contributor III

i cannot show you actual data - sensitive info - but what i can indeed do is to generate mock data and replicate the error. i'll give it a try tomorrow and, hopefully, show you damaged records.

Thanks for all your help.

0 Kudos
VandanaRaghunathan
New Contributor III

Sounds good.

-

Vandana

0 Kudos
ChadKopplin
Regular Contributor

Here is a help with all of the potential files associated with a shapefile.

http://resources.arcgis.com/en/help/main/10.1/index.html#/Shapefile_file_extensions/005600000003000000/

0 Kudos
ChadKopplin
Regular Contributor

What I suspect is happening is that table B maybe converted to a point file as well, because the geometry attribute is static in any table it is populated from the actual layer that the table is associated with.  If you add the table into the model, there is only one point associated with each record in the table it select and that is the centroid of the polygon in stored in the geometry table.  This is the location that displays when you use the convert polygon feature to point feature tool.  Do you receive any errors when you run the model?

0 Kudos
davidzornosa
New Contributor III

The model runs smoothly -no errors and correctly selecting the points within the polygons- with the tables generated from the two shapefiles. (let's call those tables A_gen and B_gen to differentiate them from the original non-working tables)

A_gen  is  a  point type.

B_gen  is  a  polygon type.

When i right-click the shapes in arccatalog, shows "point" for A.shp and "polygon" for B.shp.

When you say "...you use the convert polygon feature to point feature tool",  i get a bit confused, i don't think i'm doing that. As far as i understand, the only processing being made to the B table in the model (now updated to use B_gen instead) is to turn that table with polygonal geometry into a polygonal feature layer so it can be fed to teh "select layer by location" tool.

Am i right on that?

thanks

0 Kudos
ChadKopplin
Regular Contributor

I am sorry I used that as an example to clarify my thoughts, you are right

that is not what you are doing, sorry for the confusion. That is correct,

the select by location tool needs an actual shapefile or geodatabase

feature class to work.

0 Kudos