Error cahning coordref (SHAPE2)

1524
1
10-19-2011 05:35 AM
AndyOldham
New Contributor II
I am running my SQL script with st_intersects and got an error.
This is the problematic part:
SELECT pa.pid, aa.aid
FROM addresstable pa, activitytable aa
WHERE sde.st_intersects (pa.shape, aa.shape) = 't';

The error that I got is:
ERROR: ESRI: error changing coordref (SHAPE2) [20011]:
SQL state: 22P02

The SRIDs for both layers are same. (Same ID number when checking with sdelayer -o describe_long command)
So I don't understand why it attempts to change coordref...but if I run this for partial data (i.e WHERE sde.st_intersects (pa.shape, aa.shape) = 't' AND pa.pid <100; ) it worked. pa table has over 150K records if this could be a matter...
Is there any restriction that I need to consider when using the spatial functions in SQL?
I am using PostgreSQL 8.3 with ArcSDE 10 SP2...
Thank you.
1 Reply
StefanOffermann
Occasional Contributor II

Is there a solution to this problem? I am getting the error with Postgres 9.4 and ArcSDE 10.4.1 on my query:

SELECT a.objectid AS aid, MAX(s."value") AS "maxvalue"
FROM test_points AS a
INNER JOIN test_areas AS s
ON ST_Intersects(a.shape, s.shape)
GROUP BY aid

0 Kudos