Well, I stand corrected. Indeed "Create object as buffer" will accept
negative buffers. Having retraced my operations, I just found out that the
incriminating message "Warning: Operation did not produce a result.  No
errors detected" that I obtained on my first test, means simply that the
object was completely wiped out by the buffering because of the size of the
width. Reducing sufficiently its size produced a result.

It is interesting to know that directing the object to a variable works also
very well. However the conditions for producing a result are different.

If the buffer width is such as that some object is created (not ALL polygons
are wiped out by buffering), then the into TABLE will work.
Note: as the buffer object thus created is a single multiple-polygon region,
and as there is one "polygon" for each original one, the buffer object will
contain some "null" polygons (area=0)

If the buffer width is such as that ONE of the table polygons is wiped out
by buffering, then into VARIABLE will NOT work.

These rules can be extended to a table containing multiple-polygon regions.
If only a one of the polygons of a multi-polygon region is wiped out, into
Variable will not work, while into Table will work!

Jacques Paris
e-mail  [EMAIL PROTECTED]
MapBasic-MapInfo support  http://www.paris-pc-gis.com

-----Original Message-----
From: Colin Henderson [mailto:[EMAIL PROTECTED]]
Sent: January 14, 2002 07:47
To: 'Jacques Paris'; '[EMAIL PROTECTED]'
Subject: RE: MI-L SUM Problems creating buffer in MapBasic

This was also my first suspicion! However the command ("Create Object As
Buffer") works perfectly when the negative buffer is being created into a
table.  Yet, when you try and put it into a variable it does not work -
surely if it can be created into a table then there is no real reason why it
can't be created into a variable!

Any further thoughts?

Colin Henderson

-----Original Message-----
From: Jacques Paris [mailto:[EMAIL PROTECTED]]
Sent: 14 January 2002 12:41
To: Colin Henderson; [EMAIL PROTECTED]
Subject: RE: MI-L SUM Problems creating buffer in MapBasic


A precision is necessary: you must specify that your comments refer to the
"Create Object as Buffer" statement which does not support negative width
(internal buffers) at the opposite of the buffer() function. Reading the
Help file would confirm that: negative values can be specified in the
buffer() function only. If sometimes, one must read the help file with
circumspection and between lines, I have found that what is not said is very
important, such as in this case.

Jacques Paris
e-mail  [EMAIL PROTECTED]
MapBasic-MapInfo support  http://www.paris-pc-gis.com

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Colin Henderson
Sent: January 14, 2002 04:09
To: '[EMAIL PROTECTED]'
Subject: MI-L SUM Problems creating buffer in MapBasic

Thanks to all who helped with this issue, though there was no definite
answer to this problem I was offered a work around which whilst not entirely
desirable, certainly does the trick.  Here is a summary of the problem and
its workaround:

PROBLEM

I needed to create an internal buffer of objects in a table, this could be
achieved on my data using the buffer menu option, I did not however want the
buffer created in my original table - nor did I want to create a specific
buffer table! I also needed the buffer to be created using MapBasic code as
part of a program.  The problem occurs when trying to create a buffer into
an object variable, when doing this MapInfo throws up the following warning
message:

"Warning: Operation did not produce a result.  No errors detected"

The object variable is properly initialised and the MB statement is correct.

SOLUTION

The simplest solution came from Paul Crisp:

"You COULD just do something like this
(because it works)

Set the cosmetic layer editable
Create the buffer into the cosmetic layer
Fish the object out of the cosmetic layer
Clear the cosmetic layer out and set it editable off."

ISSUES

There is no feasible reason why the code and data I am using will cause
MapInfo to produce the error as the exact same data and statement will allow
a buffer to be created in a separate table or the cosmetic layer.  I feel
this is something that requires further investigation!

Kind Regards,
Colin Henderson
GI Developer
Ordnance Survey
Romsey Road
Southampton SO16 4GU




***************************************************************
For more information on Ordnance Survey products and services,
visit our web site at http://www.ordnancesurvey.co.uk
***************************************************************





_______________________________________________________________________
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.




***************************************************************
     This email/attachment(s) has been virus checked upon
        receipt at the OS and is free of all known viruses.

***************************************************************





***************************************************************
For more information on Ordnance Survey products and services,
visit our web site at http://www.ordnancesurvey.co.uk
***************************************************************




_______________________________________________________________________
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.

Reply via email to