--- In [email protected], Daniel Morissette <[EMAIL PROTECTED]> 
wrote:
>
> gsrao456 wrote:
> > Hi All
> > 
> > Apologies if this has been already discussed in the past.
> > 
> > I am a new member of this group. I have just started
> > using MITAB.
> > 
> > Actually when we try to convert a surpac string file with large 
> > coordinates (1e7), the coordinates are set to a default value of 
> > 1000000. Is this a bug in mitab library, if yes is there any 
> > workaround to come across this problem.
> > 
> 
> Not really a bug, but a "feature" of the TAB format.
> 
> TAB datasets store the object coordinates in the file using 
integers. 
> The overall bounds of the dataset are scaled to fit in the integer 
range 
> of +/-1000000000 (+/-1e9). If you don't explicitly provide bounds 
then 
> MITAB tries to use some default value depending on the dataset's 
> coordsys. You are likely hitting that limit because the default 
bounds 
> for the coordsys that you chose are not large enough for the range 
of 
> coordinates of your data.
> 
> You'll have to explicitly specify bounds that are large enough for 
your 
> data at the time that you create the dataset, if you use the C 
API, then 
> see mitab_c_create()'s north, south, east, west args:
> http://mitab.maptools.org/mitab-docs/mitab__capi_8cpp.html#a12
> 
> Daniel
> -- 
> Daniel Morissette
> http://www.mapgears.com/
>

Thanks for an immediate response

Now after setting the bounds I am getting a different problem.The 
coordinates of the points in the tab file are very large compared to 
the original file.

The coordinates of the original points are
      y              x
1, 7927669.700, 247130.134
1, 7927670.316, 247128.328
1, 7927669.661, 247125.000
1, 7927670.408, 247120.488
1, 7927671.949, 247116.404
1, 7927672.088, 247114.728
1, 7927668.857, 247112.239
1, 7927666.361, 247111.317
1, 7927665.050, 247110.994
1, 7927662.097, 247110.589

I am using C++ API for writting a TAB file. 

I have set the bounds using the setBounds function()

if (file->Open(fname, "wb") == 0) {
      file->SetBounds(247108.893, 7927649.353, 247131.979,
                       7927672.088);
}

Can you please advise me about setting the bounds if i am 
wrong, and whether I should set the coordsys also before setting the 
bounds.

Thanks









 
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/
 


Reply via email to