#POSTGIS IRC Log - 2008-06-18

For logs after Feb 3, 2007, all times are GMT-8. Prior logs are GMT-9.
Back to Logs
07:07:39 intengu: how do you clean a polygon layer in postgis, have seen this link http://postgis.refractions.net/support/wiki/index.php?CleanPolygons but it is not clear to me kindly assist
07:07:40 sigq: Title: PostGIS Wiki : Clean Polygons ( at postgis.refractions.net )
09:04:39 intengu: how do i convert polygon to lines then to polygon as i want to clean the polygon
09:42:07 jlivni: intengu: what do you mean by 'clean' ?
09:43:07 jlivni: but for the wiki page you note, you should consider maybe just using the sql function they provide
09:44:25 jlivni: or, depending on what you mean by 'clean', and what topology errors exist, i find that sometimes you can do buffer( the_geom,0 ) to get fixed topology. sometimes i even do simplify( the_geom,.000000001 ) which works out some extra kinks.
09:48:39 intengu: jlivni: i read this link http://postgis.refractions.net/support/wiki/index.php?CleanPolygons do not quite understand it
09:48:40 sigq: Title: PostGIS Wiki : Clean Polygons ( at postgis.refractions.net )
09:49:37 intengu: jlivni: what i have is a polygon layer ( cadastre ) that has overlaps and intersection that I would want to correct
09:55:46 bitner: intengu: did you try doing something like the example?
10:08:51 intengu: bitner: it is not clear to me, guess because I am a newbie if you are able to explain would apreciate
10:11:04 bitner: I have never used this approach to cleaning polygons
10:11:31 jlivni: intengu: i don't think the clean will fix overlaps and intersections - just bad topologies. you may need to be more clear by what exactly you want to fix, and what exactly is wrong
10:17:59 intengu: jlivni: what i want to do is split the polygon into 2 - poly1 has no overlaps,intersects and poly2 has overlaps, intersects
10:18:53 jlivni: intengu: it isn't clear to me what you are asking ... i imagine you have a case with say, 3 polygons, and they all overlap a little. now what do you want as the output?
10:25:55 intengu: jlivni: i have one multipolygon ( representing parcel boundaries ), some of the polygons in the multipolygon overlap, self-intersect
10:27:31 intengu: jlivni: i would then want to split the multipolgon into two categories - 1 parcels with no overlaps, self-intersect ; 2 parcles with overlaps, self-intersect
10:29:12 intengu: jlivni: i will then take category 2 and repair these errors, hoping this is clear and please bear with me as i am new in this subject
10:30:12 jlivni: so, you want to add an attribute to each of your multipolygons with a boolean saying whether its individual polygons overlap ?
10:32:53 intengu: jlivni: yes yes yes please : ) )
10:47:43 lbracher: hi there! I downloaded & built & installed geos3.0.0 and I would like to know how can I make postgis use this new version
10:48:02 lbracher: i did a select postgis_geos_version( ); and it shows 2.2.3-CAPI-1.1.1
11:37:30 lbracher: hello? anybody? : )
11:40:03 simplexio: .
11:40:12 lbracher: hi, simplexio! : )
11:40:26 simplexio: lbracher: you probably need to get postgis source and compile it
11:40:38 lbracher: hummm... i´ll try it.
11:40:49 lbracher: thanks! : )
11:55:36 landonf: Anyone looked into using the tiger geocoder with the 2007 TIGER data?
12:14:37 landonf: Suppose not = ) I might try to get it working.
12:20:28 simplexio: no experience with tiger data
12:21:24 intengu: UPDATE bcm_parcels.isvalid
12:21:25 intengu: FROM bcm_parcels WHERE IsValid( bcm_parcels( the_geom ) );
12:21:31 intengu: UPDATE bcm_parcels.isvalid
12:21:32 intengu: FROM bcm_parcels WHERE IsValid( bcm_parcels( the_geom ) );
12:22:53 intengu: i am trying to use the above statement to update a field isvalid of whether my geometries are valid and I am getting syntax errors what could be wrong
12:23:46 simplexio: uupdate a set a.b = isvalid( geom ) ?
12:24:39 simplexio: with correcy sybtax: UPDATE table set isvalid = isVaLID( the_geom ) ;
12:24:55 simplexio: if i recall right isValid( geom ) return true or false
12:25:44 intengu: simplexio: i create a column( boleean ) in my table and wanted to populate it with the results
12:31:38 simplexio: it should wprk, you also do checking on fly
12:44:11 intengu: simplexio: thanks
13:13:51 lbracher: simplexio, i re-complied postgis and I got same thing. do I need to recompile postgres?
13:14:15 lbracher: where in postgres I can set the libraries to be used?
13:48:42 landonf: Would would be the easiest way to grant privileges on all postgis functions to a user/role?
13:51:16 landonf: I guess the template works, I just needed to grant privileges to geometry_columns.
14:08:48 simplexio: lbracher: nope
14:11:04 simplexio: lbracher: did you? : make configure geoslib?/usr/local/lib/geos ; make ; make install ( /user/local/lib/postgis, then created postgis enabled database using new postgis lib ? ( not sure about those paths etc.. but you get point what im trying to say ? )
15:53:13 lbracher: simplexio: yes, but none worked... =/
15:53:32 lbracher: i´ll rollback and use older version.
15:54:00 lbracher: i wanted geos3 to use with geodjango, but it´s better to use workarounds instead.
16:00:42 springmeyer: lbracher: what wrong with your geos3?
16:08:31 landonf: Are there any general GIS theory & practice books that anyone would recommend for a software engineer who hasn't worked with geospatial data in any capacity?
16:37:41 lbracher: hi, springmeyer!
16:37:49 springmeyer: hello
16:38:26 lbracher: it compiles & installs ok in right directories, but postgres doesn´t see new version of postgis
16:38:28 springmeyer: I did not see your earlier post, so I'm curious what trouble you had with geos
16:38:49 lbracher: ah, i´m trying to use geos3 from sources
16:39:00 springmeyer: sure, sounds good.
16:39:17 springmeyer: so you have a postgis <- > postgres problem then?
16:39:21 springmeyer: rather than geos?
16:39:45 lbracher: so, i compiled geos3, postgis last version, but postgres is not getting the new postgis version
16:39:47 lbracher: yes
16:40:20 springmeyer: what error are you getting?
16:41:19 lbracher: uhm, lost somewhere in terminal scroll...
16:41:52 lbracher: ERRO: não pôde carregar biblioteca "/usr/lib/postgresql/
16:41:52 lbracher: 8.1/lib/liblwgeom.so": libgeos_c.so.1: cannot open shared object file: Arquivo o
16:41:52 lbracher: u diretório não encontrado
16:42:06 lbracher: ooops! it came in portuguese! : )
16:42:25 springmeyer: no problem. I like portuguese
16:42:45 lbracher: can you understand what happened?
16:43:28 lbracher: ERROR: couldnt load library "/usr/lib/postgresql/8.1/lib/liblwgeom.so": libgeos_c.so.1: cannot open shared object file: file or directory not found.
16:43:30 springmeyer: hmm. sort of...
16:43:38 lbracher: now its better! : )
16:44:01 springmeyer: right. so you are getting this error when running the postgis sql script?
16:44:11 lbracher: no.
16:44:13 lbracher: ops
16:44:15 lbracher: yes
16:44:16 lbracher: .
16:45:13 lbracher: but i get this also when i "select postgis_version( )" too
16:46:04 springmeyer: okay, thats fine.
16:46:23 springmeyer: the error means that geos is not being found by postgis
16:46:46 springmeyer: are you running on linux?
16:46:52 lbracher: but when i ./configure , it found the geos-config
16:46:57 lbracher: yes, debian
16:47:19 springmeyer: have you put the geos lib in /etc/ld.so.conf ?
16:47:39 springmeyer: I think that would entail just putting /usr/local/lib/ in there...but let me check my notes...
16:48:20 lbracher: no, i dont put it in /etc/ld.so.conf
16:49:09 springmeyer: try adding /usr/local/lib to /etc/ld.so.conf
16:49:50 springmeyer: echo '/usr/local/lib' >> /etc/ld.so.conf
16:49:55 springmeyer: i think will do it
16:49:59 lbracher: hummm...
16:52:19 lbracher: it shouldn´t be echo 'include /usr/local/lib/*' >> /etc/ld.so.conf
16:52:21 lbracher: ?
16:52:56 lbracher: ´cause text in ld.so.conf makes me think that way
16:53:09 lbracher: oops, this way.
16:53:30 springmeyer: well... I'm no expert on ld.so.conf but I think it just requires the path: '/usr/local/lib/'
16:53:49 lbracher: ok
16:54:10 springmeyer: what text is already in ld.so.conf for you?
16:54:27 lbracher: include /etc/ld.so.conf.d/*.conf
16:55:33 lbracher: man, i need to go. i have algorithm analysis classes now...
16:56:01 springmeyer: hmm. okay that imports from ld.so.conf.d
16:56:16 springmeyer: my ld.so.conf.d is empty on ubuntuy
16:56:54 springmeyer: I think you are safe just putting '/usr/local/lib/' in ls.so.conf.d then...
16:57:00 springmeyer: good luck in class!
16:57:39 lbracher: thanks. i need a lot of luck! : )
16:57:47 lbracher: i´ll be back later.
16:57:51 lbracher: thank you! : )
16:57:57 springmeyer: np
20:19:46 lbracher: how can I use SetPoint function of postgis?
20:20:07 lbracher: i tried by a update sql, but it doesnt work...