[postgis-users] POLYGON from LINESTRING

Bernhard Reiter bernhard at intevation.de
Thu Apr 25 06:27:48 PDT 2002


On Wed, Apr 24, 2002 at 03:46:04PM -0700, Paul Ramsey wrote:
> No there is not a simple way. Type casting is not specified in SFSQL. 

Could have been a PostGIS addition or a commonly asked question, 
couldn't it? :)

> I guess it behooves me to ask why you are loading your polygons as
> linestrings?

Well a matter of the source quality.
It is a layer coming over by shape format, 
which mostly contains linestrings.
Some of them are areas, though.

Of course SQL queries and the PostGIS function can be used to
identify the linestrings that should be polygons.

> (The non simple way is to extract them, re-write their types as POLYGON
> and re-insert them.)

Thought of that, but wanted to be sure.
Thanks.

> Bernhard Reiter wrote:
> > 
> > Is there a simple way to create a POLYGON from
> > a LINESTRING which tests positive to IsClosed()?
> > 
> > Same for MULTIPOLYGON from MULTILINESTRING?
> > 
> > I haven't found a obvious and simple method.
> > What am I missing?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 248 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20020425/13606ab8/attachment.pgp>


More information about the postgis-users mailing list