[gdal-dev] dgnlib and cells
Frank Warmerdam
warmerdam at p...
Thu Nov 14 09:26:11 EST 2002
Radim Blazek wrote:
> Hi,
>
> 1) Is it right that unshared cells in DGN are saved as
> cell header (type 2) followed by cell members within 'totlength'?
> Something like complex chains/shapes? This is not explicitly said
> in http://gdal.velocet.ca/projects/dgn/dgn.html and I am missing
> something like 'numelems' for Cell Header.
Radim,
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.
> 2) Where is fseek() for element in DGN file before
> psChildElement = DGNReadElement( hDGN );
> in OGRDGNLayer::ElementToFeature() (grdgnlayer.cpp)
> for DGNST_COMPLEX_HEADER? I don't see any call to DGNGotoElement().
> Are there file offsets to members of complex chains/shapes and unshared
> cells saved in index?
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.
> 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.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at p...
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list