Hi,
I've just tried dgn2sdo for the first time. I loaded a dgn file containing shapes, some of them with holes. Almost all geometries gets the error 13367 when checking the result with SDO_GEOM.VALIDATE_LAYER_WITH_CONTEXT. To see exactly what was loaded, I removed the last row from Masterload.bat:
rem SQLPLUS %1 @"%EXECUTION_DIR%CleanGeometry_PARK_YTOR.SQL6"
If you look inside that .sql6 file you'll see that we basically call Oracle's SDO_UTIL.RECTIFY_GEOMETRY function on the geometries to make sure that everything we put in the database is as Oracle wants it. This function should correct such orientation problems, not create them. There are cases that it cannot fix however.
What version of Bentley Map are you running ? We fixed one issue concerning shapes with holes in Map SS1 maintenance release (8.11.7.113). We just found and fixed another one recently, and that fix will be in the soon to come Bentley Map SS2.
Thanks,
Martin
I know you call RECTIFY_GEOMETRY. This might, however, change my data slightly and I would prefer to call that function myselft for the geometries I select (perhaps by first calling VALIDATE_LAYER). I guess my question is: Does dgn2sdo require RECTIFY_GEOMETRY to get the rings in the right direction? It seems to that it just takes the outer and inner boundaries in the direction they are created in MicroStation and rely on RECTIFY_GEOMETRY to fix the problem.
The shapes in my file are cretaed with good old GeoGraphics and I run Bantley Map SS1 with MS SS2.
Regards,
Krister Surell
Owner consultant at Surell Consulting AB
Hi. Yes, we rely on RECTIFY_GEOMETRY to correct the winding order of polygons since the initial posting is based on the winding order they were drawn in Microstation. I would assume that RECTIFY_GEOMETRY would not change the geometry is it's valid (i.e. if the validation would succeed).
The recent fix I was referring to corrects cases where RECTIFY_GEOMETRY would fail on polygons with holes as we'd post both in the same winding order if they were drawn this way. We fixed this for SS2, but still require the RECTIFY_GEOMETRY call.
Ok, thanks!
We have a lot of polygons with holes so SS2 would be useful! I think we can get slightly better control over the use of RECTIFY_GEOMETRY by calling it ourself and only use it on the ring problem:
UPDATE sdo_omrade t SET (t.OGC_GEOMETRY) = SDO_UTIL.RECTIFY_GEOMETRY(t.OGC_GEOMETRY,0.000050)
where SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(t.ogc_geometry, 0.00005) like '13367%';
Duplicate breakpoint could reqiure some other tolerance.
Krister