you'll have to format the text as it's exported. if you have your own
routines, add something along the lines of.......
################
format$( YourValue,"0.000000")
################
but if you're exporting direct to CSV or whatever... um, i can't remember
the fix exactly, but i think i ended up having to either convert those
fields to text or add some temporary fields.
make a copy of your table, then run this code (note the tabbed line is part
of the previous line):
######################
Commit Table YourTable As "C:\YourPath\YourTableEX.TAB"
Close All Interactive
Open Table "C:\YourPath\TimePointsEX.TAB" Interactive
Alter Table "YourTableEX" ( add tX Char(20),tY Char(20) ) Interactive
Update YourTable Set tX = format$(X,"0.000000")
Update YourTable Set tY = format$(Y,"0.000000")
Commit Table YourTableEX Interactive
Alter Table "YourTableEX" ( drop X,Y rename tX X,tY Y ) Interactive
Export "YourTableEX" Into "C:\YourPath\YourTable.txt" Type "ASCII"
Overwrite Delimiter "," CharSet "WindowsLatin1" Titles
Close All Interactive
Open Table "C:\YourPath\YourTable.TAB" Interactive
Map From YourTable
######################
this bunch of code will:
make a copy of your table
close your table
open the copy
create new text fields
update the text fields with the data
drop the original fields
rename the text fields to the original fields
export the table as CSV
close the table
reopen and map your original table
this is also assuming you have your X and Y coords in fields called "X" and
"Y".
have fun
-----Original Message-----
From: Will Mitchell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 2 December 2003 12:04 PM
To: [EMAIL PROTECTED]
Subject: MI-L Text Export Truncation
Hi list,
I can't believe I have not bumped into this in nearly 10 years of using
MapInfo Pro, but I still find things out, sometimes basic things, and I
wanted to throw this one out for response...
It appears to me that when I export a table as a delimited Text file,
numeric data values are truncated to the values visible in the browser view.
What I have is Decimal degree coordinate fields in a MapInfo TAB file
structure using DBF for the data table. They have 6 digits after the
decimal point, but only 3 show up in the browser view. When I click inside
one of the cells in the browser the full value with all 6 decimal places
shows up. If I export this table to a Text file only the 3 visible digits
come out. So the recipient of my exported file found a rather 'regular'
patter when he re-plotted points.
My guess is this is DBF-related, maybe even 8 places showing including a
minus sign and the decimal point (-150.321 for example), and maybe a
controllable setting in either the browser view or the ASCII export process.
Before I dig in to that I thought I'd take the easy route and ask the
experts gathered here...
Thanks.
Will Mitchell
Mitchell Geographics, Inc.
496 Congress Street
Portland, Maine 04101
207.879.7769
www.mitchellgeo.com
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 9379