Thanks to Peter and Vicky for their suggestion of using the expression ObjectInfo(obj,3) to update a column with text within a polygon. It worked perfectly.

Cheers
P. Honarvar

----- Original Message ----- From: "Peter Horsbøll Møller" <[EMAIL PROTECTED]>
To: "P. Honarvar" <[EMAIL PROTECTED]>; <[email protected]>
Sent: Tuesday, January 03, 2006 5:55 PM
Subject: RE: [MI-L] text within a polygon


Pauline,

You can update your polygon table with the value from your text objects where the text object is within the polygons using Update Column which you'll find in the Table menu:

Update Table: POLYGONTABLE
Update Column: UNITLABELCOLUMN
From Table: TEXTTABLE
Join: Where POLYGONTABLE.OBJ Contains TEXTTABLE.OBJ
or: Where TEXTTABLE.OBJPOLYGONTABLE.OBJ
Update with value: ObjectInfo(OBJ, 3)

The last thing you'll have to type in.

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 [EMAIL PROTECTED]
http://www.cowi.dk/gis


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of P. Honarvar
Sent: Tuesday, January 03, 2006 7:12 PM
To: [email protected]
Subject: [MI-L] text within a polygon

Hi All and Happy New Year

Is there a way to update a column (each record is a polygon)
with text 'within' that polygon?

For example, I have a set of geology polygons and I have
already added the geology unit labels as a separate text
layer.  Rather than retyping the unit labels in the polygon
table I would like to extract them from the text layer?  Is
this possible?

Cheers
Pauline


_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l



Certainly is - Try this:

Table>Update Column
Table to update: Polygon (the geology polygons)
Column to Update: Textstr (the column you want the text to go into)
Get Value from table: Text (the table containing the text)
Join>Where object from table Text is within object from table Polygon
Calculate: Value
of: Expression
ObjectInfo(obj, 3)




This says go to each object and extract this type of information about it (3= textstring)

For a comprehensive list of all these functions and codes find "MapBasic.def" on your computer and open it in a text editor - lots of useful stuff in it.

Cheers
Vicky


Vicky Bonwick
___________________
GIS Officer
Glenorchy City Council
Ph 03 6216 6719
Fax 03 6216 6400

Postal Address
PO Box 103,
Glenorchy, TAS. 7010


_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to