ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Aide
  • Sign Out
ArcGIS Desktop

ArcGIS Online

La plateforme cartographique de votre organisation

ArcGIS Desktop

Un SIG professionnel complet

ArcGIS Enterprise

SIG dans votre entreprise

ArcGIS Developers

Outils de création d'applications de localisation

ArcGIS Solutions

Modèles d'applications et de cartes gratuits pour votre secteur d'activité

ArcGIS Marketplace

Téléchargez des applications et des données pour votre organisation.

  • Documentation
  • Support
Esri
  • Se connecter
user
  • Mon profil
  • Déconnexion

ArcMap

  • Accueil
  • Commencer
  • Carte
  • Analyser
  • Gérer les données
  • Outils
  • Extensions

ST_IsClosed

  • Définition
  • Syntaxe
  • Type de retour
  • Exemples

Définition

ST_IsClosed accepte un objet ST_LineString ou ST_MultiLineString et renvoie 1 (Oracle et SQLite) ou t (PostgreSQL) s'il est fermé. Dans le cas contraire, la fonction renvoie 0 (Oracle et SQLite) ou f (PostgreSQL).

Syntaxe

Oracle et PostgreSQL

sde.st_isclosed (line1 sde.st_geometry)
sde.st_isclosed (multiline1 sde.st_geometry)

SQLite

st_isclosed (geometry1 geometryblob)

Type de retour

Booléen

Exemples

Test d'un objet linestring

La table closed_linestring est créée avec une seule colonne d'objets linestring.

Les instructions INSERT suivantes insèrent deux entrées dans la table closed_linestring. La première entrée n'est pas un objet linestring fermé, la deuxième en est un.

La requête renvoie les résultats de la fonction ST_IsClosed. La première ligne renvoie un 0 ou f puisque l'objet linestring n'est pas fermé et la deuxième ligne renvoie un 1 ou t puisque l'objet linestring est fermé.

Oracle

CREATE TABLE closed_linestring (ln1 sde.st_geometry);
INSERT INTO CLOSED_LINESTRING VALUES (
 sde.st_linefromtext ('linestring (10.02 20.01, 10.32 23.98, 11.92 25.64)', 4326)
);

INSERT INTO CLOSED_LINESTRING VALUES (
 sde.st_linefromtext ('linestring (10.02 20.01, 11.92 35.64, 25.02 34.15, 19.15 33.94, 10.02 20.01)', 4326)
);
SELECT sde.st_isclosed (ln1) Is_it_closed
 FROM CLOSED_LINESTRING;

Is_it_closed

0
1

PostgreSQL

CREATE TABLE closed_linestring (ln1 sde.st_geometry);
INSERT INTO closed_linestring VALUES (
 sde.st_linestring ('linestring (10.02 20.01, 10.32 23.98, 11.92 25.64)', 4326)
);

INSERT INTO closed_linestring VALUES (
sde.st_linestring ('linestring (10.02 20.01, 11.92 35.64, 25.02 34.15, 19.15 33.94, 10.02 20.01)', 4326)
);
SELECT sde.st_isclosed (ln1) AS Is_it_closed
FROM closed_linestring;

is_it_closed

f
t

SQLite

CREATE TABLE closed_linestring (id integer);

SELECT AddGeometryColumn (
 NULL,
 'closed_linestring',
 'ln1',
 4326,
 'linestring',
 'xy',
 'null'
);
INSERT INTO closed_linestring VALUES (
 1,
 st_linefromtext ('linestring (10.02 20.01, 10.32 23.98, 11.92 25.64)', 4326)
);

INSERT INTO closed_linestring VALUES (
 2,
 st_linefromtext ('linestring (10.02 20.01, 11.92 35.64, 25.02 34.15, 19.15 33.94, 10.02 20.01)', 4326)
);
SELECT st_isclosed (ln1)
 AS "Is_it_closed"
 FROM closed_linestring;

Is_it_closed

0
1

Test d'un objet multilinestring

La table closed_mlinestring est créée avec une seule colonne d'objets ST_MultiLineString.

Les instructions INSERT suivantes insèrent un enregistrement ST_MultiLineString non fermé et un enregistrement fermé.

Cette requête liste les résultats de la fonction ST_IsClosed. La première ligne renvoie la valeur 0 ou f puisque l'objet multilinestring n'est pas fermé. La deuxième ligne renvoie la valeur 1 ou t puisque l'objet multilinestring stocké dans la colonne ln1 est fermé. Un objet multilinestring est fermé si tous ses éléments linestring sont fermés.

Oracle

CREATE TABLE closed_mlinestring (mln1 sde.st_geometry);
INSERT INTO closed_mlinestring VALUES (
 sde.st_mlinefromtext ('multilinestring ((10.02 20.01, 10.32 23.98, 11.92 25.64), (9.55 23.75, 15.36 30.11))', 4326)
);

INSERT INTO closed_mlinestring VALUES (
 sde.st_mlinefromtext ('multilinestring ((10.02 20.01, 11.92 35.64, 25.02
34.15, 19.15 33.94, 10.02 20.01), (51.71 21.73, 73.36 27.04, 71.52 32.87, 52.43 31.90, 51.71 21.73))', 4326)
);
SELECT sde.st_isclosed (mln1) Is_it_closed
 FROM CLOSED_MLINESTRING;

Is_it_closed

0
1

PostgreSQL

CREATE TABLE closed_mlinestring (mln1 sde.st_geometry);
INSERT INTO closed_mlinestring VALUES (
 sde.st_mlinefromtext ('multilinestring ((10.02 20.01, 10.32 23.98, 11.92 25.64), (9.55 23.75, 15.36 30.11))', 4326)
);

INSERT INTO closed_mlinestring VALUES (
 sde.st_mlinefromtext ('multilinestring ((10.02 20.01, 11.92 35.64, 25.02
34.15, 19.15 33.94, 10.02 20.01), (51.71 21.73, 73.36 27.04, 71.52 32.87, 52.43 31.90, 51.71 21.73))', 4326)
);
SELECT st_isclosed (mln1)
 AS Is_it_closed
 FROM closed_mlinestring;

is_it_closed

f
t

SQLite

CREATE TABLE closed_mlinestring (mln1 geometryblob);

SELECT AddGeometryColumn (
 NULL,
 'closed_mlinestring',
 'mln1',
 4326,
 'multilinestring',
 'xy',
 'null'
);
INSERT INTO closed_mlinestring VALUES (
 st_mlinefromtext ('multilinestring ((10.02 20.01, 10.32 23.98, 11.92 25.64), (9.55 23.75, 15.36 30.11))', 4326)
);

INSERT INTO closed_mlinestring VALUES (
 st_mlinefromtext ('multilinestring ((10.02 20.01, 11.92 35.64, 25.02
34.15, 19.15 33.94, 10.02 20.01), (51.71 21.73, 73.36 27.04, 71.52 32.87, 52.43 31.90, 51.71 21.73))', 4326)
);
SELECT sde.st_isclosed (mln1)
 AS "Is_it_closed"
 FROM CLOSED_MLINESTRING;

Is_it_closed

0
1

Rubriques connexes

  • Charger la bibliothèque ST_Geometry SQLite

ArcGIS Desktop

  • Accueil
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

A propos d'Esri

  • A propos de la société
  • Carrières
  • Blog d’Esri
  • Conférence des utilisateurs
  • Sommet des développeurs
Esri
Donnez-nous votre avis.
Copyright © 2021 Esri. | Confidentialité | Légal