Mike
more recent versions of Mapinfo have a tool to do this for you look under your tools folde for something called coordinateextractor.mbx
if you dont have this tool then try this:
ad two 'float' column to your point table called x and y
open the point table as a map
open the mapbasic window (under options)
type into the mapbasic window the following, substituting in the name of your point table:
update MYPOINTTAB set X = centroidx(obj)
update MYPOINTTAB set y = centroidy(obj)
this will populate teh x and y columns appropriately if you need to add coordinates that are not lat long then type in teh following text FIRST (dont forget to use your table name!)
set coordsys table MYPOINTTAB
hth
r
-----Original Message-----
From: mapi...@googlegroups.com [mailto:mapi...@googlegroups.com]On
Behalf Of Severin
Sent: 15 November 2006 15:02
To: MapInfo-L
Subject: [MI-L] adding lat/long to a point table
I've done this before, a long time ago, but there is a way to create
columns for lat and long in an existing point table and have the
lat/long update to the table; I've just forgotten how to do it;).
Right now I have a series of points, one column (name of point), and I
would like to have MapInfo add the lat/long to that table. I thought
it was under the Table --> Update Column drop down menu but...
Something including CentroidX and CentroidY I belive... Grr...... Any
help would be appreciated! Thanks.
Severin
*********************************************************************
This message (and any attachments) is for the recipient only.
NERC is subject to the Freedom of Information Act 2000 and
the contents of this email and any reply you make may be
disclosed by NERC unless it is exempt from release under
the Act. Any material supplied to NERC may be stored in an
electronic records management system.
*********************************************************************
Tools>Tool Manager>
Select the tool "coordinate extractor" and check "load/auto-load"
Under the tools menu, "Coordinate Extractor" will be added
Use this to extract the coordinates of your points
1. If using v8.5, option to add columns is provided.
2. Earlier versions, add columns to your table than Table>Update Column.
Use the function centroidX(obj) and centroidY(obj) to extract your lat and
lon
Cheers
DC
-----Original Message-----
From: mapi...@googlegroups.com [mailto:mapi...@googlegroups.com] On
Behalf Of Severin
Sent: Wednesday, November 15, 2006 10:02 AM
To: MapInfo-L
Subject: [MI-L] adding lat/long to a point table
If you save these settings to the metadata, MapInfo will always browse the table with the columns you have specified.
You can add and remove column thru the Pick Fileds menu item in the rightclick menu of the browser.
And in that dialog you can also choose to store the settings to the metadata.
Do remember that the coordinatesystem used to generate the cordinates, is the "session projection" that is specified thru:
Options > Preferences > Map Window > Session.
Also remember that if you do it this way, you'll never have to update the coordinate columns again.
They are dynamical updated everytime you change the object.
Peter Horsbøll Møller
GIS Developer, MTM
Geographical Information & IT
COWI A/S
Odensevej 95
DK-5260 Odense S.
Denmark
Tel +45 6311 4900
Direct +45 6311 4908
Mob +45 5156 1045
Fax +45 6311 4949
E-mail p...@cowi.dk
http://www.cowi.dk/gis