objectinfo(obj,21) or ...,obj_info_npolygons) yields the number of polygons for the object.
 
e.g. if you
    select * from your_table where objectinfo(obj,21)>1 into selec
you will get the table "selec" with all your multi-polygons regions (records)
 
To "explode" those regions you have to write an iterative program, going through each region and for each one reading the required info with
    objectinfo(obj,21+poly_num) to get the number of nodes in each polygon abd
    objectnodeX(obj,poly_num,node_num) and objectnodeY(..) for each node coordinates
then create a single-polygon region with these nodes.
 
A rather straight forward progam! Good luck.
 
Jacques Paris
============================================================
e-mail        [EMAIL PROTECTED]   
   alternate   [EMAIL PROTECTED]
 
gis activity (MapInfo mainly)
      http://www.total.net/~rparis/gisproducts.htm
============================================================
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Graham Smith
Sent: July 31, 1999 10:54 AM
To: [EMAIL PROTECTED]
Subject: MI Splitting polygons

Hi everyone,
 
I have a MapInfo layer containing a large number of records. Most of the records are single geometric shapes (polygons), but some are comprised of geographically separate polygons that have been combined into a single record. I need to be able to split these combined polygons so that in the resulting table every record in the table represents a single geometric shape (polygon).
 
Does anyone know how this can be done automatically using mapbasic?  I know that it can be done interactively, by drawing a shape around a polygon in the cosmetic layer and using the "Split" command, but I have around 50,000 records in the table and it would take forever to do this manually. Is there some way of identifying from the .MAP file whether a record consists of more than one polygon?
 

Graham Smith
[EMAIL PROTECTED]
 
 
 
 

Reply via email to