[postgis-users] geometry contains non-closed rings
Scott Schulthess
scott at topozone.com
Thu Apr 6 13:52:00 PDT 2006
Hello,
I was wondering if you could help me out.
I receive this error when I try to run the spatial query.
Npgsql.NpgsqlException: ERROR: XX000: geometry contains non-closed rings
at Npgsql.NpgsqlConnector.CheckErrors()
at Npgsql.NpgsqlConnector.CheckErrorsAndNotifications()
at Npgsql.NpgsqlCommand.ExecuteCommand()
at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior cb)
at Npgsql.NpgsqlCommand.ExecuteReader()
at dbutils.getlayers(Int32 z, Double n1, Double e1, Double n2, Double
e2, Int32 viewscale) in \dbutils.cs:line 47
at GetLayers.GetLayerList(Int32 z, Double n1, Double e1, Double n2,
Double e2, Int32 viewscale) in App_Code\GetLayers.cs:line
That's from my .net webservice - I receive this from the command line.
ERROR: geometry contains non-closed rings
CONTEXT: PL/pgSQL function "getdrglayers" line 3 at for over select
rows
CREATE OR REPLACE FUNCTION getdrglayers(float8, float8, float8, float8,
float8, float8, float8, float8) RETURNS SETOF record AS
$BODY$
declare myview record;
begin
FOR myview IN SELECT sourcescale from stockdrgmeta where
(GeomFromText('POLYGON ((' || $1 || ' ' || $2 || ',' || $3 || ' ' || $4
|| ',' ||
$5 || ' ' || $6 || ',' || $7 || ' ' || $8 || '))', 4269) && geom) and
intersects(GeomFromText('POLYGON ((' || $1 || ' ' || $2 || ',' || $3
|| ' ' || $4 || ',' || $5 || ' ' || $6 || ',' || $7 || ' ' || $8 ||
'))', 4269),geom) order by sourcescale asc
LOOP
return next myview;
END LOOP;
return;
end;$BODY$
And I execute the statement like so
select * from
getdrglayers('-110.96949012708','32.2491676567968','-110.883487063427','
32.1943120714019','-110.88341713745','32.2491175557995','-110.9695084268
38','32.1943620668489') as (sourcescale int4);
Thanks!
-Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20060406/f18da119/attachment.html>
More information about the postgis-users
mailing list