[gdal-dev] dgnlib and cells

Radim Blazek blazek at i...
Thu Nov 14 11:13:58 EST 2002


On Thursday 14 November 2002 03:26 pm, you wrote:
> Frankly, I am a little uncertain about how cells work. I think they
> essentially form aggregates from a set of elements. However, I don't
> get how you tell how many following elements are part of the cell. This
> might be a good question to raise on the dgnlib mailing list.

So I'll ask there.

> ElementToFeature() is passed the feature. It is actually read by either
> GetNextFeature() which does no seek because it reads sequentially, or
> GetFeature() which does call DGNGotoElement().
>
> Actually, I see that ElementToFeature() does read subsequent elements in
> a complex chain or shape but it assumes the "read pointer" for the file
> is set to point just after the header when the method is called.

I see, sorry, I thought that DGNLoadRawElement() reads whole complex
element and it reads just cell header.

> > 3) Any reason why DGNT_CELL_HEADER is not processed by
> > OGRDGNLayer::ElementToFeature()? It seems that Cells are silently
> > lost, is that true?
>
> That is true. I am not sure how to translate them, so for now each
> component element in a cell is treated as an independent element, and the
> relationship to the original cell header is lost. I am open to suggestions
> on this.

I would guess to scale + rotate by matrix and then move to cell origin.
I just know, that while cell is created in Microstation, the cell origin
is specified, so I expect that cell elements are stored in their independent
coordinate systems and MUST be transformed to final position. We need some 
example dgn well described. I'll ask also in dgnlib list.

Radim




More information about the Gdal-dev mailing list