Re: query help on Geography column
От | David G. Johnston |
---|---|
Тема | Re: query help on Geography column |
Дата | |
Msg-id | CAKFQuwYx2QJ1gRjh2pmr-atQ6NVfuJdakvf-j7oBjbLpb9Z1nQ@mail.gmail.com обсуждение исходный текст |
Ответ на | query help on Geography column (Tony Sansom <antonys@nsom.org.uk>) |
Список | pgsql-admin |
HI I’m struggling with retuning data from the following query. It should be retuning all data within a 5k radius of a given Longitude, Latitude point.
Select stuff from MyGeoTable where ST_DWithin(ST_GeographyFromText(‘SRID=4326;POINT(LONG,LAT)’), geog,5000)
Is not 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
I tried to recreate the Geography thus
Update MyGeoTable set geog = (ST_Transform(geom,4326));
This gives “ERROR: Geometry type (LINSTRING) dose not match column type (Polygon)”
My question is twofold
1st how can recreate the geography column, check it has worked?
2nd How might perform a similar query just using the geometry the 5k radius doesn’t have to be exact!
В списке pgsql-admin по дате отправления: