Converting regions to points in mapinfo?

618 views
Skip to first unread message

GHu...@cardiff.gov.uk

unread,
Jun 11, 2010, 10:09:58 AM6/11/10
to MapInfo-L
I have some mapinfo tables which are represented by regions on the map
(e.g. a library will display as the shape of the building).. I want to
know how to change this to a point because I want to change the style
so that the library just displays as a circle rather than the shape of
the building.

Anyone know how?

Thanks

Martin Spiers

unread,
Jun 11, 2010, 10:30:01 AM6/11/10
to mapi...@googlegroups.com
Briefly:

Save a copy of your table.
Add two new columns to hold the point coordiantes.
Extract the coordinates of the region centroids (using CentroidX(obj_expr), Centroidy(obj_expr)).
Create new points using these.
Apply new style/s.
Enjoy. :-)


Martin A Spiers
Senior Engineer
MHW

1 Red Hall Avenue
Paragon Business Village
Wakefield
West Yorkshire
WF1 2UL

tel. +44 (0)1924 880837
fax. +44 (0)1924 880888
email martin....@mwhglobal.com
(Please do not print this email unless necessary)

Anyone know how?

Thanks

--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en


Disclaimer: This electronic communication and its attachments may contain confidential, proprietary and/or legally privileged information which are for the sole use of the intended recipient. If you are not the intended recipient, any use, distribution, or reproduction of this communication is strictly prohibited and may be unlawful; please contact the sender and delete this communication. MWH does not warrant or make any representation regarding this transmission whatsoever nor does it warrant that it is free from viruses or defects, correct or reliable. MWH is not liable for any loss or damage that occurs as a result of this communication entering your computer network.

The views expressed in this message are not necessarily those of MWH. This communication cannot form a binding agreement unless that is the express intent of the parties and they are authorized to make such an agreement. MWH reserves all intellectual property rights contained in this transmission. MWH reserves the right to monitor any electronic communication sent or received by its employees.This communication may come from a variety of legal entities within or associated with the MWH group.

For a full list of details for these entities please see our website at www.mwhglobal.com. Where business communications relate to the MWH UK Limited entity, the registered office is Terriers House, 201 Amersham Rd, High Wycombe, HP13 5AJ Tel: 01494 526240 and the company is registered in England as registration number 01188070. Where business communications relate to the MWH Constructors Limited entity, the registered office is as above and the company is registered in England as registration number 04635724

GHu...@cardiff.gov.uk

unread,
Jun 11, 2010, 11:12:27 AM6/11/10
to MapInfo-L
Thanks for the method.

Only thing is I'm not familiar with mapbasic. Can you tell me how I
use centroid X and Y to add this information to the new columns which
Ive just added? Thanks.

