[prev in list] [next in list] [prev in thread] [next in thread]
List: postgis-users
Subject: Re: [postgis-users] How to select points within circle,
From: zhang zhe <luckyclare () hotmail ! com>
Date: 2010-10-19 13:06:32
Message-ID: SNT110-W59D87CB66E2F92161F3B2CDE5B0 () phx ! gbl
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hello,
thanks it works.
BR,
JoJo
Date: Tue, 19 Oct 2010 12:53:22 +0200
From: nicklas.aven@jordogskog.no
To: postgis-users@postgis.refractions.net
CC:
Subject: Re: [postgis-users] How to select points within circle
Your syntax is a little backwards an it is better to use st_dwithin instead:
select gid, the_geom, floorarea from "building" as m where \
ST_DWithin(m.geom,'POINT(306404701,6755737)'::geometry, 200.0);
HTH
Nicklas
2010-10-19 zhang zhe wrote:
Hello,
>
> I have one table called building.sql which contains points. I want to select \
> building which fall within a circle. This circle is not a sql table but instead \
> only coordinate and radius such as circle(point '(0,0)', 2.0).
> My sql query is like this
> select gid, the_geom, floorarea from "building" as m where m.geom \
> within(GeoFromText(circle(point '(306404701,6755737)', 200.0)));
> But it gives me erro. Does anyone knows where went wrong?
>
> Thanks a lot
>
>
_______________________________________________ postgis-users mailing list \
postgis-users@postgis.refractions.net \
http://postgis.refractions.net/mailman/listinfo/postgis-users
[Attachment #5 (text/html)]
<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
<BR> Hello,<BR>
<BR>
thanks it works. <BR>
<BR>
BR,<BR>
JoJo<BR>
<HR id=stopSpelling>
Date: Tue, 19 Oct 2010 12:53:22 +0200<BR>From: nicklas.aven@jordogskog.no<BR>To: \
postgis-users@postgis.refractions.net<BR>CC: <BR>Subject: Re: [postgis-users] How to \
select points within circle<BR><BR> <META content="Microsoft SafeHTML" \
name=Generator> <DIV align=left>Your syntax is a little backwards an it is better to \
use st_dwithin instead:</DIV> <DIV align=left> </DIV>
<DIV align=left>select gid, the_geom, floorarea from "building" as m where \
ST_DWithin(m.geom,'POINT<SPAN style="FONT-FAMILY: Courier \
New">(306404701,6755737)'::geometry, 200.0</SPAN>);<BR></DIV> <DIV \
align=left>HTH</DIV> <DIV align=left>Nicklas<BR><BR>2010-10-19 zhang zhe \
wrote:<BR><BR>Hello,<BR>> <BR>> I have one table called building.sql \
which contains points. I want to select building which fall within a circle. This \
circle is not a sql table but instead only coordinate and radius such as <SPAN \
style="FONT-FAMILY: Courier New">circle(point '(0,0)', 2.0)</SPAN>. <BR>> \
<BR>> My sql query is like this <BR>> select gid, the_geom, floorarea \
from "building" as m where m.geom within(GeoFromText(<SPAN style="FONT-FAMILY: \
Courier New">circle(point '(306404701,6755737)', 200.0))</SPAN>);<BR>> \
<BR>> But it gives me erro. Does anyone knows where went wrong? <BR>> \
<BR>> Thanks a lot<BR>> <BR>> \
</DIV><BR>_______________________________________________ postgis-users mailing list \
postgis-users@postgis.refractions.net \
http://postgis.refractions.net/mailman/listinfo/postgis-users </body> \
</html>
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic