|
|
|
|
- Parcours des données spatiales : utilisation des index spatiaux
<Polygon2D variable>.Intersect (Function) In french: <Variable Polygone2D>.Intersecte Checks whether a 2D polygon and another geometry have a non-empty intersection. Remarks:
o2DPolygon_1 is Polygon2D
o2DPolygon_1.Outline.AddPoint(-1.00, 3.00)
o2DPolygon_1.Outline.AddPoint(0.00, 3.00)
o2DPolygon_1.Outline.AddPoint(-2.00, -1.00)
o2DPolygon_1.Outline.AddPoint(-3.00, -1.00)
o2DPolygon_1.Outline.AddPoint(-1.00, 3.00)
o2DPolygon_1 = o2DPolygon_1.Correct()
o2DPolygon_2 is Polygon2D
o2DPolygon_2.Outline.AddPoint(2.00, 4.00)
o2DPolygon_2.Outline.AddPoint(3.00, 4.00)
o2DPolygon_2.Outline.AddPoint(3.00, -2.00)
o2DPolygon_2.Outline.AddPoint(-2.00, -2.00)
o2DPolygon_2.Outline.AddPoint(2.00, 4.00)
o2DPolygon_2 = o2DPolygon_2.Correct()
Trace(o2DPolygon_1.Intersect(o2DPolygon_2))
o2DPolygon_1 is Polygon2D
o2DPolygon_1.Outline.AddPoint(-1.00, 3.00)
o2DPolygon_1.Outline.AddPoint(0.00, 3.00)
o2DPolygon_1.Outline.AddPoint(-2.00, -1.00)
o2DPolygon_1.Outline.AddPoint(-3.00, -1.00)
o2DPolygon_1.Outline.AddPoint(-1.00, 3.00)
o2DPolygon_1 = o2DPolygon_1.Correct()
o2DPolygon_2 is Polygon2D
o2DPolygon_2.Outline.AddPoint(1.00, 4.00)
o2DPolygon_2.Outline.AddPoint(3.00, 4.00)
o2DPolygon_2.Outline.AddPoint(3.00, 1.00)
o2DPolygon_2.Outline.AddPoint(-1.00, -1.00)
o2DPolygon_2.Outline.AddPoint(-3.00, 1.00)
o2DPolygon_2.Outline.AddPoint(1.00, 4.00)
o2DPolygon_2 = o2DPolygon_2.Correct()
Trace(o2DPolygon_1.Intersect(o2DPolygon_2))
Syntax
<Result> = <Geometry A>.Intersect(<Geometry B>)
<Result>: Boolean - True if the two geometries have a non-empty intersection,
- False otherwise.
If an error occurs, the ErrorOccurred variable is set to True. To get more details on the error, use ErrorInfo with the errMessage constant.
<Geometry A>: Polygon2D variable Name of the Polygon2D variable to be used. <Geometry B>: Variable containing spatial data Second input geometry used for the intersection. This geometry can correspond to one of the following variable types: Remarks Parcours des données spatiales : utilisation des index spatiaux Il est possible d'effectuer un parcours sur un fichier de données avec un filtre concernant des données spatiales. Par exemple, le filtre utilisé peut être basé sur le résultat de la fonction <Polygon2D variable>.Intersect. Pour optimiser ce filtre sur des données spatiales, il est recommandé d'utiliser les index spatiaux via la syntaxe suivante : POUR TOUT Fichier AVEC Fonction_WLangage(Fichier.RubriqueSpatiale, variable_spatiale) où : - Fonction_WLangage correspond à la fonction <Polygon2D variable>.Intersect.
- Rubrique_spatiale correspond à une rubrique spatiale du fichier de données. Cette rubrique doit :
- être de type "Données géographiques" ou de type "Données géométriques".
- être définie comme une "Clé spatiale".
- Variable_spatiale correspond à une variable spatiale donnée, utilisée pour la comparaison avec la rubrique spatiale. Cette variable est par exemple, une variable de type PolygoneGéo, Polygone2D, etc.
Remarque : Bien que disponible, la syntaxe "POUR TOUT Fichier" n'est pas recommandée car cette syntaxe n'utilisant pas les index spatiaux, ses performances ne sont pas optimisées. Effet, dans ce cas, tout le fichier de données est parcouru : les index spatiaux ne sont pas utilisés. POUR TOUT Fichier SI Fonction_WLangage(Fichier.Rubrique_spatiale, Variable_spatiale) = Vrai ALORS ... FIN FIN Business / UI classification: Business Logic
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|