Copy Feature class Geometry field to another Feature Class Geometry Field  using SQL

347
3
04-17-2013 11:08 AM
MosesAsuquo
New Contributor
Hi all,

I am inserting a new feature into a point feature class and i need to copy it's location (a geometry field) from another point feature class. I am doing the insertion using SQL INSERT statement and a SELECT statement that retrieves the geometry in question from the other feature class. This is all in a back-end WCF service running on the server side. When testing the WCF service using WCFTestClient the example SQL statement generated looks like this:

 INSERT ALL INTO MSD.CD_SSO VALUES ('2' , to_date('4/17/2013', 'MM/DD/YYYY') , '4' , '2901 SPRUCEWOOD DR, 63043' , 'GIS-2345454' , 'SSMANHOLE' , '656565' , 'THANKS' , '3:23' , '3:23' ,  (SELECT SHAPE FROM MSD.PLUSSERVICEADDRESS WHERE FULLADDRESS = '2901 SPRUCEWOOD DR' AND ZIP = '63043')) SELECT * FROM dual 



I get this error:

ORA-29875: failed in the execution of the ODCIINDEXINSERT routine
ORA-20085: Insert Spatial Reference SRID 1 does not match MSD.CD_SSO.SHAPE registered Spatial Reference SRID 2254

What do i do to get around this error. I sounds like a mismatched SRID which maybe unique across feature classes. Is this something i can change before the insert operation is called? Is there a better way i can do this in SQL?

Please any useful suggestion will be much appreciated.

Thanks,

Moses.
0 Kudos
3 Replies
MosesAsuquo
New Contributor
Problem has been solved. I found a better way of having this done. Case closed! Thanks.
0 Kudos
User35489
Occasional Contributor III
Problem has been solved. I found a better way of having this done. Case closed! Thanks.


Hey Dude,

I was wondering how did you solve the issue. Please let me know, i need the solution.

Thanks
-AS
0 Kudos
MosesAsuquo
New Contributor
Hey Dude,

I was wondering how did you solve the issue. Please let me know, i need the solution.

Thanks
-AS


Sorry i just got your message.

The error message that I encountered occurs when the coordinate system of the source feature class and destination feature class are different.

I basically re-created the destination feature class (using the same coordinate system at the source feature class) and try to update the SHAPE column again and it worked with no errors.

I hope this helps.

Moses
0 Kudos