I used the ST_Envelope function.
Create a field with the X and Y column of your points, and add something
like this:
ST_MakeEnvelope(xcoord-+0.1+, ycoord-+0.1+, xcoord++0.1+,
ycoord++0.1+, 4326))
The above is from my python and pygresql script so ignore the syntax.
However, the idea is the same
Thanks.
I have found a way to do this calculation.
However, since i gave 64818 cells and almost 200 countries, the distance
from every cell to every country is calculated before the minimum distance
is selected.
This takes awful lot of time.
Any ideas on how to increase the performance?
DROP
hmm, I have to admit I don't really understand what you are trying to do, but
there are some thingsI don't think you really mean. select a.gid,
MIN(ST_Distance(a.centroid, b.the_geom)) AS distance FROM pgfinal2008 a,
cshapes b, cshapes c WHERE a.gwcode != b.gwcode AND b.gwsyear lt;= 2008 AND
Ok. I will try to explain more in detail.
I have a vector grid consisting of 64818 grid cells. Each of these cells are
stored in the pgfinal2008 table, with two geometries variables: centroid
(point) and cell (polygon).
Each grid cell have a gwcode variable which is the country code.
In addition
Ok still don't get the second query. If I understand you right you could try
this: CREATE TABLE borddisttest2 ASselect a.gid, a.cell,
MIN(ST_Distance(a.centroid, b.the_geom)) AS distance FROM pgfinal2008 a,
cshapes b, cshapes c WHERE a.gwcode != b.gwcode AND b.gwsyear lt;= 2008 AND
b.gweyear =
Hi,
I am trying to build postgis-1.5.2 with postgresql-9.0.1 and i am getting
following error while building the sources:
c:/pginstaller.pune-repo/proj-4.6.1.staging/lib/proj.lib(pj_utils.obj):(.text+0x47):
undefined reference to `__security_cookie'
Dharmendra Goyal wrote:
Hi,
I am trying to build postgis-1.5.2 with postgresql-9.0.1 and i am
getting following error while building the sources:
c:/pginstaller.pune-repo/proj-4.6.1.staging/lib/proj.lib(pj_utils.obj):(.text+0x47):
undefined reference to `__security_cookie'
Hi,
I realise this is probably a very basic question but if anyone could point
me in the right direction i'd be very grateful.
I have a database which is just my data table and geometry columns and
spatial_ref_sys tables.
The data is of a significant volume with periodic updates which take
On 21 October 2010 04:38, lplateandy a...@centremaps.co.uk wrote:
Of course, even better would be a way to reindex whilst a database is in use
but i'm under the impression that this is not possible at the moment?
If you DROP/CREATE your index then reads are blocked. But if you use
REINDEX then
Hi Mike,
OK - that's really useful. Does that only work for 9 or does it just happen
you're pointing to the 9 document?
The doc says It also takes an exclusive lock on the specific index being
processed, which will block reads that attempt to use that index.
Does that mean that i'm not really
On 21 October 2010 07:24, lplateandy a...@centremaps.co.uk wrote:
Hi Mike,
OK - that's really useful. Does that only work for 9 or does it just happen
you're pointing to the 9 document?
The doc says It also takes an exclusive lock on the specific index being
processed, which will block
On 10/21/2010 7:24 AM, lplateandy wrote:
The doc says It also takes an exclusive lock on the specific index being
processed, which will block reads that attempt to use that index.
Does that mean that i'm not really any better off as the spatial index is
really the critical means controlling the
Thanks Kevin, greatly appreciated. I think i'll make a lot of use of this...
Andy
===
I know, it looks complicated, but in a production system, this will be
fast with minimal downtime (only during the final locking swap).
Cheers,
Kevin
Hi,
I have, in the simplest example, a square polygon of 1 by 1 kilometer size
with nodes every 25 meters.
I can use ST_Simplify (the_geom,5) to remove most of the points.
However, for some reason i end up with the four corner nodes and a fifth
node 25m clockwise from the top left corner.
In
Hi Andy,
Can you post a small example?
-- Kevin
On 10/21/2010 10:02 AM, lplateandy wrote:
Hi,
I have, in the simplest example, a square polygon of 1 by 1 kilometer size
with nodes every 25 meters.
I can use ST_Simplify (the_geom,5) to remove most of the points.
However, for some reason i
The databases were created by restoring the pg_dumpall backup, so I
installed Postgis (psql -d [yourdatabase] -f postgis.sql) in all of
them and tried the restore again, with the same errors. In addition to
the liblwgeom errors (below), which presumably I can ignore, the
restore also
16 matches
Mail list logo