I am not experiencing the problem you are describing -- The coordinate
extractor gives me 6 decimal places. So first, let's verify you're really
not getting 6 decimal places.
Try the following commands in the MapBasic window:
Select format$(centroidX(obj),"#.000000000000") "CentLon",
format$(centroidY(obj),"#.000000000000") "CentLat"
from mytable into Selection
Browse * From Selection
Browse format$(lon_column,"#.000000000000") "Lon",
format$(lat_column,"#.000000000000") "Lat" from mytable
Substitute 'mytable' with your table name, 'lon_column' with your actual
longitude column, and 'lat_column' with your actual latitude column.
What do you see in the browsers?
----
What type of column are you putting the coordinates into? You should really
use only one of the following three:
Char (12 or more)
Float
Decimal (11, 6)
If I look at the source of the Coordinate Extractor tool (this comes with
MapBasic), I notice it uses Format$(x, "#.000000") to format the coordinates
if you've chosen to put coordinates into text columns. This should give you
6 decimal places.
----
You might also have a problem with the coordinate bounds of your table --
MapInfo can only resolve X and Y coordinates to 2^-31 of the corresponding
axis's bounds.
But if this were the case, the table's objects would already contain all of
the coordinate information available. Coordinate precision beyond 4 decimal
places wouldn't actually exist.
I don't really see this happening with plain latitude and longitude. For 360
degrees of longitude, the coordinate resolution comes out to about 1.6 *
10^-7 degrees -- more than enough to get 6 decimal places, with the
occasional rounding error in the sixth place.
So if this problem persists, you have an issue with the way the data is
being collected, or the way it is being entered into the table, or the way
the table is being converted for use after the data is all collected.
What is the native projection of the table?
Note tableinfo (mytable, 29)
Are you using the "Use Non-Native Projection" option of the Coordinate
Extractor?
What projection is the data being collected in?
How is the data being entered into the table?
________________________________
Spencer
-----Original Message-----
From: P&D_GIS [mailto:
plisg...@gmail.com]
Sent: Friday, May 21, 2010 9:59 AM
To: Spencer Simpson
Subject: Re: Lat/Long Centroid Rounding
The problem doesn't seem to be so much that I can't see the extra
decimal places as that mapinfo isn't producing the desired number of
decimal places. I have a table with thousands of points in it. I
would like to get the coordinates of these points in decimal lat/long
WGS84. I have tried the extract coordinates tool, which produces only
4 decimal places of data, and I've tried an SQL using Centroid_x,
Centroid_y, but I get the same result. It isn't so much an issue of
being unable to see the desired decimal places so much as they just
aren't there to be seen. I can get more exact coordinates by using
UTM, NAD83 for example and then I could convert them to Lat/Long WGS84
outside of MapInfo, but that is a pain. It seems like there should be
simple solution in Mapinfo, I just don't know how to do it... i don't
know much about writing in Map Basic so I would like a solution that
uses point and click tools if thats possible???
Any thoughts?
cheers,
J