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>237 / 310GEOMETRYCOLLECTION(POINT(-2 3 1),LINESTRING(5 5 5,10 10 10),POLYGON((-7 4.2 5,-7.1 4.25,-7.1 4.3 5,-7 4.2 5)));←↪--3d example not mixing dimensionsSELECT ST_AsEWKT(st_union(the_geom))FROM(SELECT ST_GeomFromEWKT(’POLYGON((-7 4.2 2,-7.1 4.2 3,-7.1 4.3 2,-7 4.2 2))’) as the_geomUNION ALLSELECT ST_GeomFromEWKT(’POINT(5 5 5)’) as the_geomUNION ALLSELECT ST_GeomFromEWKT(’POINT(-2 3 1)’) as the_geomUNION ALLSELECT ST_GeomFromEWKT(’LINESTRING(5 5 5, 10 10 10)’) as the_geom ) as foo;st_asewkt---------GEOMETRYCOLLECTION(POINT(-2 3 1),LINESTRING(5 5 5,10 10 10),POLYGON((-7 4.2 2,-7.1 4.23,-7.1 4.3 2,-7 4.2 2)))←↪--Examples using new Array constructSELECT ST_Union(ARRAY(SELECT the_geom FROM sometable));SELECT ST_AsText(ST_Union(ARRAY[ST_GeomFromText(’LINESTRING(1 2, 3 4)’),ST_GeomFromText(’LINESTRING(3 4, 4 5)’)])) As wktunion;--wktunion---MULTILINESTRING((3 4,4 5),(1 2,3 4))See AlsoST_Collect7.10 Linear Referencing7.10.1 ST_Line_Interpolate_PointST_Line_Interpolate_Point — Returns a point interpolated along a line. Second argument is a float8 between 0 and 1 representingfraction of total length of linestring the point has to be located.Synopsisgeometry ST_Line_Interpolate_Point(geometry a_linestring, float a_fraction);DescriptionReturns a point interpolated along a line. First argument must be a LINESTRING. Second argument is a float8 between 0 and 1representing fraction of total linestring length the point has to be located.See ST_Line_Locate_Point for computing the line location nearest to a Point.NoteSince release 1.1.1 this function also interpolates M and Z values (when present), while prior releases set them to 0.0.

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

Saved successfully!

Ooh no, something went wrong!