12.07.2015 Views

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>PostGIS</strong> <strong>1.5.8</strong> <strong>Manual</strong>177 / 310CREATE TABLE roads (id serial NOT NULL,the_geom geometry,CONSTRAINT roads_pkey PRIMARY KEY ( ←↪road_id));CREATE TABLE highways (id serial NOT NULL,the_gem geometry,CONSTRAINT roads_pkey PRIMARY KEY ( ←↪road_id));To determine a list of roads that cross a highway, use a query similiar to:SELECT roads.idFROM roads, highwaysWHERE ST_Crosses(roads.the_geom, highways.the_geom);7.8.10 ST_LineCrossingDirectionST_LineCrossingDirection — Given 2 linestrings, returns a number between -3 and 3 denoting what kind of crossing behavior.0 is no crossing.Synopsisinteger ST_LineCrossingDirection(geometry linestringA, geometry linestringB);DescriptionGiven 2 linestrings, returns a number between -3 and 3 denoting what kind of crossing behavior. 0 is no crossing. This is onlysupported for LINESTRINGDefinition of integer constants is as follows:• 0: LINE NO CROSS• -1: LINE CROSS LEFT• 1: LINE CROSS RIGHT• -2: LINE MULTICROSS END LEFT• 2: LINE MULTICROSS END RIGHT• -3: LINE MULTICROSS END SAME FIRST LEFT• 3: LINE MULTICROSS END SAME FIRST RIGHTAvailability: 1.4Examples

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!