[postgis-users] POLYGON from LINESTRING

Bernhard Reiter bernhard@intevation.de
Thu Apr 25 14:27:48 2002


---------------------- multipart/signed attachment
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.=20

Could have been a PostGIS addition or a commonly asked question,=20
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,=20
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:
> >=20
> > Is there a simple way to create a POLYGON from
> > a LINESTRING which tests positive to IsClosed()?
> >=20
> > Same for MULTIPOLYGON from MULTILINESTRING?
> >=20
> > I haven't found a obvious and simple method.
> > What am I missing?

---------------------- multipart/signed attachment
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 248 bytes
Desc: not available
Url : http://lists.refractions.net/pipermail/postgis-users/attachments/20020425/13606ab8/attachment.bin

---------------------- multipart/signed attachment--