AutoCAD Map 3D Developer
Welcome to Autodesk’s AutoCAD Map 3D Developer Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D Developer topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Invalid Argument in Feature Service while inserting Geometry

1 REPLY 1
Reply
Message 1 of 2
Anonymous
1539 Views, 1 Reply

Invalid Argument in Feature Service while inserting Geometry

I am trying to insert a polygon geometry in Oracle Spatial Database (Oracle). I am getting “Invalid Argument(s)” error with StackTrace          "- FeatureUtils::FillFdoPropertyCollection line 568 file .\\AcMapFeatureUtils.cpp\n" string”

 

I have only three fields in Oracle. ID(integer), NAME (string) and GEOM (SDO_GEOMETRY). Spatial Index is defined of GEOM field.

 

Error is coming on execution of UpdateFeatures function.

 

MgLinearRing ring = geoFac.CreateLinearRing(coordCollection);

                    MgPolygon poly = geoFac.CreatePolygon(ring, null);

                    MgWktReaderWriter wktRW = new MgWktReaderWriter();

                    String wktStr = wktRW.Write(poly);

                    MgGeometry geom = wktRW.Read(wktStr);

 

MgPropertyCollection propcol = new MgPropertyCollection();

                    propcol.Add(new MgInt32Property("ID", 31));

                    propcol.Add(new MgStringProperty("NAME", "Polygon_31"));

                    propcol.Add(new MgGeometryProperty("GEOM", agfReadWrite.Write(geom1)));

                    

                    MgFeatureCommandCollection commands = new MgFeatureCommandCollection();

                    MgInsertFeatures insertFeature = new MgInsertFeatures(className, propcol);

                    

                    commands.Add(insertFeature);

                    //featureService.

                   

                    featureService.UpdateFeatures(rsid, commands, true);

 

1 REPLY 1
Message 2 of 2
Daniel.Du
in reply to: Anonymous

 

Have you ever looked into this blog post? It talks about SQL Server, but it applies to Oracle as well: 

http://adndevblog.typepad.com/infrastructure/2012/05/inserting-fdo-features-into-sql-server-using-ge...



Daniel Du
Developer Technical Services
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost