1

i want to ask about erase outside in MapBasic. I have two table : sensus and voronoi And I want to erase the overlap areas. How can I do it?

This is my syntax

Select overlap(sensus.Obj,voronoi.Obj)  
from sensus, voronoi
where sensus.Obj intersects voronoi.Obj 

but that's indicates error 'The object in argument1 cannot be a point'

This is my full source code

'Create Table "voronoi" 
    (Block_no Char(15),Remark Char(10),Type_Palm Char(10),Ha Float) 
    File "D:\voronoi.TAB" 
    TYPE NATIVE Charset "WindowsLatin1"
Create Map For Voronoi CoordSys Earth Projection 1, 104

Set Table Voronoi FastEdit On Undo Off
Create Object As Voronoi from sensus Into Table voronoi
Update voronoi 
    Set Ha = Area(obj, "sq m")
Commit Table Voronoi

Set Table Voronoi FastEdit On Undo Off
select * from Voronoi 
    where Ha >= Val(inputnumber) 
    into __TO__UPDATE NoSelect


Set target on
Select overlap(sensus.Obj,voronoi.Obj)  
from sensus, voronoi
where sensus.Obj intersects voronoi.Obj

Commit Table Voronoi
Close Table __TO__UPDATE

Create Index On voronoi (Block_no)
Add Map Layer voronoi
select * from Voronoi 
    where Ha >= Val(inputnumber)'     

I want to eliminate the line outside the border. Please help me

  • Is your 'sensus' table full of point objects? The problem is that the Overlap() function does not accept point or text objects. I'm not sure that the Overlap() function is indeed the function you need. What is it you are trying to achieve with the two tables? – T_Bacon Jul 6 '15 at 7:18
  • yes my sensus table is full point objects. I already try new syntax 'Select overlap(sensus.Obj,voronoi.Obj) from sensus, voronoi where sensus.Obj intersects voronoi.Obj into test delete from test. But the error message display 'cannot delete from view'. How to fix that? – Junita Jul 6 '15 at 7:44
  • I want to eliminate the objects that are just touching border. Sorry for my language :( – Junita Jul 6 '15 at 7:47
  • So you want to delete voronoi objects where the point objects intersect them? – T_Bacon Jul 6 '15 at 9:46
  • Yes, i wanna delete voronoi objects. But I already know how to delete it. Thanks for your comment. – Junita Jul 7 '15 at 3:10
1

I'm assuming that you want to erase the portions of the voronoi polygons generated from the sensus data that extent beyond its limits.

If you create a convex hull object from the sensus point data (using Create Object), then that would form a boundary polygon that would limit the extent of the voronoi polygons produced at the edges of the sensus dataset. With such a boundary polygon, the voronois could be constrained in two ways:

  1. Set the boundary polygon to be the target prior to running the voronoi command.
  2. Using Objects Intersect command with the voronois set as target, and the boundary polygon selected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.