#POSTGIS IRC Log - 2009-06-15

For logs after Feb 3, 2007, all times are GMT-8. Prior logs are GMT-9.
Back to Logs
00:40:35 sigq: geosfeed: Ticket #260 ( task reopened ): Problem using locale with WKTReader <http://trac.osgeo.org/geos/ticket/260#comment:2>
01:32:48 sigq: geosfeed: Ticket #86 ( defect closed ): Possible memory leaks caused by LineString constructor <http://trac.osgeo.org/geos/ticket/86#comment:47>
01:36:49 sigq: geosfeed: Ticket #260 ( task updated ): Problem using locale with WKTReader <http://trac.osgeo.org/geos/ticket/260#comment:3>
02:02:21 CIA-34: strk * r2576 /trunk/source/io/ ( WKTReader.cpp WKTWriter.cpp ): Use C locale while reading/writing WKT. Fixes bug #260.
02:04:55 sigq: geosfeed: Ticket #260 ( task closed ): Problem using locale with WKTReader <http://trac.osgeo.org/geos/ticket/260#comment:4>
02:08:38 CIA-34: strk * r2577 /trunk/capi/geos_ts_c.cpp: Stop explicitly using the CLocalizer now that it is done within WKTReader and WKTWriter ( see bug #260 ). Some deep testing about this would be good. Make check worked for me with comma-using locale.
02:10:57 sigq: geosfeed: Ticket #260 ( task updated ): Problem using locale with WKTReader <http://trac.osgeo.org/geos/ticket/260#comment:5>
02:55:10 sigq: geosfeed: Ticket #261 ( defect created ): operator.h two times in Makefile.am <http://trac.osgeo.org/geos/ticket/261>
03:01:12 sigq: geosfeed: Ticket #260 ( task reopened ): Problem using locale with WKTReader <http://trac.osgeo.org/geos/ticket/260#comment:6>
04:23:59 yabo: Hi
04:25:29 yabo: I'm using PostGis to model a world with moving objects. They are polygons which move along lines and I was looking for the best method to get the polygon representing the path they followed.
04:26:07 yabo: I have an ugly solution right now : I make the union of the polygons of the object taken every N meters along the path
04:35:35 crschmidt: does postgis use the wktext when doing reprojection via ST_Transform? Or just the proj4 string?
04:39:27 simplexio: fast googling says that wktext isnt used on re-projection
04:48:55 simplexio: crschmidt: 1.3.5 manual says that st_transform need proj support, so..
05:09:54 hobu: crschmidt: just proj4, IIRC. the wktext is there as a convenience to clients
05:11:25 crschmidt: Thanks.
05:13:38 hobu: I think Paul might be working toward a wkt parser though
05:13:46 hobu: as a long term strategy
05:14:52 crschmidt: I'm just not sure why http://openlayers.org/pipermail/dev/2009-June/004984.html worked, since Eric's original srs ( upthread ) looks exactly the same to me.
05:14:55 sigq: Title: [OpenLayers-Dev] PostGIS and OL disagree ( at openlayers.org )
05:15:06 CIA-34: strk * r2578 /trunk/source/io/WKTWriter.cpp: Put CLocalizer in the correct function. Fixes #260 for the writing part.
05:16:38 sigq: geosfeed: Ticket #260 ( task closed ): Problem using locale with WKTReader <http://trac.osgeo.org/geos/ticket/260#comment:7>
05:16:56 hobu: the bottom of http://svn.osgeo.org/postgis/trunk/spatial_ref_sys.sql has +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +units=m +k=1.0 +nadgrids=@null +no_defs
05:18:06 hobu: http://trac.osgeo.org/postgis/log/trunk/spatial_ref_sys.sql
05:18:07 sigq: Title: /trunk/spatial_ref_sys.sql ( log ) - PostGIS - Trac ( at trac.osgeo.org )
05:19:29 crschmidt: I'm not sure if that's contrasting to what I wrote?
05:21:14 hobu: no, just throwing up info
05:21:55 hobu: http://trac.osgeo.org/postgis/changeset/4070 mangled sr.org's name though : )
05:21:57 sigq: Title: Changeset 4070 - PostGIS - Trac ( at trac.osgeo.org )
05:22:00 hobu: I wonder if proj4 version matters
05:22:44 crschmidt: in elemoine's case, he says just dropping and readding the row solved it
05:23:09 hobu: he doesn't say which version of pg he's using
05:24:16 hobu: his original 900913 entry doesn't look like Paul's in spatial_ref_sys.sql if you look at the wkt
05:25:33 crschmidt: right, but if postgis doesn't use the wkt, that's irrelevant?
05:59:24 CIA-34: strk * r2579 /trunk/source/ ( 23 files in 2 dirs ): Port info in the geos::io namespace
06:52:38 sigq: geosfeed: Ticket #260 ( task updated ): Problem using locale with WKTReader <http://trac.osgeo.org/geos/ticket/260#comment:8>
06:53:29 CIA-34: pramsey * r2580 /trunk/source/headers/geos/Makefile.am: operation.h in Makefile.am twice. ( #261 )
06:54:58 sigq: geosfeed: Ticket #260 ( task updated ): Problem using locale with WKTReader <http://trac.osgeo.org/geos/ticket/260#comment:9>
07:01:35 sigq: geosfeed: Ticket #260 ( task updated ): Problem using locale with WKTReader <http://trac.osgeo.org/geos/ticket/260#comment:10>
07:02:41 sigq: geosfeed: Ticket #260 ( task updated ): Problem using locale with WKTReader <http://trac.osgeo.org/geos/ticket/260#comment:11>
07:05:58 bitner: hobu, crschmidt I believe Paul might have updated spatial_ref_sys.sql in trunk a week or so ago
07:10:55 crschmidt: I believe so, though that's still not answering my core question, which is: "If wktext isn't used, what's the difference between eric's line and mine?"
07:15:27 pramsey: crschmidt: I missed the original question
07:15:59 bitner: speak of the devil
07:16:17 bitner: http://openlayers.org/pipermail/dev/2009-June/004984.html
07:16:18 sigq: Title: [OpenLayers-Dev] PostGIS and OL disagree ( at openlayers.org )
07:19:27 crschmidt: pramsey: the original spatial_ref_sys def being at http://openlayers.org/pipermail/dev/2009-June/004979.html
07:19:28 sigq: Title: [OpenLayers-Dev] PostGIS and OL disagree ( at openlayers.org )
07:19:38 crschmidt: to me, the proj4 text for both looks exactly the same
07:20:14 crschmidt: the srtext differs, but it was my impression that this didn't matter for st_transform
07:21:57 pramsey: it doesn't matter, mystery to me
07:22:03 pramsey: also not a postgis problem
07:22:11 pramsey: since it doesn't even ship w/ 900913
07:22:17 pramsey: ( until 1.4 is ( if ever ) released )
09:34:51 CIA-34: pramsey * r4171 /tags/1.4.0b1/: Tag beta release
09:38:29 CIA-34: pramsey * r4172 /trunk/HOWTO_RELEASE: Update doc instructions.
09:43:57 CIA-34: pramsey * r4173 /trunk/HOWTO_RELEASE: More updates
09:51:44 bitner: hmm, st_m appears to be missing in the docs ( unless I am missing something )
09:53:04 strk: st_m belongs under the carpet :p
09:53:34 bitner: bah, m's are a wonderful thing that should be embraced and celebrated
09:54:46 strk: m's are, not st_m's : )
10:05:33 CIA-34: pramsey * r4174 /tags/1.4.0b1/ ( ChangeLog NEWS README.postgis Version.config ): Tag version numbers changed.
10:07:37 StormTide: can anyone point me at the right functions for a bounding box predicated query
10:09:10 pramsey: for a pure bounding box, eschew functions, and use the && operator
10:09:36 pramsey: select * from foo where foo.geom && ST_GeomFromText( '<geometry literal>',srid )
10:09:59 StormTide: hrm ok
10:10:38 pramsey: you can always create a function, if that makes you more comfortable : )
10:11:05 StormTide: nope
10:11:23 StormTide: just new to postgis and im trying to get kml of some polygons based on a google maps zoom level
10:11:32 pramsey: create function mbrintersects( geometry, geometry ) returns boolean as 'select $1 && $2' language 'sql' immutable;
10:39:00 strk: pramsey: I see you're getting overlyverbose like me : )
10:39:16 pramsey: hm?
10:40:05 strk: telling more to people than they want to know ( I've been told to do that often and I just saw you doing with StormTide : )
10:42:28 strk: I find it a good habit, expecially when people are not *forced* to stare at you and nod
10:43:06 StormTide: =p
10:43:36 StormTide: eseentially im trying to feed a string like ( ( 32.76880048488168, -139.921875 ), ( 61.56457388515458, -55.107421875 ) ) into a query like select ed_namee, ST_AsKML( ST_Simplify( the_geom,0.05 ),5 ) as kml from fed... in order to bound it to that box....
10:43:48 pramsey: your coordinates are backwards
10:44:03 pramsey: you have ( y, x ) instead of ( x, y )
10:44:05 StormTide: ( my co-ords are from google maps haha )... guess i'll have to flip em
10:53:51 StormTide: what is the srid for a box in the format ( ( x1,y1 ),( x2,y2 ) )
11:00:47 pramsey: 4326
11:02:01 StormTide: hrm... im still doing something wrong clearly....
11:02:09 StormTide: select ed_namee, ST_AsKML( ST_Simplify( the_geom,0.05 ),5 ) as kml from fed where the_geom && ST_GeomFromText( 'BOX( ( -139.921875,32.76880048488168 ), ( -55.107421875,61.56457388515458 ) )',4326 );
11:02:18 StormTide: what am i doing wrong?
11:02:44 strk: simplifying too much ?
11:02:58 StormTide: that query error
11:02:58 StormTide: s
11:03:07 StormTide: ERROR: Invalid OGC WKT ( does not start with P,L,M,C or G )
11:03:07 StormTide: CONTEXT: SQL function "st_geomfromtext" statement 1
11:03:22 strk: BOX is not valid WKT
11:03:26 pramsey: BOX is not an OGC wkt type
11:03:35 pramsey: either do the valid thing and make a polygon
11:03:43 pramsey: or do the pgsql thing and make a box
11:03:54 StormTide: which will run faster?
11:04:05 strk: you won't notice the difference
11:08:47 StormTide: can you point me in the right direction where i can find docs on this.... i cant seem to figure out how to get this set of lat/longs into a 'box' for the && operator use
11:09:55 strk: try 'BOX2D( xmin ymin, xmax ymax )'::box2d
11:10:13 strk: the postgis manual ( postgis.org ) is where you want to look at
11:11:44 StormTide: can those xmin etc be latlongs? ... cuz get 'invalid geometry' for && 'BOX2D( -139.921875 32.76880048488168, -55.107421875 61.56457388515458 )';
11:12:06 StormTide: ERROR: BOX2DFLOAT4 parser - doesnt start with BOX(
11:12:06 StormTide: if i add the cast
11:12:29 StormTide: if i just use 'box' i get ERROR: Operation on two geometries with different SRIDs
11:12:37 StormTide: ... so confused haha
11:12:41 strk: try 'BOX( xmin ymin, xmax ymax )'::box2d
11:12:49 strk: ok, closer : )
11:13:08 strk: wrap in setSRID
11:13:09 pramsey: setsrid( 'BOX3D( -139.921875 32.76880048488168, -55.107421875 61.56457388515458 )'::box3d,4326 );
11:13:12 StormTide: "the_geom" is a set of polygons of canadian electoral districts
11:13:30 pramsey: really, better to use the standards way
11:13:39 pramsey: it's more verbose, but it'll be 100% portable
11:13:39 strk: polygon ?
11:13:42 pramsey: yes
11:14:00 StormTide: that might have worked
11:14:00 StormTide: sec
11:14:12 strk: is && also part of the standard ? ( i forgot )
11:14:19 pramsey: not even a little
11:14:22 strk: : )
11:14:30 pramsey: the standard actually doesn't have a "pure bbox" relation
11:14:34 strk: type less, it's faster and sanely unportable : )
11:14:54 pramsey: it has st_intersects( ) which has tighter semantics and higher cost
11:15:22 pramsey: http://trac.osgeo.org/postgis/ticket/199
11:15:24 sigq: Title: #199 ( ST_MakeEnvelope( x1,y1,x2,y2,srid ) ) - PostGIS - Trac ( at trac.osgeo.org )
11:16:37 : * pramsey wishes ElshayalSmartGIS would dry up and blow away.
11:17:37 StormTide: this might be working... will play.... thanks so much for help
11:55:20 StormTide: can you index for @@
11:55:30 StormTide: this is working beautifully, but its rather slow
11:56:27 bitner: @@ ?
11:56:37 StormTide: er &&
11:57:56 bitner: http://postgis.refractions.net/documentation/manual-svn/ch04.html#id2871454
11:57:57 sigq: Title: Chapter 4. Using PostGIS: Data Management and Queries ( at postgis.refractions.net )
11:58:01 bitner: 4.5
12:01:28 StormTide: thx
13:42:28 sigq: geosfeed: WikiStart edited by pramsey <http://trac.osgeo.org/geos/wiki/WikiStart>
14:55:21 StormTide: you do you select the centroid of a polygon
15:33:02 sigq: geosfeed: Ticket #262 ( defect created ): 3.1.1 unit test build fail under vs 2008 <http://trac.osgeo.org/geos/ticket/262>
15:34:08 sigq: geosfeed: fix-msvc-unit-branches-3.1.patch attached to ticket #262 <http://trac.osgeo.org/geos/attachment/ticket/262/fix-msvc-unit-branches-3.1.patch>
15:39:03 sigq: geosfeed: fix-msvc-version-branches-3.1.patch attached to ticket #263 <http://trac.osgeo.org/geos/attachment/ticket/263/fix-msvc-version-branches-3.1.patch>
15:45:13 ltcabral: hey i need to count the number of vertices in a map, that has many polygons... can anyone help me on how to do that or what command to use?
15:56:10 CIA-34: pramsey * r2581 /trunk/HOWTO_RELEASE: add reminders on bump versions in various places
15:59:59 CIA-34: pramsey * r2582 /branches/3.1/capi/geos_c.h.in: Match VC versions to GNU ones
16:01:42 CIA-34: pramsey * r2583 /branches/3.1/build/msvc90/geos_unit/geos_unit.vcproj: Remove missing test.
16:01:43 sigq: geosfeed: Ticket #263 ( defect closed ): 3.1.1 version invalid with msvc 2008 build. <http://trac.osgeo.org/geos/ticket/263#comment:1>
16:03:10 sigq: geosfeed: Ticket #262 ( defect closed ): 3.1.1 unit test build fail under vs 2008 <http://trac.osgeo.org/geos/ticket/262#comment:1>
16:03:47 CIA-34: pramsey * r2584 /branches/3.1/HOWTO_RELEASE: Reminder to fix versions in capi too
16:04:01 pramsey_: ltcabral: npoints( geom )
16:04:25 pramsey_: select sum( npoints( the_geom ) ) from yourtable where st_intersects( the_geom, <map extent> )
16:04:53 ltcabral: pramsey_: how do i use that? with SELECT?
16:04:59 ltcabral: oh thanks
16:17:27 ltcabral: got this error : ERROR: syntax error at or near "<" LINE 1: ...a_dagua_permanente2 where st_intersects( the_geom, <map exten...
16:19:09 ltcabral: is the query right? select sum( npoints( the_geom ) ) from massa_dagua_permanente2 where st_intersects( the_geom, <map extent> )
16:32:03 CIA-34: pramsey * r2585 /branches/3.0/ ( 3 files in 3 dirs ): Version bump for release.
16:33:00 CIA-34: pramsey * r2586 /branches/3.1/source/headers/geos/version.h.vc: Version bump for 3.1.1 release.
16:35:26 CIA-34: pramsey * r2587 /tags/3.1.1/: Tag 3.1.1
16:35:51 CIA-34: pramsey * r2588 /tags/3.0.4/: Tag 3.0.4
16:40:57 cgs_bob: ltcabral: you might like to look at the docs here: http://www.postgis.org/documentation/manual-1.3/ch04.html
16:40:58 sigq: Title: Chapter 4. Using PostGIS ( at www.postgis.org )
16:41:16 ltcabral: cgs_bob: thanks... ill take a look
16:42:08 cgs_bob: ltcabral: you're welcome. now I got to go...bye : )
16:46:33 ltcabral: cant find answer in these docs :P
16:48:40 ltcabral: whats so wrong with <map extent> in st_intersects( the_geom, <map extent> ) ???
18:44:47 ltcabral: someone?? im using this query to count the vertices in a map that has many polygons: select sum( npoints( the_geom ) ) from massa_dagua_permanente2 where st_intersects( the_geom, <map extent> ); but im getting an error in the <map extent> can anyone help me?
21:07:56 cgs_bob: ltcabral: you are supposed to replace <map extent> with a geometry that defines your map extent. If you are interested in finding the number of vertices of the whole map, you don't even need the where st_intersect
21:16:17 jlivni: hmm .. in mapserver, it seems '..using srid = 4326' fails where '..using srid=4326' works ... who knew
21:18:52 cgs_bob: I haven't tried using mapserver yet. one of these days : )
22:05:45 ha1331: is there way to get the distance between two points in meters?