[postgis-users] POLYGON with more then 3 sides?

Twan Kogels twan at twansoft.com
Sun Aug 17 13:14:42 PDT 2003


Oops, that's a stupid fault op me :-) I thought a polygon was made up of 
lines, should have read better. Tryed your solution and it works perfect!

Thanks for the very quick reply.

Twan

At 12:40 17-8-2003 -0700, you wrote:
>You are misformatting the WKT of your polygon. Your polygon from below 
>*should*
>look like this:
>
>POLYGON((
>152300.49174 414483.593175,152300.49174 414483.593175,
>152300.49174 414483.593175,152441.23152 414436.660073,
>152441.23152 414436.660073,152352.17584 414352.339586,
>152352.17584 414352.339586,152280.61324 414383.363161,
>152280.61324 414383.363161,152300.49174 414483.593175
>))
>
>The above polygon consists of one ring of five points. Your polygon consisted
>of five rings of one point. Hence the error.
>
>P
>
>Quoting Twan Kogels <twan at twansoft.com>:
>
> > Hello,
> >
> > I created a applicatie where the user draws a area on a map. When the area
> > drawn is saved i convert the x and y coordinates of the serveral points of
> > the area to geo coordinates. After that i generate my sql query to insert a
> > POLYGON into a GEOMETRY column.
> >
> > Postgis gives me the following error:
> > =============
> > ERROR: polygon has ring with <3 points
> > =============
> >
> > My query:
> > =============
> > insert into gebruikercommentaar (gebid, projid, comid, the_geom) values
> > ('1', '33', '6', GeometryFromText('POLYGON(
> > (152300.49174 414483.593175,152300.49174 414483.593175),
> > (152300.49174 414483.593175,152441.23152 414436.660073),
> > (152441.23152 414436.660073,152352.17584 414352.339586),
> > (152352.17584 414352.339586,152280.61324 414383.363161),
> > (152280.61324 414383.363161,152300.49174 414483.593175)
> > )',-1))
> > =============
> >
> > Most of the time the area drawn has more then 3 sides, i guess that's why
> > postgis gives me a error, cause a POLYGON can't have more then 3 sides.
> >
> > Is there a GIS object which supports a figure polygon with more the 3
> > sides, for example 10?
> >
> > Twan
> >
> >
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
>
>
>
>
>
>_______________________________________________
>postgis-users mailing list
>postgis-users at postgis.refractions.net
>http://postgis.refractions.net/mailman/listinfo/postgis-users




More information about the postgis-users mailing list