| 02:07:44 | arkygeek: | hi everyone |
| 02:08:27 | arkygeek: | I am trying to follow the example given in postgis-introduction but am having problems... |
| 02:09:04 | arkygeek: | I want to do two things... first, I want to count the number of points within 30km of a particular point |
| 02:09:31 | arkygeek: | second, I want to make a list of all of those sites |
| 02:09:45 | arkygeek: | ( with their distance from the site shown ) |
| 02:10:38 | arkygeek: | select astext( the_geom ) from jadis where SiteNo=2022002; that gives me: POINT( 744800 3611100 ) |
| 02:10:45 | arkygeek: | thats the starting point |
| 02:27:31 | arkygeek: | epifanio: hi |
| 02:27:38 | epifanio: | hi |
| 02:28:08 | arkygeek: | when/if you have a couple minutes, I am having trouble with a couple of things... |
| 02:28:17 | arkygeek: | I want to do two things... first, I want to count the number of points within 30km of a particular point |
| 02:28:22 | arkygeek: | second, I want to make a list of all of those sites |
| 02:28:29 | arkygeek: | select astext( the_geom ) from jadis where SiteNo=2022002; that gives me: POINT( 744800 3611100 ) |
| 02:29:00 | arkygeek: | select sum( jadis ) as sites_near_shuna where the_geom && setsrid( expand( 'POINT( 744800 3611100 )'::geometry,30000 ),32636 ) <---- thats about as far as I got |
| 02:36:00 | arkygeek: | epifanio: I just tried this, but it errors on me.... select sum( jadis ) as SiteNo from jadis where the_geom && setsrid( expand( 'POINT( 744800 3611100 )'::geometry,30000 ),32636 ) and distance( the_geom, geomfromtext( 'POINT( 744800 3611100 )', 32636 ) ) <30000; |
| 02:41:53 | arkygeek: | http://rafb.net/p/oX4HZB37.html |
| 02:41:54 | sigq: | Title: Nopaste - distance problem ( at rafb.net ) |
| 02:43:23 | arkygeek: | it is adding the value of the site numbers up. i want it to count them.... :s |
| 02:48:38 | arkygeek: | jadis=# select sum( SiteNo ) as SiteNumbers from jadis where ST_DWithin( the_geom, ST_GeomFromText( 'POINT( 744800 3611100 )',32636 ), 30000 ); |
| 02:48:46 | arkygeek: | that gives the same result :'( |
| 02:49:14 | CIA-6: | robe * r2838 /trunk/doc/reference.xml: Example uses of ST_Line_SubString |
| 02:50:11 | arkygeek: | heh. i guess count might be a bit more suitable ( eep! ) |
| 02:53:24 | arkygeek: | jadis=# select count( SiteNo ) as SiteNumbers from jadis where EBronze=2 and ST_DWithin( the_geom, ST_GeomFromText( 'POINT( 744800 3611100 )',32636 ), 30000 ); |
| 02:53:28 | arkygeek: | thats working nicely :P |
| 05:39:36 | darkblue_B: | g'morning jlivni |
| 05:39:55 | darkblue_B: | I now have a Very Large pg_dimp, created with -Fc |
| 05:40:00 | darkblue_B: | pg_dump |
| 05:40:32 | darkblue_B: | I see that the PostGIS functions are there, but ref'd as $libdir/liblwgeom.so.1.0 |
| 05:40:42 | darkblue_B: | so.. how does the DB load go? |
| 05:42:21 | bitner: | http://postgis.refractions.net/documentation/manual-1.3/ch02.html#id2852598 |
| 05:42:22 | sigq: | Title: Chapter 2. Installation ( at postgis.refractions.net ) |
| 05:42:29 | bitner: | section 2.2.2.2 should help you |
| 05:56:18 | darkblue_B: | oohhhh -t "*" works too? |
| 05:56:22 | darkblue_B: | hi bitner |
| 05:56:25 | darkblue_B: | ok looking |
| 05:58:11 | darkblue_B: | huh.. the postgis_restore.pl script |
| 05:58:23 | darkblue_B: | I havent done that before.. |
| 06:16:24 | darkblue_B: | hmmm |
| 06:16:27 | darkblue_B: | ok all thumbs |
| 06:16:55 | darkblue_B: | I ran postgis_restore.pl, but it says 'permission denied to createdb' at the end |
| 06:17:17 | darkblue_B: | so I went in as the postgres unix user and did createdb dbname and exited |
| 06:17:30 | darkblue_B: | somehow thinking that would solve the problem :- ) |
| 06:17:58 | darkblue_B: | I ran postgis_restore.pl again, still the same error, though the DB clearly now exxists |
| 06:18:18 | darkblue_B: | maybe.. I have to set some permissions on the DB? |
| 06:18:34 | darkblue_B: | oh yeah.. just run the script as the postgres user... |
| 06:18:38 | darkblue_B: | trying |
| 06:39:19 | darkblue_B: | ok.. that seems to have went well |
| 06:40:45 | darkblue_B: | the only catch it that there are 2 dozen tables, and a role from the previous install that doesnt exist on my machine.. so I get a bunch of ERROR: role "cs540" does not exst.. of course, thats not so bad, its just that I have to grant perms for all the tables to some new user |
| 06:43:29 | darkblue_B: | 78 tables in this one DB.. and their are 10 DBs ( ! ) |
| 06:43:37 | darkblue_B: | this is the 2nd largest though |
| 08:27:12 | darkblue_B: | hmmm the new db has valid geometry_columns entries.. srid = 2992 for 5 tables |
| 08:27:22 | darkblue_B: | spatial_ref_sys has a 2992 entry |
| 08:27:32 | darkblue_B: | but when I tred to convert with ogr2ogr, it crashed |
| 11:34:34 | landonf: | Anyone seen a crash like this one before? #0 0x000000080f32e6e2 in compute_geometry_stats ( stats=0x820617050, fetchfunc=Variable "fetchfunc" is not available. ) at lwgeom_estimate.c:2108 |
| 11:42:34 | mloskot: | not me |
| 11:47:22 | landonf: | From the failure the code is non-obvious |
| 11:47:30 | landonf: | er, from the code, the failure is non-obvious = ) |
| 11:49:38 | mloskot: | landonf: drop it to the mailing list, there you should get more response |
| 13:34:40 | zanberdo: | is there a way to update the geometry_columns table? I've had to drop a table and recreate a new one and now the OID in geometry_columns is wrong. |