query help on Geography column - Mailing list pgsql-admin

From Tony Sansom
Subject query help on Geography column
Date
Msg-id 1378709182.486284.412e6889-ac3f-48b6-a9fa-43bc9966acbf.open-xchange@email.1and1.co.uk
Whole thread Raw
Responses Re: query help on Geography column
List pgsql-admin
<p class="ox-79e96e5d2c-MsoNormal">HI I’m struggling with retuning data from the following query. It should be retuning
alldata within a 5k radius of a given Longitude, Latitude point.<p class="ox-79e96e5d2c-MsoNormal">Select stuff from
MyGeoTablewhere ST_DWithin(ST_GeographyFromText(‘SRID=4326;POINT(LONG,LAT)’), geog,5000)<p
class="ox-79e96e5d2c-MsoNormal">Isnot retuning all data it should be best guess there is an issue with the Geography
column this was created from a geometry column which is a collection of points lines and polygons<p
class="ox-79e96e5d2c-MsoNormal">Itried to recreate the Geography thus<p class="ox-79e96e5d2c-MsoNormal"
style="margin-left:72.0pt;">Update MyGeoTable set geog = ­(ST_Transform(geom,4326));<p
class="ox-79e96e5d2c-MsoNormal">Thisgives “ERROR: Geometry type (LINSTRING) dose not match column type (Polygon)”<p
class="ox-79e96e5d2c-MsoNormal">Myquestion  is twofold<p class="ox-79e96e5d2c-MsoNormal">1<sup style="line-height:
0;">st</sup>how can recreate the geography column, check it has worked?<p class="ox-79e96e5d2c-MsoNormal">2<sup
style="line-height:0;">nd</sup>  How might perform a similar query just using the geometry the 5k radius doesn’t have
tobe exact!<p class="io-ox-signature">Thanx for your help<br /> 

pgsql-admin by date:

Previous
From: bricklen
Date:
Subject: Re: Ideal configuration for postgresql 9.3 config
Next
From: "David G. Johnston"
Date:
Subject: Re: query help on Geography column