#POSTGIS IRC Log - 2008-07-03

For logs after Feb 3, 2007, all times are GMT-8. Prior logs are GMT-9.
Back to Logs
01:29:05 CIA-6: mcayland * r2820 /trunk/ ( configure.ac liblwgeom/Makefile.in ): Add the parser build rules back into the liblwgeom Makefile, so now any changes to either the lexer or parser source files will automatically invoke a rebuild of the relevant output files during make
06:18:23 bobmcw: howdy guys... OSX Leopard, postgres 8.2.9 + postgis 1.3.3 from MacPorts...
06:18:31 bobmcw: using geo_ruby to chat with it
06:18:42 bobmcw: column of geometry type, if I insert a Point, all is well
06:18:54 bobmcw: if I attempt to insert a polygon, postgres itself falls over on a signal 10
06:24:00 bobmcw: LOG: server process ( PID 8981 ) was terminated by signal 10
06:24:01 bobmcw: LOG: terminating any other active server processes
06:29:40 bobmcw: has anyone seen that before?
06:29:50 bobmcw: Points work perfectly, distance_sphere( ).. but polygons fail
06:30:02 bobmcw: even upon just inserting
06:30:12 bobmcw: srids all match up ( 4326 )
06:34:05 mloskot: bobmcw: what's the definition of your geometry column in the geometry_columns table?
06:34:11 mloskot: What type of geometry you've used?
06:34:41 bobmcw: geo_ruby gem blows them all in as "geometry" and adds a constraint on Polygon, one sec and I'll paste
06:35:24 bobmcw: mloskot: the table def itself has
06:35:25 bobmcw: bounding_box | geometry | not null
06:35:33 bobmcw: ( column is named "bounding_box" )
06:35:42 bobmcw: constraint: "enforce_geotype_bounding_box" CHECK ( geometrytype( bounding_box ) = 'POLYGON'::text OR bounding_box IS NULL )
06:35:54 mloskot: bobmcw: I'd suggest you to not to play through georuby/whatever
06:35:54 bobmcw: and the geometry_columns says
06:35:55 bobmcw: | public | states | bounding_box | 2 | 4326 | POLYGON
06:36:01 mloskot: if you encounter problems
06:36:02 mloskot: like that
06:36:12 mloskot: but to try to issue SQL commnads manually using psql or pgAdmin tool
06:36:18 bobmcw: go with pure sql and MakePolygon( ... ) or such?
06:36:20 mloskot: Then you will find it much easier to diagnose the problem
06:36:26 mloskot: yes
06:36:35 mloskot: bobmcw: check the postgis manual
06:36:43 mloskot: there you will find good explanation how to start
06:36:44 mloskot: create table
06:36:50 mloskot: insert row with geometry
06:36:55 mloskot: + postgis funcs reference
06:36:56 mloskot: etc.
06:37:01 bobmcw: mloskot: yeah, the georuby just makes it easy. I'll give psql a whirl
06:37:11 mloskot: less proxies, easier diagnosis
06:37:17 bobmcw: wasn't sure of MacPorts GIS was known ill or anything
06:37:39 bobmcw: fwiw, same code works on linux ( RHEL )
06:37:57 mloskot: bobmcw: also, don't forget to enable SQL commands logging in PostgreSQL
06:38:13 mloskot: then you will be able to investigate problems deeper
06:38:18 bobmcw: 'k
06:38:43 bobmcw: fwiw...
06:38:45 bobmcw: http://rafb.net/p/NLlabD65.html
06:38:46 sigq: Title: Nopaste - No description ( at rafb.net )
06:38:49 bobmcw: that's the SQL being thrown
06:39:11 bobmcw: geo column going in with the weird binary-esque format
06:39:31 mloskot: thrown by what?
06:39:36 mloskot: where did you copied this SQL from?
06:39:56 mloskot: bobmcw: the binary is not weird, please read the postgis manual and you will know what is that
06:40:07 bobmcw: "weird" in that I can't humanly read it : )
06:40:13 bobmcw: that's from my app's SQL log
06:40:19 mloskot: check 4.1.1 and 4.1.2
06:40:20 mloskot: http://postgis.refractions.net/docs/ch04.html#id2591274
06:40:21 sigq: Title: Chapter 4. Using PostGIS ( at postgis.refractions.net )
06:40:23 bobmcw: same statement run in psql fails exactly the same
06:40:35 mloskot: right, but you can investigate this binary with postgis functions
06:40:44 mloskot: select AsText( the_geom ) from table
06:40:51 mloskot: where the_geom is name of geometry column in table
06:40:55 bobmcw: http://rafb.net/p/ZJSndJ21.html
06:40:56 sigq: Title: Nopaste - No description ( at rafb.net )
06:41:38 mloskot: bobmcw: are you trying to issue this insert statement manually now?
06:41:42 bobmcw: yep
06:42:00 mloskot: so you are feeding postgis with garbage
06:42:18 mloskot: Read this first
06:42:18 mloskot: http://postgis.refractions.net/docs/ch04.html#id2592235
06:42:19 sigq: Title: Chapter 4. Using PostGIS ( at postgis.refractions.net )
06:42:48 mloskot: You can not pass binary encoded geometry directly
06:45:09 mloskot: You can construct geometries from byte streams using functions like
06:45:10 mloskot: ST_GeomFromEWKB
06:45:30 mloskot: and other *FromWKB( ) func
06:45:58 mloskot: but first you need to read about formats WKB, EWKB etc.
06:46:01 mloskot: in postgis man
06:46:22 : * mloskot has to run
06:46:24 mloskot: good luck
06:46:28 bobmcw: thanks
06:46:42 bobmcw: fwiw, should this work?
06:46:43 bobmcw: http://rafb.net/p/pKwQdp98.html
06:46:44 sigq: Title: Nopaste - No description ( at rafb.net )
06:49:35 mloskot: no
06:50:17 mloskot: This is still text
06:50:32 mloskot: hex encoded bytes but as text
06:50:38 mloskot: you need to convert hex to raw bytes
06:52:32 mloskot: bobmcw: sth like this
06:52:57 mloskot: GeomFromWKB( decode( ' your hex string ', 'hex' ) )
06:53:05 bobmcw: ahhh
06:53:10 mloskot: where 'your hex string" is the long stream ....
06:53:28 bobmcw: decode is pgsql core function for hex-to-bytea?
06:53:50 mloskot: yes
06:53:55 mloskot: http://www.postgresql.org/docs/8.3/interactive/functions-binarystring.html
06:53:57 sigq: Title: PostgreSQL: Documentation: Manuals: PostgreSQL 8.3: Binary String Functions and Operators ( at www.postgresql.org )
06:54:00 : * mloskot is away
07:07:42 bobmcw: so, fwiw...
07:07:42 bobmcw: http://rafb.net/p/wgg6yh32.html
07:07:44 sigq: Title: Nopaste - No description ( at rafb.net )
07:07:50 bobmcw: I was passing a non-closed ring, which didn't help
07:08:03 bobmcw: but closing it, using psql, textual representations... it still fails
07:12:23 bobmcw: heck, even this kills the server: select GeomFromText( 'POLYGON( ( 0 0, 0 10, 10 10, 10 0, 0 0 ) )' );
09:09:16 CIA-6: pramsey * r2821 /trunk/java/jdbc/ ( Makefile build.xml ): Match version numbers to new naming conventions.
09:14:59 CIA-6: pramsey * r2822 /branches/1.3/Version.config: Remove SVN from micro version
09:36:48 CIA-6: pramsey * r2823 /branches/1.3/doc/postgis.xml: Add version information to <title>
09:37:12 CIA-6: pramsey * r2824 /trunk/doc/postgis.xml: Add version information to <title>
11:08:06 CIA-6: robe * r2825 /trunk/doc/postgis.xml: Examples of use of ST_MakeLine, correction to my ST_Collect example.
11:39:14 sigq: geosfeed: Ticket #187 ( defect updated ): ST_Buffer crashes on WinXP, PostgreSQL 8.3, PostGIS 1.3.3, GEOS 3.0.0-CAPI-1.4.1 <http://trac.osgeo.org/geos/ticket/187#comment:1>
12:45:07 lukuspukus: hi
12:45:46 lukuspukus: does anyone have any recommendation for a opensource client app i can use to interface with a postgis database?
12:46:54 jef: lukuspukus: to do what?
12:51:40 lukuspukus: i want to start learning to use map server... but I figure it would be useful to use a desktop app to populate the database
12:52:01 lukuspukus: i'm pretty new to gis, so let me know if i'm still being too vague