вопрос по mapbasic
-
- Новоприбывший
- Сообщения: 6
- Зарегистрирован: 18 авг 2007, 10:35
- Репутация: 0
вопрос по mapbasic
С помощью какой функции можно на пересечениях линий поставить точечный объект?
-
- Гуру
- Сообщения: 4231
- Зарегистрирован: 10 апр 2006, 22:34
- Репутация: -344969098
- Откуда: Париж
Re: вопрос по mapbasic
Вот цитата из MapBasic Help 9.5:solo_2307 писал(а):С помощью какой функции можно на пересечениях линий поставить точечный объект?
OverlayNodes( ) function
Purpose
Returns an object based on an existing object, with new nodes added at points where the object intersects a second object.
Syntax
OverlayNodes( input_object, overlay_object )
input_object is an object whose nodes will be included in the output object; it may not be a point or text object.
overlay_object is an object that will be intersected with input_object; it may not be a point or text object.
Return Value
A region object or a polyline object.
Description
The OverlayNodes( ) function returns an object that contains all the nodes in input_object plus nodes at all locations where the input_object intersects with the overlay_object.
If the input_object is a closed object (region, rectangle, rounded rectangle, or ellipse), OverlayNodes( ) returns a region object. If input_object is a linear object (line, polyline, or arc), OverlayNodes( ) returns a polyline.
The object returned retains all styles (color, etc.) of the original input_object.
To determine whether the OverlayNodes( ) function added any nodes to the input_object, use the ObjectInfo( ) function to count the number of nodes (OBJ_INFO_NPNTS). Even if two objects do intersect, the OverlayNodes( ) function does not add any nodes if input_object already has nodes at the points of intersection.
See Also
Objects Overlay statement

-
- Новоприбывший
- Сообщения: 6
- Зарегистрирован: 18 авг 2007, 10:35
- Репутация: 0
Re: вопрос по mapbasic
Данная функция, добавляет только узлы на пересечениях. А мне необходимо,чтобы на этих пересечениях был поставлен точечный объект. Или хотя бы, функция, которая считывает координаты узлов пересечений, а потом по этим пересечениям был поставлен точечный объект.
-
- Гуру
- Сообщения: 4231
- Зарегистрирован: 10 апр 2006, 22:34
- Репутация: -344969098
- Откуда: Париж
Re: вопрос по mapbasic
Да, понятно, что я не верно прочитал задачу.
Тогда такая функция:
IntersectNodes( ) function
Purpose
Calculates the set of points at which two objects intersect, and returns a polyline object that contains each of the points of intersection.
Syntax
IntersectNodes( object1, object2, points_to_include )
object1 and object2 are object expressions; may not be point or text objects.
points_to_include is one of the following SmallInt values:
INCL_CROSSINGS returns points where segments cross.
INCL_COMMON returns end-points of segments that overlap.
INCL_ALL returns points where segments cross and points where segments overlap.
Return Value
A polyline object that contains the specified points of intersection.
Description
The IntersectNodes( ) function returns a polyline object that contains all nodes at which two objects intersect.
PS
Я не проверял, но если объекты полигоны, а не полилинии, то надо посмотреть какую именно линию пересечения она возвращает.
А извлечь точки из созданной полилинии - наверное не проблема?
Тогда такая функция:
IntersectNodes( ) function
Purpose
Calculates the set of points at which two objects intersect, and returns a polyline object that contains each of the points of intersection.
Syntax
IntersectNodes( object1, object2, points_to_include )
object1 and object2 are object expressions; may not be point or text objects.
points_to_include is one of the following SmallInt values:
INCL_CROSSINGS returns points where segments cross.
INCL_COMMON returns end-points of segments that overlap.
INCL_ALL returns points where segments cross and points where segments overlap.
Return Value
A polyline object that contains the specified points of intersection.
Description
The IntersectNodes( ) function returns a polyline object that contains all nodes at which two objects intersect.
PS
Я не проверял, но если объекты полигоны, а не полилинии, то надо посмотреть какую именно линию пересечения она возвращает.
А извлечь точки из созданной полилинии - наверное не проблема?
Кто сейчас на конференции
Сейчас этот форум просматривают: нет зарегистрированных пользователей и 2 гостя