Tag Info

New answers tagged

0

Matej, Thats because Google API allow to pull up to 2.5k per day. About the Geo solution, batch is not yet found to be supported that's because from my review of the geo python code it's seems to open connection every time he request a new cordinate, 300k will probably stuck forever (probably with error 400). Play with Poligons should do the trick but it's ...


0

WITH sub_count AS ( SELECT count(*) as total_cust from customers ) SELECT a.id AS store, count(b.*), count(b.*)::numeric/sub_count.total_cust AS customer_count FROM stores a, customers b, sub_count WHERE ST_DWithin(a.the_geom::geography,b.the_geom::geography,5000) GROUP BY a.id, sub_count.total_cust


0

I Know you've already accepted a answer but for people still looking for this, here's one query i wrote SELECT ENVELOPE( GEOMFROMTEXT( CONCAT( 'MULTIPOLYGON((', GROUP_CONCAT( TRIM( TRAILING ')' FROM SUBSTR( ASTEXT( object.polygon ) , 9 ) ) , ')' ) , '))' ) ) ) AS POLYGON FROM object This give's you the Minimal bounding rectangle for a row containing ...


4

There is simple query for this case. SELECT a.id AS store,count(b.*) AS customer_count FROM stores a, customers b WHERE ST_DWithin(a.geom::geography,b.geom::geography,5000) GROUP BY a.id I have stored my sample data in the projection WGS 84 (4326). When you want to use a metric system, you have to convert the geometries to geography format. The ...



Top 50 recent answers are included