Hi Ant,

This can be done quite easily in Mapbasic but is more difficult in MapInfo.

One way however is to:

First ensure you have a unique value in some field of the tblroute - assumed
to be "UID".  If not add an integer field to the table and update it with
the rowid of the table ie "update tblroute set UID = rowid"

1)  create a copy of the tblroute table using save- as (call it
tblroutepoints and open it)

2) update the new table to create points at the start of the line eg in the
mapbasic window type 

        update tblRoutepoints set object =
createpoint(objectnodex(obj,1,1),objectnodey(obj,1,1))

3) run the query you did before but on the new table

          Add Column "tblRoutepoints " (SuburbName) From tblSuburb Set To
SuburbName Where Contains

4) update the original table to drag across the suburbName linking on the
unique value field (assumed to be "UID")

        Add Column "tblRoute" (SuburbName) From tblRoutepoints Set To
SuburbName Where UID = UID

Check the table and if OK delete the tblRoutepoints table

Hope this helps

Cheers

Martin

===================================
Martin Roundill
GIS Manager
Waitakere City Council
Private Bag 93109
Henderson
Waitakere City
New Zealand
Ph +64 9 836 8000 ext 8344
Fax +64 9 836 8001
email [EMAIL PROTECTED]
===================================


> ----Original Message-----
> From: Antony Burnett [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, 28 April 1999 14:20
> To:   [EMAIL PROTECTED]
> Subject:      MI: update column with suburb at start node?
> 
> How to update column with the suburb located at the startnode of the
> polyline?
> 
> I have two tables - "tblSuburb" and "tblRoute".
> 
> "tblSuburb" is composed of boundaries with suburb names. "tblRoute" is
> composed of polylines (and only polylines) and a field "SuburbName".
> 
> I wish to update the field "SuburbName" with whatever suburb is found at
> the
> Start node of the polyline. Is this possible in  MI Pro? If I use
>       Add Column "tblRoute" (SuburbName) From tblSuburb Set To SuburbName
> Where
> Contains
> appears to use the 'centroid' of the polyline which I don't want.
> 
> Any clues?
> 
> Ant Burnett
> 
> ----------------------------------------------------------------------
> To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
> "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to