#POSTGIS IRC Log - 2009-05-11

For logs after Feb 3, 2007, all times are GMT-8. Prior logs are GMT-9.
Back to Logs
02:11:25 Guest89723: hi all, i'm getting error "transform: -38 ( failed to load NAD27-83 correction file )", when trying to convert from 900913 to 4326. any idea?
10:20:51 TheSteve0: pramsey: ping
10:21:58 pramsey: TheSteve0: hola
10:24:03 TheSteve0: pramsey: I am having trouble with the postgis application
10:24:08 TheSteve0: installation I should say
10:24:13 pramsey: yay, fun. what kind?
10:24:22 TheSteve0: one time it said the key didn't match and so aborted
10:24:51 pramsey: "key"? postgis?
10:24:51 TheSteve0: the other time it said libiconv... was corrupt. I ignored and then the install went fine but I am not sure what is hosed now
10:25:07 pramsey: libiconv was corrupt, or it couldn't write to it?
10:25:17 pramsey: the second one is a known issue, and it's even in the docs I wrote up
10:25:18 TheSteve0: yeah, the hash probably between the FTP site and the application key
10:25:28 TheSteve0: alright well then that is what I say
10:25:29 TheSteve0: saw
10:25:33 TheSteve0: should I ignore it?
10:25:44 TheSteve0: since I didn't read the docs
10:25:44 pramsey: ignore
10:25:46 pramsey: I'll look for that key message when I do my runthrough now
10:25:56 TheSteve0: I installed jre and postgis so far
10:26:01 TheSteve0: what should I do next
10:26:10 pramsey: follow the directions! : )
10:26:10 TheSteve0: this is a on a clean vm image of XP sp3
10:26:33 TheSteve0: you mean I have to read!?!?!? WTF - that is above and beyond the call.
10:26:34 TheSteve0: I am on it
11:15:52 TheSteve0: pramsey: There is no readme in the zip file
11:15:55 TheSteve0: what should I read
11:16:48 pramsey: the workshop materials from http://svn.opengeo.org/workshops/postgis/spatialdbtips/doc/en
11:16:50 sigq: Title: Revision 62: /postgis/spatialdbtips/doc/en ( at svn.opengeo.org )
11:16:52 pramsey: svn export http://svn.opengeo.org/workshops/postgis/spatialdbtips/doc/en workshop
11:45:57 DavidAndCarr: if i had a lat, and i wanted to query my multi-point column to see where it resided, is there a function that lets me do that?
11:50:58 TheSteve0: pramsey: can't you just get your SVN server to understand mime-types?
11:51:28 pramsey: it does, TheSteve0 : ) the point is that everything in the repo is *code*
11:52:01 TheSteve0: bleh
11:52:01 pramsey: re-phrase DavidAndCarr, not sure what you're asking
11:52:11 TheSteve0: but it should know the html code could be displayed in a browser
11:52:46 DavidAndCarr: pramsey: i have a db of lat/long points that create a shape in a multip-poly. I want to pass in a lat/lng pair, and have it tell me which row its in, depending on which shape it falls within
11:53:33 pramsey: what's your table definition...
11:53:43 pramsey: \d yourtable
11:54:35 DavidAndCarr: sec
11:56:00 DavidAndCarr: latlng | geometry |
11:56:41 DavidAndCarr: enforce_geotype_latlng" CHECK ( geometrytype( latlng ) = 'MULTIPOLYGON'::text OR latlng IS NULL )
11:57:07 DavidAndCarr: 2 other enforce's
11:57:10 DavidAndCarr: if you want me to paste those or not
12:00:53 pramsey: you table is pull of points...
12:01:06 pramsey: but, taken together, they form polygons...
12:01:20 pramsey: ( somehow ) ?
12:01:37 pramsey: if I run "select geometrytype( latlng ) from yourtable" I'll get... POINT?
12:01:52 pramsey: onh, no wait
12:01:58 pramsey: thanks, I should read more carefully
12:02:04 DavidAndCarr: np : )
12:02:17 DavidAndCarr: would have tl select AsText
12:02:21 pramsey: the way you described it up top ( "i want to query my multi-point column" ) made me think you has some crazy setup
12:02:28 DavidAndCarr: hehehe sorry
12:02:28 pramsey: but you have a very normal setup
12:02:36 pramsey: so, just do
12:03:05 pramsey: select * from mytable where st_contains( latlng, st_setsrid( st_makepoint( inputlon, inputlat ),4326 ) );
12:03:44 DavidAndCarr: what is 4326 for?
12:03:51 pramsey: ( assming 4326 is your srid for yourtable )
12:03:56 DavidAndCarr: ah : )
12:04:04 pramsey: select srid from geometry_columns where f_table_name = 'yourtable';
12:04:11 pramsey: and use whatever that is
12:04:12 pimpaa: hey guys
12:04:19 pimpaa: how can i create a spatial view?
12:04:25 pimpaa: i created here and it works
12:04:38 pramsey: 'create view' it's no different from any other view
12:04:38 DavidAndCarr: ok pramsey i'll try that thank you
12:04:39 pimpaa: but i need to designate a srs to my view geometry field?
12:04:52 pramsey: you might want to add it to the geometry_columns table for other siftware to see it
12:04:57 pramsey: np DavidAndCarr
12:05:03 pimpaa: humn
12:05:05 pimpaa: thanks pramsey
12:13:40 TheSteve0: pramsey: I think your instructions are wrong
12:13:49 pramsey: Could be. Where?
12:14:00 TheSteve0: after I import medford with the error I click ok and it asks do I want to import again
12:14:05 pramsey: yeah!
12:14:09 pramsey: click "cancel"
12:14:14 pramsey: I actually fixed the backup bundle now
12:14:24 pramsey: so that errors aren't generated and you can use "OK"
12:14:37 pramsey: non-intuitively, even if you "cancel" the data is still loaded
12:14:55 TheSteve0: but the schema is not loaded if I click cancel
12:17:12 TheSteve0: I have an empty schema
12:19:14 pramsey: hit refresh
12:19:27 pramsey: ( circular arrows )
12:19:44 TheSteve0: alright hold on - running again
12:21:05 TheSteve0: worked
12:21:13 TheSteve0: put the refresh tip in your docs
12:21:17 DavidAndCarr: pramsey: is it ok if my srid is -1 ?
12:21:31 : * pramsey does
12:21:34 pramsey: DavidAndCarr: yes
12:21:37 DavidAndCarr: ty
12:21:43 pramsey: you won't be able to use ST_Transform( ) but you can run your query
12:22:02 TheSteve0: pramsey: there is no geometry_columns backup in my workshop folder
12:22:07 DavidAndCarr: is it something i specified when i created my geometry table? or how would i change it?
12:22:13 pramsey: oopsie, TheSteve0 , old bundle
12:22:20 pramsey: np, that just means you skip the uDig section : )
12:22:24 pramsey: everything else will still work
12:22:35 TheSteve0: alright I will install and uDig and see if it fires up
12:22:46 pramsey: it was specfied at creation, yes
12:22:57 pramsey: to change it you'll have to drop the srid constraint from your table
12:23:09 DavidAndCarr: k
12:23:15 pramsey: then run 'update mytable set latlon = st_setsrid( latlon,4326 )'
12:23:22 TheSteve0: DavidAndCarr: you can also update it to the projection for your data
12:23:28 DavidAndCarr: ok
12:23:39 TheSteve0: there is an updateSRID command or something like that
12:23:56 TheSteve0: http://thesteve0.wordpress.com/2007/10/08/updating-projections-and-postgis/
12:23:57 sigq: Title: Updating Projections and PostGIS « Steve s Little world ( at thesteve0.wordpress.com )
12:24:32 DavidAndCarr: ty : )
12:25:20 DavidAndCarr: hmm not getting any results
12:25:23 DavidAndCarr: i must be doing something goofy
12:26:41 TheSteve0: pramsey: udig installs and runs and most of the dialoges work and it fails like you predicted
12:36:15 TheSteve0: pramsey: fail on starting tomcat
12:36:30 pramsey: net start Tomcat6
12:36:33 pramsey: goes boom?
12:37:01 TheSteve0: ] [info] Starting service...
12:37:01 TheSteve0: [2009-05-11 13:39:10] [174 javajni.c] [error] The specified module could not be found.
12:37:01 TheSteve0: [2009-05-11 13:39:10] [994 prunsrv.c] [error] Failed creating java
12:37:01 TheSteve0: [2009-05-11 13:39:10]
12:37:07 : * pramsey try this http://www.icurtain.co.uk/blog.php?article=92
12:37:09 sigq: Title: Digital Art & Technology - Java, Linux, PHP, JBOSS, Seam | icurtain ( at www.icurtain.co.uk )
12:37:15 pramsey: copy the dll into the tomcat ./bin dir
12:37:30 pramsey: ( he handily links to one )
12:37:32 TheSteve0: yup see that
12:37:44 DavidAndCarr: pramsey: does this look right: select * from foo where st_contains( the_geom, st_setsrid( st_makepoint( 46.804100, -92.095109 ),4326 ) ); ? should be returning a point but nothing returns wasn't sure if i missed something
12:37:48 TheSteve0: you should probably put it in the bundle o
12:37:50 : * pramsey is glad he's a couple steps ahead of you TheSteve0 : )
12:37:54 pramsey: yep, it's going in there
12:38:07 pramsey: no, you put your lat first and your lon second
12:38:10 pramsey: reverse them DavidAndCarr
12:38:31 : * DavidAndCarr feels he should read and not assume
12:38:32 DavidAndCarr: lol
12:38:34 DavidAndCarr: thanks mate
12:38:36 DavidAndCarr: works perfect now
12:38:44 DavidAndCarr: im pretty surprised at how fast it is..
12:38:51 pramsey: when you assume, you make an "ass" of "u" and "me"
12:38:52 pramsey: : )
12:38:55 TheSteve0: screw that - reading is highly overrated ; )
12:38:58 DavidAndCarr: hehehehehe
12:39:06 DavidAndCarr: i just assumed it was lat / lng
12:39:09 DavidAndCarr: not what you had written :p
12:39:23 DavidAndCarr: thanks mate
12:39:26 pramsey: np
12:39:34 DavidAndCarr: now i'm going to go read up on these commands so i know what they are doing :D
12:40:51 TheSteve0: pramsey: works now
12:41:32 TheSteve0: pramsey - so there you go
12:41:34 TheSteve0: you are all set
12:41:37 TheSteve0: hope that helped
12:41:45 TheSteve0: eventhough it look like you knew most of the errors
12:41:49 pramsey: that did, thanks
12:41:56 pramsey: well your runthrough and mine hit the same problems
12:42:04 TheSteve0: so I was good verification
12:42:08 pramsey: indeed
12:42:25 pramsey: the next bundle will be much better : )
12:46:52 TheSteve0: glad to help
12:47:03 TheSteve0: I may use the same bundle ( if you are ok with it ) for my geoweb class
12:47:13 TheSteve0: I think we are going to use HI data
12:59:35 DavidAndCarr: 1 other question pramsey if you have a moment : )
13:00:06 pramsey: go
13:00:33 DavidAndCarr: is there a way for me to compare my rows aginst eachother, to find other rows that might have an object within a distance of the one i'm tageting ?
13:01:43 pramsey: DavidAndCarr: self-join
13:02:21 pramsey: select a.id, b.id from mytable a, mytable b where st_dwithin( a.the_geom, b.the_geom, radius ) and a.id != b.id;
13:02:38 DavidAndCarr: gotcha
13:02:38 pramsey: "things near to other things that are not themselves"
13:02:39 DavidAndCarr: st_dwithin
13:02:45 DavidAndCarr: gotit
13:02:48 DavidAndCarr: thank you : )
13:47:50 epifanio: hi all, i've create a table and added a geometricolumn using these instruction : http://rafb.net/p/wKvpEO79.html
13:47:51 sigq: Title: Nopaste - No description ( at rafb.net )
13:48:11 epifanio: to add manually a point i can use a syntax like : http://rafb.net/p/QK6kwS19.html
13:48:12 sigq: Title: Nopaste - No description ( at rafb.net )
13:49:25 epifanio: but .. if in my table i've 3 columns : "name varchar" , "longitude float" and "latitude float"
13:50:17 epifanio: how can i create a sql instruction to insert the longitude,latitude values into the geometry column ?
13:50:35 epifanio: i know that's a basic sql question :-/
13:50:48 wildintellect: Update query
13:53:16 wildintellect: epifanio, see http://www.bostongis.com/postgis_pointfromtext_linefromtext_etc.snippet
13:53:17 sigq: Title: PointFromText, LineFromText, ST_PointFromText, ST_LineFromText OGC functions - PostGIS ( at www.bostongis.com )
13:53:46 epifanio: thanks wildintellect :- ) !