I have a .TAB file of polyline objects in British Grid Coordinate. I need to extract the end points/nodes of each polyline and find their latitude/longitude (WGS84).


You should modify the table, by adding 4 fields: x1, y1, x2, y2 or similar. Now do table update: x1=objectnodex(obj,1,1) y1=objectnodey(obj,1,1)

For the end it is a little trickier: x2=objectnodex(obj,1,objectinfo(obj,22)) y2=objectnodey(obj,1,objectinfo(obj,22))

The above only works with polylines, not lines.

Since the default coordsys is wgs84, you don't need to change coordsys.

  • If your default projection in MapInfo Professional is set to something different than WGS84, you'll have to specify the coordinate system to use when reading the coordinates from your objects. You can do this using the "Set CoordSys" statement – Peter Horsbøll Møller Jul 28 '14 at 8:58
  • The asker states their data is in British National Grid, which is not WGS84. Are you suggesting that when added to MapInfo, the data is automatically reprojected to GCS WGS84? IE unlike in QGIS or ArcGIS, the dataframe/project CRS (whatever the analog in MapInfo is) isn't automatically set to the first added data? In those softwares, reprojecting the data to WGS84 first, and then calculating the coordinates is necessary. – Chris W May 16 '15 at 20:13
  • Yes, it is a bit more complex than that, but generally you can have 2 layers with different projection and then use a 3rd one for a mapper window (or one of the other 2). But if you zoom out on a large table, then the on-the-fly reprojection makes it slow. MapInfo has had this feature since v1, I think. – Uffe Kousgaard May 17 '15 at 7:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.