Issue with Spatial Query Intersects Operation

1084
2
Jump to solution
01-02-2013 01:58 AM
Sai_PhaneendraPoludasu
New Contributor
Hi All,

I a m trying to select polygon intersecting the line using spatial query intersect operation. At world extent, when I try this operation polygons which are actually not intersected are getting selected(screenshot attached).
[ATTACH=CONFIG]20361[/ATTACH]

Additional Information:
Base map spatial reference: 102100
Polygon feature Layer: 102100
              var query = new esri.tasks.Query();             query.outFields = fields;      query.geometry = lineGeometry;             query.returnGeometry = true;             query.outSpatialReference = map.spatialReference;             query.spatialReference = map.spatialReference;             query.spatialRelationship = esri.tasks.Query.SPATIAL_REL_INTERSECTS;      var queryTask = new esri.tasks.QueryTask(layerURL);      queryTask.execute(query, dojo.hitch(this, function (result) {               //select results on map.                //At present in the image I have highlighted only one result               }));


Any help is greatly appreciated.
0 Kudos
1 Solution

Accepted Solutions
MarcoBoeringa
MVP Regular Contributor
This really sounds like a coordinate / projection system issue. If you want to do this kind of operation, you need to be careful with setting the right kind of projection system on the ArcGIS Data Frame, especially with such small scale "world" type maps.

Although you may think that the shapes visible in your figure do not intersect, they may do if viewed on a sphere, especially if your line has only a begin- and endpoint, and no vertices inbetween to define it's shape.

I would recommend you to start reading about coordinate systems in the ArcGIS Help. A good starting point is the link below, and the other Help pages it references:

What are map projections?

View solution in original post

0 Kudos
2 Replies
MarcoBoeringa
MVP Regular Contributor
This really sounds like a coordinate / projection system issue. If you want to do this kind of operation, you need to be careful with setting the right kind of projection system on the ArcGIS Data Frame, especially with such small scale "world" type maps.

Although you may think that the shapes visible in your figure do not intersect, they may do if viewed on a sphere, especially if your line has only a begin- and endpoint, and no vertices inbetween to define it's shape.

I would recommend you to start reading about coordinate systems in the ArcGIS Help. A good starting point is the link below, and the other Help pages it references:

What are map projections?
0 Kudos
Sai_PhaneendraPoludasu
New Contributor
Thank you for your help. That makes sense.
0 Kudos