Geographic Information Systems in the Sciences

This page contains information about MapBasic


MapBasic programs:


Some MapBasic tasks:

Creating a table and putting objects and columns into it:

'-- create table and define columns
  create table table_name
   (Height float)

'- make table mappable so objects can be inserted into it
  create map for table_name

'-- create a rectangle object (or use 'create rect' command)
  create region into variable tobj 1 4
  (x-dx/2, y-dy/2) (x+dx/2, y-dy/2) (x+dx/2, y+dy/2) (x-dx/2, y+dy/2)

'-- t is some value to go into the table in the Height column
  t = x-y

' -- insert into table
  insert into table_name (Height, Obj) values (t, tobj)

'-- write out table
  commit table table_name as "my_table"