On Jun 11, 3:30 pm, Martin Spiers <Martin.A.Spi...@uk.mwhglobal.com>
wrote:
> Briefly:
>
> Save a copy of your table.
> Add two new columns to hold the point coordiantes.
> Extract the coordinates of the region centroids (using CentroidX(obj_expr), Centroidy(obj_expr)).
> Create new points using these.
> Apply new style/s.
> Enjoy. :-)
>
> Martin A Spiers
> Senior Engineer
> MHW
>
> 1 Red Hall Avenue
> Paragon Business Village
> Wakefield
> West Yorkshire
> WF1 2UL
>
> tel. +44 (0)1924 880837
> fax. +44 (0)1924 880888
> email martin.a.spi...@mwhglobal.com
>  (Please do not print this email unless necessary)
>
>
>
> -----Original Message-----
> From: mapi...@googlegroups.com [mailto:mapi...@googlegroups.com] On Behalf Of GHu...@cardiff.gov.uk
> Sent: 11 June 2010 15:10
> To: MapInfo-L
> Subject: [MI-L] Converting regions to points in mapinfo?
>
> I have some mapinfo tables which are represented by regions on the map
> (e.g. a library will display as the shape of the building).. I want to
> know how to change this to a point because I want to change the style
> so that the library just displays as a circle rather than the shape of
> the building.
>
> Anyone know how?
>
> Thanks
>
> --
> You received this message because you are subscribed to the
> Google Groups "MapInfo-L" group.To post a message to this group, send
> email to mapi...@googlegroups.com
> To unsubscribe from this group, go to:http://groups.google.com/group/mapinfo-l/subscribe?hl=en
> For more options, information and links to MapInfo resources (searching
> archives, feature requests, to visit our Wiki, visit the Welcome page athttp://groups.google.com/group/mapinfo-l?hl=en
>
> Disclaimer: This electronic communication and its attachments may contain confidential, proprietary and/or legally privileged information which are for the sole use of the intended recipient. If you are not the intended recipient, any use, distribution, or reproduction of this communication is strictly prohibited and may be unlawful; please contact the sender and delete this communication. MWH does not warrant or make any representation regarding this transmission whatsoever nor does it warrant that it is free from viruses or defects, correct or reliable. MWH is not liable for any loss or damage that occurs as a result of this communication entering your computer network.
>
> The views expressed in this message are not necessarily those of MWH. This communication cannot form a binding agreement unless that is the express intent of the parties and they are authorized to make such an agreement. MWH reserves all intellectual property rights contained in this transmission. MWH reserves the right to monitor any electronic communication sent or received by its employees.This communication may come from a variety of legal entities within or associated with the MWH group.
>
> For a full list of details for these entities please see our website atwww.mwhglobal.com. Where business communications relate to the MWH UK Limited entity, the registered office is Terriers House, 201 Amersham Rd, High Wycombe, HP13 5AJ Tel: 01494 526240 and the company is registered in England as registration number 01188070. Where business communications relate to the MWH Constructors Limited entity, the registered office is as above and the company is registered in England as registration number 04635724- Hide quoted text -
>
> - Show quoted text -

Uffe Kousgaard

unread,
Jun 11, 2010, 11:21:03 AM6/11/10
to mapi...@googlegroups.com
Simpler approach:

Make the same copy of your table and then work with the copy:
open the mapbasic window and type on one line at a time:
set coordsys table <mycopy>
update <mycopy> set obj = centroid(obj)

Done.

Regards
Uffe Kousgaard

Andy Harfoot

unread,
Jun 11, 2010, 11:23:47 AM6/11/10
to mapi...@googlegroups.com
Hi there,

Have a look in the Tool Manager - there's a tool called Coordinate
Extractor which will do the work for you including creating the X and Y
columns.

Andy


--
Andy Harfoot

GeoData Institute
University of Southampton
Southampton
SO17 1BJ

Tel: +44 (0)23 8059 2719
Fax: +44 (0)23 8059 2849

www.geodata.soton.ac.uk

---------------------------------------
For further information about GeoData's
Training Courses, please visit:
www.gis-train.com
---------------------------------------

Martin Spiers

unread,
Jun 11, 2010, 11:28:38 AM6/11/10
to mapi...@googlegroups.com
This can be done without MapBasic.

Lets assume your table is called "MyTable" and has columns "East" and "North"
We can update the East column with the eastings as follows:

Table > Update column
Table to update = MyTable
Column to update = East
Get value from table = MyTable
Value = CentroidX(obj) : this can be selected from the drop-down list.

Then repeat for the Northings

GHu...@cardiff.gov.uk

unread,
Jun 11, 2010, 12:18:44 PM6/11/10
to MapInfo-L
Thanks very much for all the tips! Sorted now.

On Jun 11, 4:28 pm, Martin Spiers <Martin.A.Spi...@uk.mwhglobal.com>
> archives, feature requests, to visit our Wiki, visit the Welcome page athttp://groups.google.com/group/mapinfo-l?hl=en- Hide quoted text -

Natalie Bennett

unread,
Jun 14, 2010, 8:21:18 PM6/14/10
to MapInfo-L
Just as an addendum to this topic - I realise you have now sorted - but there is an MBX you can download from DirectionsMag called P2P.mbx. I think it comes as source code, so it can be amended as needed.

I used this to convert my contours to contour points so I could make a 3D thematic grid (MIG).

>>> "GHu...@cardiff.gov.uk" <GHu...@cardiff.gov.uk> 12/06/2010 2:18 am >>>

_____________________________________________________________________
This e-mail has been scanned for viruses by MCI's Internet Managed
Scanning Services - powered by MessageLabs. For further information
visit http://www.mci.com

Reply all
Reply to author
Forward
0 new messages