Hi,
May guess is that you have forgotten to set your coordsys before creating
your heagons
Try to add this line to your code before your enter the loop: (Set CoordSys
Table "DU"
.
.
.
create table hexagons (dummy integer)
create map for hexagons Coordsys table "DU"
Set CoordSys Table "DU"
Radius = cellR*1000
.
.
.
Peter
------------------------------------------------------------------------------------------------
Peter Horsbøll Møller, GIS-Developer
Kampsax A/S, GIS Software & Solutions, Rugaardsvej 55, DK-5000 Odense, Denmark
tlf: + 45 63 13 50 13, dir: + 45 63 13 50 08, fax: + 45 63 13 50 90
mail: [EMAIL PROTECTED], http://www.mapinfo.dk, http://www.kampsax.dk
------------------------------------------------------------------------------------------------
David RF Wohlgemuth wrote:
Hi listers,
I've got a programme where I've got a list of x,y co-ordinates as the input
and I'm trying to create 3 hexagons around each co-ordinate. For some
reason
these new regions that I am creating do not appear when I add their layer
to
the map. I'm not sure if the objects are being created properly or not.
It's
probably something really obvious. Here is a snippet of my code.
Sub ..... etc
Dim .....
.
.
.
open table "hexagons"
drop table hexagons
create table hexagons (dummy integer)
create map for hexagons Coordsys table "DU"
Radius = cellR*1000
hex_outline = makepen(1,2,Blue)
du_new_sel1_numrows = tableinfo(du_new_sel1, Tab_info_nrows)
for a = 1 to du_new_sel1_numrows
fetch rec a from du_new_sel1
X = du_new_sel1.latitude
Y = du_new_sel1.longitude
X1 = X
Y1 = Y
X2 = ... etc
.
.
.
.
.
Create Region
Into variable three_hex
3
6(x1, y1)(x2, y2)(x3, y3)(x4, y4)(x5, y5)(x6, y6)
6(a1, b1)(a2, b2)(a3, b3)(a4, b4)(a5, b5)(a6, b6)
6(d1, e1)(d2, e2)(d3, e3)(d4, e4)(d5, e5)(d6, e6)
'*** Define the pen colour of the hexagon outline ***
pen hex_outline
insert into hexagons (obj) values (three_hex)
next
_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.