Andrew,
Good catch. SetSpatialRef() does a default bounds lookup so we need to
call it before setting bounds from source dataset.
I have fixed this in CVS. Will be in the next release (likely 1.5.1).
Daniel
abetlehem wrote:
>
>
> Hi All,
>
> I've just noticed a bug in the use of bounds in the tab2tab program.
> Currently any file with a bounds set will not convert to a file with
> the same bounds set - it will just use the default.
>
> To fix this, the tab2tab file needs to be changed to:
>
> OGRSpatialReference *poSR;
>
> poSR = poSrcFile->GetSpatialRef();
> if( poSR != NULL )
> {
> poDstFile->SetSpatialRef( poSR );
> }
>
> // Set bounds, removed from before SRS setting
> if (poSrcFile->GetBounds(dXMin, dYMin, dXMax, dYMax) == 0)
> poDstFile->SetBounds(dXMin, dYMin, dXMax, dYMax);
>
> i.e. the set bounds should be performed after the SRS is set.
>
> To test bounds in MapInfo, use the Tool Manager addin, 'CordSys
> Bounds Checker'.
>
> Does this sound correct?
>
> cheers,
>
> Andrew
>
--
Daniel Morissette
http://www.mapgears.com/
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/dkFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/mitab/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/