[fdo-users] AutoCAD Map3D and Oracle FDO Issues

Mike Toews mwtoews at sfu.ca
Thu Jun 11 21:19:47 EDT 2009


Tony,

I think I had a similar problem, although I'm using Map3D 2008/2010 with 
a PostgreSQL/PostGIS database. The issue was Map3D was creating and 
sending a [single] POLYGON object to a MULTIPOLYGON column, which it 
shouldn't, since the column has check constraints to ensure they are all 
MULTIPOLYGON geometries. I fixed it by writing a simple BEFORE INSERT OR 
UPDATE trigger to check and correct if the polygon is a multi object.

I'm no pro with Oracle spatial, but the guts of my PL/pgSQL (with 
PostGIS) trigger function look somthing like this:

  IF ST_GeometryType(NEW.geometry) IN('POLYGON','LINESTRING') THEN
    NEW.geometry := ST_Multi(NEW.geometry);
  END IF;

I think most of this is portable to your situation, except that 
ST_GeometryType() returns different values. I'm not sure if there is a 
generic ST_Multi() function, but there are similar casts that you can use.

Hope this helps,

-Mike

Tony wrote:
> i am using fdo (autodesk) as well as used king fdo for getting the CAD data
> write to oracle.   
> here is the whole story : i have a polygon shape file i have used FDO2FDO to
> create  oracle table , I want to edit some of geometries in AutoCADmap 3D as
> well as i want to add new polygons there. 
>
> the issue:  i have createa a closed polygon in autocadmap that have Arc and
> line and i was trying to write this to the above created table.  i am
> getting error saying  that geometry type does not match, 
> after reading the logs i found out that though my Oracle table has mpolygon
> geometry type i can not write  and polygon with Arc(true arc) in it. 
>
> any idea how to solve this issue. i have wote to autodesk and still wating
> to get the answer. i wrote to  king fdo no reply yet ... 
>
> please let me know how to solve this 
>
>
>   



More information about the fdo-users mailing list