Страница 1 из 1

Результат пересечения всех объектов одного слоя со всеми объ

Добавлено: 19 июн 2016, 14:24
Megalit
Подскажите, пожалуйста, как с помощью MapBasic получить результат (новые объекты) пересечения всех полигональных объектов одного слоя со всеми полигональными объектами другого.

Re: Результат пересечения всех объектов одного слоя со всеми

Добавлено: 19 июн 2016, 16:34
trir
select tbl1.geom.STIntersects(tbl2.geom) from tbl as tbl1, tbl as tbl2

Re: Результат пересечения всех объектов одного слоя со всеми

Добавлено: 19 июн 2016, 16:50
Megalit
Большое спасибо за оперативный ответ, только меня интересует как это сделать в mapbasic.

Re: Результат пересечения всех объектов одного слоя со всеми

Добавлено: 19 июн 2016, 19:47
Boris
Megalit писал(а):Большое спасибо за оперативный ответ, только меня интересует как это сделать в mapbasic.
Если в mapbasic, а не через запрос,то вот так:

Код: Выделить всё

Overlap( ) function 
Purpose 
Returns an object representing the geographic intersection of two objects; produces results similar to MapInfo Professional's Objects > Erase Outside command. You can call this function from the MapBasic Window in MapInfo Professional. 

Syntax 
Overlap( object1, object2 )  
object1 is an object; it cannot be a point or text object. 

object2 is an object; it cannot be a point or text object. 

Return Value 
An object that is the geographic intersection of object1 and object2. 

Description 
The Overlap( ) function calculates the geographic intersection of two objects (the area covered by both objects), and returns an object representing that intersection. 

MapBasic retains all styles (color, etc.) of the original object1 parameter; then, if necessary, MapBasic applies the current drawing styles. 

If one of the objects is linear (for example, a polyline) and the other object is closed (for example, a region), Overlap( ) returns the portion of the linear object that is covered by the closed object. 

See Also: 
AreaOverlap( ) function, Erase( ) function, Objects Intersect statement