Dear All

 

I am just starting MapBasic and have written a program to combine streets
with the same name into a single object.  Here is the code:

 

global street as string, last_street as string

global last_osodr as string, info_osodr as string

 

 

fetch last From Minor_rd

last_osodr = Minor_rd.OSODR

 

print "last street equals"

print last_street

 

 

Set Table Minor_rd FastEdit On

 

 

Do 

 

fetch first From Minor_rd

street = Minor_rd.Road_Name

print street

 

info_osodr = Minor_rd.OSODR

If info_osodr = "" then Exit Do 

End If

 

Select * From Minor_rd 

   where Road_Name = street

 

Objects Combine

   Data Feature_Code = Feature_Code, Road_Name = Road_Name, Route_Number =
Route_Number, Length_metres = sum(Length_metres)

 

Loop ''until info_osodr = last_osodr

 

Set Table Minor_rd FastEdit Off

 

It works on smaller files (10000 lines in the table)  but when I run it
creates many tmp files (eg ~MAP0634.tmp).  On a larger file it slows it
down, and eventually prevented me opening Mapinfo until I deleted these tmp
files.  Is there a way of preventing the production of these tmp files? Or
at least delate them as it goes along?

 

Best Regards

 

Joe Nunn

 

The XYZ Digital Map Company

Unit 9 Phase 2 Hardengreen Business Park

Dalhousie Road

Dalkeith, EH22 3NX

Scotland

 

Tel: +44 131 561 9645

Fax: +44 131 454 0443

E-mail: [EMAIL PROTECTED]

 

Web: www.xyzmaps.com

 

Reply via email to