#POSTGIS IRC Log - 2009-06-09

For logs after Feb 3, 2007, all times are GMT-8. Prior logs are GMT-9.
Back to Logs
06:27:20 barfuss: hi, whats again the function to get the mbr from a geo-object?
06:27:45 barfuss: was it getent, maxrnt or something ike that?
06:29:16 strk: envelope for a geometry, box2d for a reduced precision box, box3d for full precision
06:30:55 barfuss: strk: thx. envelope sounds good. what abount boundary?
06:34:20 barfuss: strk: ahh, forget it. it was extent what i meant
06:40:07 strk: extent is an aggregate
07:16:24 barfuss: strk: you are right, my fault
09:03:48 darkblue_B: hiyo
09:04:12 darkblue_B: I made a table and some geoms are empty, null, something
09:04:26 darkblue_B: it was GeomFromText( ) as I recall
09:04:34 darkblue_B: so, how do I select all the nulls?
09:04:58 darkblue_B: where the_geom = '' where the_geom = null
09:06:24 bitner: where the_geom is null
09:07:51 darkblue_B: ahhh
09:09:07 darkblue_B: thx
10:15:12 sjzzalx: Guys I kam trying to view goephraphic data
10:15:32 sjzzalx: with geography intormation
10:15:47 sjzzalx: but in qgis there is no mappy layer
10:15:48 sjzzalx: I want this
10:16:19 sjzzalx: anyeone kno whow to get it? mapeserver isn't working right now either
10:20:40 adube: a sql question : if I have an alphanumeric string and want to get only the integer portion of it, is is possible to do this in a request string ?
10:20:53 adube: for example : foo 123 bar
10:21:02 adube: can I get "123" from the string ?
10:31:42 jlivni: sjzzalx: i don't understand what your problem is. mappy layer?
10:31:47 jlivni: 'isn't working' ?
10:31:48 jlivni: etc
10:35:49 sjzzalx: jlivni: i am on drugs, sorry
10:36:01 sjzzalx: PostGis is just importing dots and incorrectly scaled things
10:36:11 sjzzalx: that I find on WMS layers
10:36:18 sjzzalx: and the dots are what I want
10:36:23 jlivni: sjzzalx: not a problem. but you may wish to wait for drugs to wear off before asking : )
10:36:26 sjzzalx: but I want them to go on top of a map
10:36:48 sjzzalx: drawn out of lines and pictures, like a thing you would show a kid to teach him what the us was
10:36:59 jlivni: sjzzalx: still confused. do you mean postgis is importing incorrectly, or you are unable to render your ( correctly imported ) postgis data the way you expect ?
10:36:59 sjzzalx: I want that on my qgis or some other viewer
10:37:08 sjzzalx: unable to render the way I want
10:37:15 jlivni: ok, so you have valid data in postgis
10:37:27 jlivni: so you should be able to load a postgis layer in qgis and view it with no problem
10:37:33 sjzzalx: Yes. I want it to be rendered on top of a map, a picture showing outlines
10:37:38 sjzzalx: yeah, that works
10:37:44 jlivni: ok, so by 'a map' you mean another layer, which is not your dots
10:37:47 sjzzalx: yes
10:37:55 jlivni: such as a shapefile of world borders you may have? or a wms layer?
10:38:01 sjzzalx: yes, like those things
10:38:09 sjzzalx: but I cannot find a shapefile of borders
10:38:23 sjzzalx: and wms stuff I am adding with qgis is scaled wrong and misplaced
10:39:52 jlivni: try type "world borders shapefile" in to google
10:39:56 jlivni: first link should do you
10:40:14 jlivni: once you have that, if things are misplaced you probably have the wrong SRID defined for them in postgis
10:40:19 jlivni: eg the projection info is incorrect
10:40:22 jlivni: ( for your dots )
11:41:08 adub1: is there a isnumeric( ) equivalent function in postgres ?
11:45:59 LeoSh: hi, is this a good place to ask about importing TIGER census data into PostGIS?
11:53:41 wildintellect: LeoSh, sure
11:54:00 LeoSh: I'm trying to pull in the places data ( ie. cities )
11:54:20 LeoSh: but it looks like that file has a ton of features with no name or any other fields
11:54:40 wildintellect: what's the link for where you got it?
11:56:30 LeoSh: http://www.census.gov/geo/www/cob/pl2000.html
11:56:31 sigq: Title: Census 2000: Incorporated Places/Census Designated Places Cartographic Boundary Files - U.S. Census Bureau ( at www.census.gov )
11:56:45 LeoSh: actually, they're not TIGER :-/
11:57:08 LeoSh: looks like the TIGER ones are here - per state http://www.census.gov/cgi-bin/geo/shapefiles/state-files?state=53
11:57:10 sigq: Title: State TIGER Shapefiles: for Washington ( at www.census.gov )
11:57:29 LeoSh: but I'm using the first ones right now
11:59:31 LeoSh: the features looks like they have polys, just all the other fields are blank
12:01:40 jlivni: LeoSh: i used that ( the 2000 data ) to make http://walkscore.census.umbrellaconsulting.com/ and the places do have some attributes
12:01:41 sigq: Title: Census Viewer ( at walkscore.census.umbrellaconsulting.com )
12:02:09 wildintellect: LeoSh, I just pulled http://www.census.gov/geo/cob/bdy/pl/pl00shp/pl53_d00_shp.zip , seems to have attributes
12:03:08 LeoSh: lots of them do have attributes, but some don't
12:03:28 LeoSh: jlivni: nice, you work with the frontseat guys?
12:03:33 jlivni: i do
12:03:36 wildintellect: I saw a few have Null for the name
12:03:37 jlivni: for some stuff
12:03:52 LeoSh: jlivnin: I'm in Seattle too and know Matt - I'm at www.evoworx.com
12:04:10 LeoSh: wildintellect: yeah, they have null for name and other fields
12:04:27 LeoSh: I've been discardingthose
12:04:36 jlivni: cool
12:04:41 LeoSh: but they may be some sort of attempt at multipolygons?
12:04:45 jlivni: i am actually in SF now - but used to live in seattle
12:05:15 jlivni: and no, some places just have no data. the 2008 data linked above is better, tho still a few blanks
12:05:35 LeoSh: ok, I'll pull down the 2008 data
12:05:40 jlivni: geonames has nice point data, but no good if you need polys of course
12:05:57 LeoSh: It seems like there should be a SQL/JSON dump of all of this data somewhere
12:06:07 LeoSh: considering that pretty much anyone starting with this data does the exact same thing :-/
12:06:24 wildintellect: cloudmade has some boundary layers, not sure what's in them
12:06:32 jlivni: its pretty easy to just do shp2psgql, no?
12:06:49 LeoSh: I'm running it through geodjango, but yes, its not that bad :- )
12:07:05 LeoSh: just saying that there's a lot of cleanup and miscellaneous little gotchas ( such as encoding ) all over the place
12:07:11 wildintellect: looking at the Nulls I think they might be interior rings leftover from when the files were converted from a coverage with topology to a shapefile
12:08:21 wildintellect: if you zoom in on the WA data they look an awful lot like lakes in that area
12:08:30 LeoSh: so you think they're safe to drop? what are you using to look at the shapefiles?
12:08:41 jlivni: could be, but i think ive also seen some null data in areas nowhere near another place
12:08:56 jlivni: either way if you need attribute data, then obviously data w/no attributes is safe to drop : )
12:09:04 LeoSh: :- )
12:09:34 LeoSh: I just wanted to check that there wasn't some sort of multipoly thing going on, where I was suppose to merge them to the previous feature or something like that
12:16:16 LeoSh: thanks for the help everyone!
14:10:16 CIA-34: pramsey * r4157 /trunk/postgis/ ( . postgis.sql.in.c ): More fixes to upgrade process.
14:46:50 CIA-34: pramsey * r4158 /trunk/ ( doc/html/image_src/ utils/postgis_proc_upgrade.pl ): More work on 1.4 upgrade script.
15:22:37 CIA-34: pramsey * r4159 /trunk/NEWS: Closes ( #134 )
15:49:50 CIA-34: pramsey * r4160 /trunk/utils/postgis_restore.pl: Update the hard upgrade script to handle 1.4 transition. ( #144 )
16:01:13 magic_hat: hey all. I'm having a devil of a time manipulating my geom columns from within my Ruby on Rails app. Anyone have experience with that?
16:20:33 samgranier: magic_hat: how so?
16:35:40 magic_hat: samgranier: It seems like it's choking on my geom column: http://pastie.org/506636
16:35:41 sigq: Title: #506636 - Pastie ( at pastie.org )
16:35:54 magic_hat: I'll run the code again and find the exact error.
16:39:09 samgranier: you could write a stored procedure/function/prepared statement to speed it up
16:40:25 magic_hat: good idea, but I'm not there yet. It's still throwing errors on the query. hang on and I'll try to replicate the error.
16:42:37 samgranieri: can you take the raw sql and run an explain on it?
16:43:00 samgranieri: \explain
16:46:29 magic_hat: blech. this is a big old mess. it's not an sql error, it's a ruby error. And i've changed the ruby code so that now I'm getting a different error. Basically I need to sort out how to pipe a georuby point into a postgres query.
16:47:33 samgranieri: look at this: http://www.slideshare.net/sabman/rails-gis-hacks-presentation-170907
17:14:20 CIA-34: robe * r4161 /trunk/NEWS: Add Jean David Techer to list of contributors
17:22:28 CIA-34: robe * r4162 /trunk/NEWS: Add David Techer, new doco enhancements, new populate_geometry_columns