[geos-devel] Fix to enable ruby bindings with ruby 1.9.3 (#5)
Can any Ruby/GEOS developer take a look at this ? --strk; - Forwarded message from Kashif Rasul - Date: Thu, 24 Nov 2011 09:07:04 -0800 From: Kashif Rasul To: strk Subject: [geos] Fix to enable ruby bindings with ruby 1.9.3 (#5) List-Id: Tested via ruby 1.9.3. Regenerated the cpp file with swig 2.0.4. TODO: test with ruby 1.8.x and rbx? You can merge this Pull Request by running: git pull https://github.com/kashif/geos master Or you can view, comment on it, or merge it online at: https://github.com/strk/geos/pull/5 -- Commit Summary -- * Fix to get swig/ruby compiling for ruby 1.9 -- File Changes -- M macros/ruby.m4 (9) M swig/ruby/Makefile.am (2) M swig/ruby/geos_wrap.cxx (6472) M swig/ruby/ruby.i (2) -- Patch Links -- https://github.com/strk/geos/pull/5.patch https://github.com/strk/geos/pull/5.diff --- Reply to this email directly or view it on GitHub: https://github.com/strk/geos/pull/5 - End forwarded message - ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] Virtual inheritance: call for test
You may have noticed recent commits focused on removing static casts. Under the hood this was propedeutic work to introduction of virtual inheritance, allowing us to map the concept of Puntal, Lineal and Polygonal JTS interfaces into GEOS. Once such change is introduced, you'll be able to upcast Puntal, Lineal and Polygonal to Geometry. And you may upcast Point and MultiPoint to Puntal, LineString or MultiLineString to Lineal, Polygon and MultiPolygon to Polygonal. A side-effect is that you cannot downcast from Geometry to Point or LineString or Polygon w/out using dynamic_cast anymore. You'll get a compiler error if you try (which drove the changes). You may notice that casting up and down between Geometry and one of the basic types you'll really get different pointers, which is the reason why static_cast is forbidden. GCC kindly complains both with static_cast _and_ with C-like casts, so the real danger is only when you use reinterpret_cast<> or you step on a void pointer. In both cases you'll get no warning at compile time but memory errors at runtime. r3184 is an example of such bad hiding bug that took a while to find (due to the unfortunate interface of STR tree making use of void pointers). I do belive the change is healthy, if not else, for forcing cleanup up of dangling unsafe casts and pointing out other unsafe interfaces. Before committing this to SVN trunk I'd like to have some feedback by anyone having C++ client code [1] to build and test againts it. Both the GEOS and the PostGIS testsuites run fine with the patch applied. The patch is in mailbox format, can apply using git-am or patch -p1 from top-level source dir. [1] Consider also adding the project on the wiki, if not already listed: http://trac.osgeo.org/geos/wiki/Applications --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html >From 52ee164ca58cf3811e66bf300e6e65587428f4f5 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Fri, 4 Feb 2011 13:36:17 +0100 Subject: [PATCH] Turn Puntal, Lineal and Polygonal into Geometry derivates. This commit introduces virtual inheritance and 3 diamonds. --- NEWS |2 ++ include/geos/geom/GeometryCollection.h |2 +- include/geos/geom/LineString.h |6 +- include/geos/geom/Lineal.h |6 +- include/geos/geom/MultiLineString.inl |1 + include/geos/geom/MultiPoint.h |2 +- include/geos/geom/MultiPolygon.inl |1 + include/geos/geom/Point.h |2 +- include/geos/geom/Polygon.h|2 +- include/geos/geom/Polygonal.h |6 +- include/geos/geom/Puntal.h |6 +- src/geom/LinearRing.cpp|4 +++- src/geom/MultiLineString.cpp | 10 ++ src/geom/MultiPoint.cpp|1 + src/geom/MultiPolygon.cpp |3 ++- 15 files changed, 36 insertions(+), 18 deletions(-) diff --git a/NEWS b/NEWS index abad81a..76110b1 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,8 @@ Changes in 3.3.0 - CAPI: GEOSRelatePatternMatch - PHP: new PHP5 bindings based on CAPI - C++ API changes: + - Geometry inheritance chain changed to introduce Puntal, Lineal +and Polygonal classes (virtual inheritance introduced) - Geometry::isWithinDistance method is now const - Polygonizer::getCutEdges returns by const ref - Polygonizer::getDangles returns by const ref diff --git a/include/geos/geom/GeometryCollection.h b/include/geos/geom/GeometryCollection.h index 9e2a8cc..b16b094 100644 --- a/include/geos/geom/GeometryCollection.h +++ b/include/geos/geom/GeometryCollection.h @@ -54,7 +54,7 @@ namespace geom { // geos::geom * represented by GeometryCollection subclasses MultiPoint, * MultiLineString, MultiPolygon. */ -class GEOS_DLL GeometryCollection : public Geometry { +class GEOS_DLL GeometryCollection : public virtual Geometry { public: friend class GeometryFactory; diff --git a/include/geos/geom/LineString.h b/include/geos/geom/LineString.h index 95f6a78..074c0ac 100644 --- a/include/geos/geom/LineString.h +++ b/include/geos/geom/LineString.h @@ -68,7 +68,7 @@ namespace geom { // geos::geom * If these conditions are not met, the constructors throw * an {@link IllegalArgumentException} */ -class GEOS_DLL LineString: public Geometry, public Lineal { +class GEOS_DLL LineString: public virtual Geometry, public Lineal { public: @@ -223,10 +223,6 @@ LineString::clone() const { } // namespace geos::geom } // namespace geos -//#ifdef GEOS_INLINE -//# include "geos/geom/LineString.inl" -//#endif - #ifdef _MSC_VER #pragma warning(pop) #endif diff --git a/include/geos/geom/Lineal.h b/include/geos/geom/Lineal.h index 5a63cbc..d639dc0 100644 --- a/include/geos/geom/Lineal.h +++ b/include/geos/geom/Lineal.h @@ -27,7 +27,11 @@ namespace geom { // geos::geom * Identifies {@link Geom
Re: [geos-devel] RE: [Jts-topo-suite-user] JTS Topology error
On Thu, Feb 03, 2011 at 10:25:08AM +1030, james.sew...@lisasoft.com wrote: > (Crossposting to GEOS list) > > I see. So the difference between the GeometryNoder with a PrecisionModel and > using ST_Snaptogrid from PostGIS on the input geometries is that the > GeometryNoder snaps all nodes which are created by the noding process as it > works? > > This seems like an elegant solution to deal with the roundoff issues. > > I gather GEOS doesn't expose noding functionality in this way? Is this > something that could possibly be added? From PostGIS would a command like > ST_Node(geometry, 10E-10) make sense / be plausible? Or would a better > solution be to define the precision for each geometry column? Check the new ST_Snap() function in PostGIS and GEOS svn repository. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] geos offset curve builder question
On Mon, Jan 31, 2011 at 09:48:07AM -0600, Steve Monday wrote: > All, > > I've been using geos successfully for many months. I appreciate the work > that has been invested in geos and the robustness of the api. > > I do have a "how to" question around the OffsetCurveBuilder but don't want > to clutter this list if geos-devel is not intended to be a general purpose > geos question/support mechanism. > > Am I in the right place? Yes, being the only GEOS mailing list. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] Requesting PHP component on trac
GEOS/PHP just got its first ticket [1] [1] http://trac.osgeo.org/geos/ticket/393 But there's no PHP component on trac, so the reporter had to pick SWIG, which was close, but in reality completely unrelated (PHP bindings are not made with SWIG). So, can a PHP component be added ? Thank you. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] RE: GEOS errors from PostGIS
On Sun, Jan 23, 2011 at 09:53:17PM -0800, Martin Davis wrote: > FWIW, I ran this data through JTS 1.11 using both union(geom, geom) and > union(geom), and both operations completed without errors. > > Not sure what this says about the GEOS issue - other than more debugging > required...! Time consuming job indeed. It takes a patient sponsor. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] RE: GEOS errors from PostGIS
On Mon, Jan 17, 2011 at 11:05:42AM +1030, james.sew...@lisasoft.com wrote: > The latest daily doesn't help the problem so I've reverted to 3.2.2 and > performed some more testing. > > I have a dataset where: > > ST_Union(the_geom, ST_SetSRID('LINESTRING EMPTY', 4283)) > > Fails, yet > > ST_Union(the_geom). > > Works. There are other datasets which fail on both versions, and I have no > doubt I can find one which works in the reverse manner. The latter uses CascadedUnion (the one UnaryUnion uses too). The former uses normal union (non-cascaded). --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] RE: GEOS errors from PostGIS
On Fri, Jan 14, 2011 at 05:37:05PM -0800, Martin Davis wrote: > Yes, I know it's a bad msg - it was a slip when commiting. Too late to > change now though. Ok, reviewed... UnaryUnionOp is still unported to GEOS, all the rest is up to date. If anyone is willing to sponsor the port I'm available. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] RE: GEOS errors from PostGIS
On Fri, Jan 14, 2011 at 08:14:40AM -0800, Martin Davis wrote: > Rev 110 > > Modification was to switch to using SnapIfNeededOverlayOp > > private Geometry unionNoOpt(Geometry g0) > { > Geometry empty = geomFact.createPoint((Coordinate) null); > return SnapIfNeededOverlayOp.overlayOp(g0, empty, OverlayOp.UNION); > } This one ? | 2010-06-09 04:37 dr_jts | | * [r110] jts/java/src/com/vividsolutions/jts/io/WKBWriter.java, |jts/java/src/com/vividsolutions/jts/noding/SegmentIntersector.java, |jts/java/src/com/vividsolutions/jts/noding/snapround/HotPixel.java, | jts/java/src/com/vividsolutions/jts/operation/overlay/snap/LineStringSnapper.java, |jts/java/src/com/vividsolutions/jts/operation/union/UnaryUnionOp.java, | jts/java/src/com/vividsolutions/jtstest/testbuilder/JTSTestBuilder.java: |Javadoc ... commit message "Javadoc" doesn't really help :) --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] RE: GEOS errors from PostGIS
On Thu, Jan 13, 2011 at 07:51:16PM -0800, Martin Davis wrote: > James, > > I suspect this may be caused by a known bug in the Unary union. This > was identified in this thread on the JTS list: > > http://sourceforge.net/mailarchive/forum.php?thread_name=4C0FB4A5.2010304%40refractions.net&forum_name=jts-topo-suite-user > > I fixed this in JTS, in the soon-to-be-released ver 1.12. Perhaps this > fix hasn't made it's way into GEOS and PostGIS yet. Have a revision number of the fix ? Haven't found one in the forum thread... --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] RE: GEOS errors from PostGIS
On Wed, Jan 12, 2011 at 12:53:01PM +1030, james.sew...@lisasoft.com wrote: > Sorry, I didn't include the actual error: You didn't include PostGIS and GEOS versions as well: SELECT postgis_full_version(); > An example is: > > NOTICE: TopologyException: found non-noded intersection between LINESTRING > (143.861 -36.881, 143.861 -36.881) and LINESTRING (143.861 -36.881, 143.861 > -36.881) at 143.861 -36.881 That's a NOTICE, shouldn't be a show-stopper. Did you really check your input with ST_IsValid, btw ? --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: Fwd: Re: [geos-devel] Cannot build from trunk because of SharedPathsOp
On Tue, Dec 14, 2010 at 05:16:46PM +, Alex Hagen-Zanker wrote: > Thanks, I am using windows, so I assume this doesn't apply? It depends on which tools you use for building. > I suppose the make files need to be updated to include > SharedPathsOp.cpp. Yes, SharedPathsOp (both .cpp and .h) would need to be added to whatever build script is used. "Send a patch" always applies. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Help - Want to merge / join two polygons
On Thu, Dec 09, 2010 at 03:10:00AM -0800, Namrata wrote: > > Hi, > > I am exploring GEOS features. I want to know if it is possible to merge or > join 2 polygons? > > And if I have MultiplePolygons and want to merge /join them all, is there > any such method in GEOS? Sure. See the Union operation. For a collection, see the Cascaded flavor. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] about buffer of self-intersect polygon
On Thu, Dec 09, 2010 at 04:59:24PM +0800, xie_jiong wrote: > Hi All, > >Dose GEOS supports buffer of self-intersected polygon, just like 'POLYGON > ((2 2,-2 -2,2 -2,-2 2,2 2))'. I get the wrong polygon result with > GEOSBuffer('POLYGON ((2 2,-2 -2,2 -2,-2 2,2 2))',0.5,8). I use newest verion. Self-intersecting polygon is invalid. Any invalid input is not supposed to yeld meaningful output. You need to clean the invalidity up. FYI: PostGIS has a geos-based routing doing a cleanup like this: # select st_asewkt(st_makevalid('POLYGON ((2 2,-2 -2,2 -2,-2 2,2 2))')); MULTIPOLYGON(((2 2,0 0,-2 2,2 2)),((0 0,2 -2,-2 -2,0 0))) You can then successfully buffer the result (getting back to a POLYGON). --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Snapping bug ?
On Fri, Dec 03, 2010 at 03:23:43PM +0100, strk wrote: > On Fri, Dec 03, 2010 at 11:02:35AM +0100, strk wrote: > > > GEOS/JTS in sync > > (I checked and synched, only additional snapToSelf was missing). > > So, Martin. > After a closer look I found that indeed GEOS wasn't checking > for duplicates as JTS was. BUT: reading the code JTS seems to > be only checking for duplicates when snapping segments, not vertices. Moreover, the check for duplicates found in snapSegments seems to be useless to me, in that findSegmentToSnap will not return a segment only snapping to endpoint, which means you'll never have a coordinate being a duplicate of previous. Please give me a case failing by dropping that check if I'm wrong (I couldn't find one). --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Snapping bug ?
On Fri, Dec 03, 2010 at 11:02:35AM +0100, strk wrote: > GEOS/JTS in sync > (I checked and synched, only additional snapToSelf was missing). So, Martin. After a closer look I found that indeed GEOS wasn't checking for duplicates as JTS was. BUT: reading the code JTS seems to be only checking for duplicates when snapping segments, not vertices. So this specific case still yelds the duplicated point after porting that part of the code. Did you try with JTS ? > =# select st_asewkt(st_snap( > 'POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))', > 'POINT(0.5 0)', > 0.6 > )); --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Snapping bug ?
On Thu, Dec 02, 2010 at 07:55:06PM -0800, Martin Davis wrote: > strk, > > I'm not exactly sure which snapping routine you are using (and I'm not > even sure if GEOS is in synch with JTS for this functionality). > > Can you provide more details on the code you're using? Is there a > tolerance involved? GEOS/JTS in sync (I checked and synched, only additional snapToSelf was missing). Tolerance is 1, but 0.6 is also enough. It's now in postgis too: =# select st_asewkt(st_snap( 'POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))', 'POINT(0.5 0)', 0.6 )); POLYGON((0.5 0,0.5 0,1 1,0 1,0.5 0)) --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] GEOS FFI Ruby bindings
On Thu, Dec 02, 2010 at 07:21:06PM -0500, J Smith wrote: > Howdy folks. > > Well, Charlie Savage planted the idea in my mind, so I'm currently in > the process of re-writing the GEOS bindings for Ruby in Ruby using > FFI. > > After a hack-fest last night, I've gotten the basics down, and am > writing a unit test suite that can be used to compare against the > current SWIG-based library. So far I've only implemented > CoordinateSequence, WktReader, a couple of utility functions and the > various constants defined in the Geos module along with the very > basics of Geometry and the geometry classes that derive from it (i.e. > Point, LineString, etc.) and am currently messing around with the > callbacks to initGEOS to handle errors properly. Make sure to use the reentrant interface, worth, for new projects. We may add support for precision models and things like that with its use (contextual settings). --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] Snapping bug ?
Martin, could you try this snapping with JTS ? input: POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0)) snap_to: POINT(0.5 0) In GEOS, it returns: POLYGON ((0.5 0, 0.5 0, 1 1, 0 1, 0.5 0)) --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] GEOS Ruby bindings gem and extensions
On Wed, Dec 01, 2010 at 11:44:05AM -0700, Charlie Savage wrote: > The downside is that the different language bindings (ie python and > ruby) go their separate ways. But that is already the case anyway... Yeah, also for PHP I didn't use swig... --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] GEOS Ruby bindings gem and extensions
On Wed, Dec 01, 2010 at 11:53:08AM -0500, J Smith wrote: > That would be cool. A further option to that -- if there's an official > GEOS or OpenGeo github account, our gem could be forked and that could > sort of become the official "GEOS-blessed" gem and we, as Zoocasa, > could have our own separate fork in a more unofficial way. That way we > can add stuff as we need to to our gem but it won't affect the > upstream blessed-gem unless you guys decide to merge any changes in. > (This whole social coding thing is pretty cool, yeah?) I'm loving distributed VCS too, but in this case we're talking about keeping the binding separated so don't see a reason for a fork. I've an unofficial copy of geos svn on github.com/strk Would love to see osgeo provide a git infrastructure. Unfortunately github uses proprietary software for that. But code used by gitorious.org is free-as-in-freedom. All in all it's not important _where_ you put the code, if it's in a git repo you can still share the efforts. Don't need the web buttons for doing forks and pull requests. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] GEOS Ruby bindings gem and extensions
On Wed, Dec 01, 2010 at 11:26:16AM -0500, J Smith wrote: > The big question is: do we want to have this code directly in the main > GEOS repository? We were planning on using github to facilitate the > whole social coding scene thing and 'cause we like the dead-simple > release management that jeweler provides. I second using a separate repository. That way you can keep binding release cycles completely separated from the core GEOS library. I've been too lazy to do that for the PHP bindings... --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] GEOS Ruby bindings gem and extensions
On Tue, Nov 30, 2010 at 05:05:35PM -0500, J Smith wrote: > Our plan at the moment would be to put the code up on to github along > with the appropriate Rubygems releases. Good idea. > We'd like to license the > extensions code under the MIT license as per the usual Ruby and Rails > library terms. Why not LGPL ? As per "usual", freshmeat finds 276 projects written in Ruby, with their licenses: GPL: 90 MIT/X: 43 BSD Revised: 33 LGPL: 28 GPLv3: 18 . http://freshmeat.net/search?page=1&q=ruby&submit=Search&with=800&without= --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Error building GEOS enabled in GDAL on Solaris
On Thu, Nov 25, 2010 at 10:57:10PM +0530, Namrata Sorte wrote: > --without-jpeg \ [...] > jpeg_set_defaults /pool1/innovations/gdal-1.7.1/libgdal.so > jpeg_CreateCompress /pool1/innovations/gdal-1.7.1/libgdal.so > jpeg_read_scanlines /pool1/innovations/gdal-1.7.1/libgdal.so > jpeg_start_compress /pool1/innovations/gdal-1.7.1/libgdal.so > > ld: fatal: Symbol referencing errors. No output written to gdalinfo Sounds like a bug in GDAL build scripts. GEOS surely doesn't use any jpeg symbol. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] git repo
FYI: I've cloned the SVN trunk branch onto a git repository on github: https://github.com/strk/geos I'll be using that one for development, in its own branch. Dunno if git-svn tools are able to replicate the branching from git to svn but probably isn't worth it. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Removing instruction for compile with VS IDE
On Wed, Oct 20, 2010 at 08:57:00PM +0200, Andrea Peri wrote: > So I think the link to > Building on Windows with Visual Studio > IDE<http://trac.osgeo.org/geos/wiki/BuildingOnWindowsWithVisualStudioIDE> > would be remove because it suggest use three folder removed. > or changed with somethink like Andrea, it's a wiki: thanks for taking action ! :) --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] problem compiling GEOS [in StringTokenizer.cpp]
On Thu, Oct 14, 2010 at 06:14:17PM +0530, ameet chaudhari wrote: > I m trying to build GEOS 3.0.0 on Win 7. > Configuration [./configure --prefix=/usr/local] works fine. > But while compiling [make], following error shows: 3.0.0 is ancient. Check if you have an #include in the file. C89 describes strtod(). --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Re: TopologyException makes GEOS/JTS very difficult to employ in my production environments...
On Thu, Sep 30, 2010 at 09:27:23AM +0200, G. Allegri wrote: > But many times the errors happen also with valid > data, and that's the case, for example, in unioning. In such cases you > cannot know before time what kind of beasts you will get through > during the cascaded unioning. I think I fixed that bug in GEOS trunk (the one allowing invalid results coming out from Union operations). Still, there are cases in which valid inputs trigger TopologyExceptions (tracker has a few). Funding an improved-robustness-noding project might be useful indeed. Another idea might be figuring out a policy on dimensional collapses, which was the cause of one case I've been looking at while inspecting Giovanni's datasets. In that case, the operation was succeeding in augomented-precision space (with common bits removed) and the result collapsed dimensionally while re-adding common bits (loosing precision). For polygons, such collapses result in zero-area rings or spikes. If you know you don't care about those, you may just have them removed rather than getting a TopologyException. This would be particularly useful when that happens in a cascaded union operation. I think the latter would even cost less than 30k --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] SIGABRT in GEOS using the C-API
On Wed, Sep 22, 2010 at 12:13:51PM -0400, Alex Trofast wrote: > On 09/22/2010 08:35 AM, strk wrote: > > On Wed, Sep 22, 2010 at 08:12:39AM -0400, Alex Trofast wrote: > > > > > I think you are right, after testing I noticed that GEOS compiles with > > > -O2 by default. If you change CFLAGS/CXXFLAGS to be -O1 instead this > > > SIGABRT does not seem to happen. Is this a bug that can or should be > > > filed with the gcc project? > > > > I guess so, assuming you're using latest stable release. > > No I'm using SVN trunk. But going back a 100 revisions or so the problem > is the same. I haven't tried it with the stable release but I imagine > the problem is the same. Even better for filing a bug. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] SIGABRT in GEOS using the C-API
On Wed, Sep 22, 2010 at 08:12:39AM -0400, Alex Trofast wrote: > Hi strk > > I think you are right, after testing I noticed that GEOS compiles with > -O2 by default. If you change CFLAGS/CXXFLAGS to be -O1 instead this > SIGABRT does not seem to happen. Is this a bug that can or should be > filed with the gcc project? I guess so, assuming you're using latest stable release. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Bug in WKBReader
On Tue, Sep 21, 2010 at 03:51:30AM +0200, Hugues Romain (RCSmobility) wrote: > > > I agree with the patch and can commit it. > > Only, would you be so kind to also add a testcase for it in > tests/unit/io/WKBReaderTest.cpp ? > > In that file, the cases do not concern the SRID attribute, so it is > necessary to write a new test function for that, taking GeometryFactory as a > parameter and not a constant. No need to overgeneralize, a couple of new tests: one for checking default factory SRID and one for checking override would be good enough. Thanks for your time. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] GetIntersection
On Sat, Sep 18, 2010 at 10:25:59AM +0200, Paul Meems wrote: > I want to let it use more of my resources so it will perform faster. After > that we can look deeper in the crash. No parameters exist to improve performances, I'm afraid. Sometimes you can improve your process by thinking better about the geometrical problem, and approach it differently. Some other times all you can do is profile and see if anything dumb is happening. Looking at the crash might reveal something too. Which version of GEOS ? Tried with SVN ? --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Bug in WKBReader
On Sun, Sep 19, 2010 at 03:48:18PM +0200, Hugues Romain (RCSmobility) wrote: > I propose to patch this with a new condition before overwriting the SRID : > the SRID of the factory is keeped if the WKB does not provide a SRID value. > > Do you agree with this ? If yes, is somebody able to commit the patch ? I agree with the patch and can commit it. Only, would you be so kind to also add a testcase for it in tests/unit/io/WKBReaderTest.cpp ? Thanks ! --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] SIGABRT in GEOS using the C-API
On Tue, Aug 31, 2010 at 08:26:29PM -0400, Alex Trofast wrote: > Greetings all, I'm getting a SIGABRT in GEOS, but not on all Linux distros. > The following is a partial backtrace from Ingres: > #2 0x0030e4a2b7b5 in __assert_fail () from /lib64/libc.so.6 > #3 0x7fa6f3ea2623 in geos::geom::GeometryComponentFilter::filter_ro > (this=, geom=) at > GeometryComponentFilter.cpp:35 > #4 0x7fa6f3eab47c in geos::geom::Polygon::apply_ro (this=0x7fa6cc03b0d0, > filter=0x7fa6e09ae900) at Polygon.cpp:402 > #5 0x7fa6f3f038c5 in getLines (this=0x7fa6e09ae9b0) at > ../../../include/geos/geom/util/LinearComponentExtracter.h:57 Sounds like a compiler bug. GeometryComponentFilter::filter_ro is a virtual function. LinearComponentExtracter is the actual implementation for this case (see last step in trace). You would _always_ receive a SIGABRT if GeometryComponentFilter::filter_ro is entered rather than LinearComponentExtracter::filter_ro. Indeed GeometryComponentFilter::filter_ro and ::filter_rw could be made pure abstract methods. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] GEOS C-API on Windows
On Mon, Aug 30, 2010 at 04:50:12PM -0400, Alex Trofast wrote: > Greetings all, > > When I use GEOS on Linux I need both the libgeos.so and libgeos_c.so to > compile/run but on Windows it seems like only geos_c.dll was built, no > geos.dll to be found. Is this an artifact of how I built GEOS? Do I ever need > both geos.dll and geos_c.dll on Windows? Any info is greatly appreciated. > Thanks! geos_c.dll _might_ already contain geos.dll. On Linux geos_c lib usually links (doesn't contain) geos lib. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Invalid geometries from GEOS operations
Oh, forgot to mention: in trunk you can choose whether or not to enable the check for validity thus giving SnapOp a chance to give you valid result or exception. Default is don't check (like it's always been), you can change by defining GEOS_CHECK_COMMONBITS_VALIDITY in include/geos/geom/BinaryOp.h (around line 120) Note that defining that macro would make GEOS closer to JTS in functionality. -strk; On Fri, Aug 27, 2010 at 04:21:43PM +0200, strk wrote: > I've spent some days enhancing the XMLTester to check > for validity of returned geometries and found a dozen > or more such cases (6 couple of inputs, multi-ops for > some of them). > > All the invalidities come out from GEOS unchecked use of > CommonBitsOp, whereas such operation is known to possibly > yeld collapsed poligons due to loss of precision when > translating back (re-adding the previously stripped bits). > > In JTS, an EnhancedBitsOp class is used to basically add > a validity check around the CommonBitsOp to ensure the > result would be checked before returning. > In GEOS, doing a similar thing would be nice as we could > then try something else (SnapOp). Well, I did and that > fixed 5 over 6 tests. Unfortunately the last test broke > completely, that is it would not return an invalid geometry > (as it did before) but rather an exception. > > OUT OF DETAIL, INTO THE POINT > > Ok, simple question for you now is: > Should GEOS always throw an exception in preference over > returning an invalid geometry ? > > > --strk; > > () Free GIS & Flash consultant/developer > /\ http://strk.keybit.net/services.html > ___ > geos-devel mailing list > geos-devel@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/geos-devel -- () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] Invalid geometries from GEOS operations
I've spent some days enhancing the XMLTester to check for validity of returned geometries and found a dozen or more such cases (6 couple of inputs, multi-ops for some of them). All the invalidities come out from GEOS unchecked use of CommonBitsOp, whereas such operation is known to possibly yeld collapsed poligons due to loss of precision when translating back (re-adding the previously stripped bits). In JTS, an EnhancedBitsOp class is used to basically add a validity check around the CommonBitsOp to ensure the result would be checked before returning. In GEOS, doing a similar thing would be nice as we could then try something else (SnapOp). Well, I did and that fixed 5 over 6 tests. Unfortunately the last test broke completely, that is it would not return an invalid geometry (as it did before) but rather an exception. OUT OF DETAIL, INTO THE POINT Ok, simple question for you now is: Should GEOS always throw an exception in preference over returning an invalid geometry ? --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Compiling GEOS on Centos 5.5
On Thu, Aug 26, 2010 at 01:44:02AM +, mightyta...@gmail.com wrote: > g++: ../source/.libs/libgeos.so: No such file or directory > make[1]: *** [libgeos_c.la] Error 1 > make[1]: Leaving directory `/usr/local/src/geos-3.2.2/capi' > make: *** [all-recursive] Error 1 > > I look in in ../source/.libs/libgeos.so It links to libgeos-3.2.2.so, which > is not there. You must have removed it unintentionally. Try a make clean and make again (from top-level dir). Or, if you feel brave, just rm src/libgeos.{la,lo} and make. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] Nightly snapshot link also broken
As with the doxygen part... Really looks like download.osgeo.org/geos needs some love. Is there a PSC cheatsheet containing informations about the processes and who's in charge of what ? TIA --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] GEOS API online
The online doxygen output is missing, 404 link from homepage: http://download.osgeo.org/geos/doxygen/ Can anyone help ? --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] EWKB and M component
On Fri, Aug 06, 2010 at 10:29:09AM -0500, Aron Bierbaum wrote: > We have recently ran across some data that we are trying to load from > PostGIS that contains a fourth M component. [1] We quickly noticed > that the GEOS WKBReader does not support a potential M component. Are > there any plans to improve support for this extra component? No plans. > Since we really don't care about this fourth component, and we didn't > want to attempt to add a fourth component to the Coordinate class, we > extended the WKBReader to simply strip this extra component. I have > attached a patch for review. I suggest you strip the M on the db side. GEOS's WKBReader is meant to read WKB, not EWKB. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Pending Commit: changes to single sided buffering & ogc validity checking
On Fri, Jul 16, 2010 at 02:38:52PM -0400, Andrew Ross wrote: > Thanks for the explanation Paul. Very much appreciated. > > My apologies for prolonging this thread with one more question. In terms of > coding style, does it make sense to have the copyright notices for each > change in the code as this example? Should copyright notices from previous > modifications ever be removed? Please point me at the style guidelines if > this is already defined. Thanks again. There's no official style guidelines as far as I know (but could be wrong). What I try to do is follow the style I find in the file being edited. I started with TAB indenting for instance, but as others prefer spaces we're somewhere slowly moving there, for new code. You'll find a mix of TAB and spaces but hopefully only in different files. Changing the style of files has a bad effect on history tracking and regression debugging. About copyright, old notices shouldnt' be removed unless you're sure nothing is left from the original author. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Pending Commit: changes to single sided buffering & ogc validity checking
On Fri, Jul 16, 2010 at 08:53:59AM -0400, Andrew Ross wrote: > My concern is what prevents a contributor from withdrawing the rights to use > their source code on a whim? I don't understand this concern. You mean what prevents people to assign a different licence to the code they commit to the GEOS repository ? --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Pending Commit: changes to single sided buffering & ogc validity checking
On Thu, Jul 15, 2010 at 07:53:33PM -0400, Andrew Ross wrote: > Hi Tom, All > > Saw the copyright notice in the change. Copyright for geos seems to be held > by a number of people and organizations. That seems legally murky to me but > I am not a lawyer. Has this been discussed previously? Not that I know about. I'm personally happy with multi-people copyright. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Re: Polygonizer bug ?
FYI, as of r3078 the mis-port is fixed in GEOS. Still interested in the result after self-noding. Thanks ! --strk; On Thu, Jul 01, 2010 at 10:59:12PM +0200, strk wrote: > On Mon, Jun 21, 2010 at 09:13:16AM -0700, Martin Davis wrote: > > strk, > > > > The JTS Developer's Guide is a bit confusing. The geometry given in the > > example is NOT the geometry depicted in the illustration. (This is a > > doc bug - but I"m not sure if and when I can fix it). > > > > When I run the geometry below in JTS I get: > > > > Polygons: > > GEOMETRYCOLLECTION ( > > POLYGON ((189 98, 83 187, 185 221, 325 168, 189 98)), > > POLYGON ((185 221, 88 275, 180 316, 292 281, 185 221))) > > > > Dangles: > > MULTILINESTRING ((185 221, 100 100), > > (0 0, 10 10)) > > > > I believe this is the expected result. > > Uhm, that's w/out self-noding, right ? > > --strk; > > > > > > Hope that helps > > > > Martin > > > > strk wrote: > > >Martin, I'm adding a testcase for the Polygonizer using example from : > > >"JTS Developer's Guide, Chapter 6 - Polygonization" > > > > > >Here's the input, represented as a collection: > > > > > >GEOMETRYCOLLECTION( > > >LINESTRING(0 0, 10 10), > > >LINESTRING(185 221, 100 100), > > >LINESTRING(185 221, 88 275, 180 316), > > >LINESTRING(185 221, 292 281, 180 316), > > >LINESTRING(189 98, 83 187, 185 221), > > >LINESTRING(189 98, 325 168, 185 221)) > > >) > > > > > >When passing it into the Polygonizer class I get > > >2 rings, no cut or invalid edges and 3 dangles. > > >Also notable is that of the 3 dangles, 2 are identical > > >and specificall are the isolated edge (first geometry > > >in the collection). > > > > > >The example in the guide suggests the rings should > > >be 3 instead, and that there should be one cut > > >edge (represented in blue) and 2 dangles > > >the red ones. > > > > > >Does it sound as a bug in GEOS or does JTS give the > > >same results ? > > > > > >Note that forcing proper noding using the union trick > > >does give the 3 expected rings, but still lacks the > > >cut edge and duplicates the dangle. > > > > > >Thanks in advance. > > > > > >--strk; > > > > > > () Free GIS & Flash consultant/developer > > > /\ http://strk.keybit.net/services.html > > > > > > > -- > > Martin Davis > > Senior Technical Architect > > Refractions Research, Inc. > > (250) 383-3022 > > -- > > () Free GIS & Flash consultant/developer > /\ http://strk.keybit.net/services.html > ___ > geos-devel mailing list > geos-devel@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/geos-devel -- () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] Re: Polygonizer bug ?
On Mon, Jun 21, 2010 at 09:13:16AM -0700, Martin Davis wrote: > strk, > > The JTS Developer's Guide is a bit confusing. The geometry given in the > example is NOT the geometry depicted in the illustration. (This is a > doc bug - but I"m not sure if and when I can fix it). > > When I run the geometry below in JTS I get: > > Polygons: > GEOMETRYCOLLECTION ( > POLYGON ((189 98, 83 187, 185 221, 325 168, 189 98)), > POLYGON ((185 221, 88 275, 180 316, 292 281, 185 221))) > > Dangles: > MULTILINESTRING ((185 221, 100 100), > (0 0, 10 10)) > > I believe this is the expected result. Uhm, that's w/out self-noding, right ? --strk; > > Hope that helps > > Martin > > strk wrote: > >Martin, I'm adding a testcase for the Polygonizer using example from : > >"JTS Developer's Guide, Chapter 6 - Polygonization" > > > >Here's the input, represented as a collection: > > > >GEOMETRYCOLLECTION( > >LINESTRING(0 0, 10 10), > >LINESTRING(185 221, 100 100), > >LINESTRING(185 221, 88 275, 180 316), > >LINESTRING(185 221, 292 281, 180 316), > >LINESTRING(189 98, 83 187, 185 221), > >LINESTRING(189 98, 325 168, 185 221)) > >) > > > >When passing it into the Polygonizer class I get > >2 rings, no cut or invalid edges and 3 dangles. > >Also notable is that of the 3 dangles, 2 are identical > >and specificall are the isolated edge (first geometry > >in the collection). > > > >The example in the guide suggests the rings should > >be 3 instead, and that there should be one cut > >edge (represented in blue) and 2 dangles > >the red ones. > > > >Does it sound as a bug in GEOS or does JTS give the > >same results ? > > > >Note that forcing proper noding using the union trick > >does give the 3 expected rings, but still lacks the > >cut edge and duplicates the dangle. > > > >Thanks in advance. > > > >--strk; > > > > () Free GIS & Flash consultant/developer > > /\ http://strk.keybit.net/services.html > > > > -- > Martin Davis > Senior Technical Architect > Refractions Research, Inc. > (250) 383-3022 -- () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] CascadedPolygonUnion XML testing
On Sun, Jun 27, 2010 at 11:14:22PM +0200, strk wrote: > On Sun, Jun 27, 2010 at 10:57:37PM +0200, G. Allegri wrote: > > Are you sure it works? > > select st_union(st_astext(the_geom)) from selezione_exp1_red2 (one of > > your reductions) doesn't give any output... > > Doesn't _always_ work, did for another_dump2: For the record, using SnapToGrid gives you more control over the roundup. 1e-6 "gridding" works in the exp1_red2 case too: # select st_isvalid(st_union(snaptogrid(the_geom, 0.001))) from selezione_exp1_red2; st_isvalid t (1 row) --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] CascadedPolygonUnion XML testing
On Sun, Jun 27, 2010 at 10:57:37PM +0200, G. Allegri wrote: > Are you sure it works? > select st_union(st_astext(the_geom)) from selezione_exp1_red2 (one of > your reductions) doesn't give any output... Doesn't _always_ work, did for another_dump2: strk=# select st_isvalid(st_union(g)) from another_dump2; ERROR: GEOSUnionCascaded: TopologyException: found non-noded intersection between LINESTRING (184.319 2038.88, 186.647 2046.15) and LINESTRING (186.647 2046.15, 186.647 2046.15) at 186.647 2046.15 strk=# select st_isvalid(st_union(st_astext(g))) from another_dump2; st_isvalid t (1 row) > Anyway, do you suggest using wkb? Yes. HEXEWKB (the canonical output) is handled by JTS just fine. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] CascadedPolygonUnion XML testing
On Sun, Jun 27, 2010 at 02:18:57PM +0200, G. Allegri wrote: > Ok, I've found the difference between the tests. I set up a test run > with precisionModel FIXED and scale 1.0. With this model the union > fails. While, the default precisionModel for the UnionOp is FLOATING > (scale=0.0) and this runs ok... > > What is the model used by GEOS? FLOATING (the model used by the C-AP, thus postgis) --strk;; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] CascadedPolygonUnion XML testing
On Sun, Jun 27, 2010 at 12:22:35PM +0200, G. Allegri wrote: > also "another_dump2" seems to execute well with JTS. I'm using its wkt > representation as a collected multipolygon: > http://www.giovanniallegri.it/share/another_dump2_collect_wkt.txt > Don't ! WKT representation is lossy. SELECT ST_Union(ST_AsText(g)); would succeed too (and does)... -- strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] CascadedPolygonUnion XML testing
35 points version (2 geoms): http://strk.keybit.net/tmp/another_dump2.sql ... still finds non-noded intersections ... --strk; On Sun, Jun 27, 2010 at 12:18:22AM +0200, G. Allegri wrote: > I'm getting mad. The same geometries, run in a basic test written by > me works fine: http://www.giovanniallegri.it/share/test_wkt.java > The same geometries give errors in Postgis (+GEOS?) and with TestRunner... > > giovanni > > 2010/6/26 strk : > > On Sat, Jun 26, 2010 at 12:26:11AM +0200, G. Allegri wrote: > >> Before going to bed... a snapshot of the location causing the > >> exception: http://www.giovanniallegri.it/share/error_condition_snapshot.png > > > > Just in case mine is smaller, another reduction here: > > http://strk.keybit.net/tmp/another_dump1.sql > > (201 points in 3 geoms) > > > > NOTE: my version is a database dump, failure happens on st_union > > which fails with original geoms and fails with snapped overlay. > > dropping any of the 3 geoms makes the operation succeed, haven't > > checked if that's a special handling within postgis. > > > > It'd be worth filing a ticket on trac for better handling. > > > > --strk; > > > >> > >> > >> > >> 2010/6/25 G. Allegri : > >> > This is the reduced version of the test xml: > >> > http://www.giovanniallegri.it/share/TestUnionMultiPolygon_red.xml > >> > > >> > Now it contains only two geometries. It tries to node them but fails, > >> > so a second try is done with the SnapOverlay, but it fails too. > >> > I don't know the algorithm so I'm not able, yet, to say what is failing. > >> > > >> > giovanni > >> > > >> > 2010/6/25 G. Allegri : > >> >> Here is a test xml: > >> >> http://www.giovanniallegri.it/share/TestUnionMultiPolygon.xml > >> >> It's big, but I will reduce it nex time :) > >> >> > >> >> Notes: > >> >> > >> >> 1 - this multipolygon comes from an st_collect on 95 rows in a postgis > >> >> table. The test on it fails with Topology Expection found non-noded > >> >> intersection, because the MP is invalid. I've tested it on jts from > >> >> trunk. > >> >> 2 - I've run a cascadedunion.union operation on a List of the same > >> >> geometries (picked with Geotools directly from the DB). It works fine. > >> >> In this test I've used jts 1.10 shipped with Geotools. I will try it > >> >> agains the trunk version as soon as possible. > >> >> > >> >> Giovanni > >> >> > >> >> 2010/6/25 strk : > >> >>> On Fri, Jun 25, 2010 at 04:39:17PM +0200, strk wrote: > >> >>>> Martin, is there any support for testing CascadedUnion > >> >>>> with the XML format ? Would help comparing GEOS/JTS. > >> >>> > >> >>> I've found TestUnaryUnion.xml in JTS repository. > >> >>> I guess that's what GEOS should be using > >> >>> for testing CascadedPolygonUnion. > >> >>> > >> >>> Only need to actually port UnaryUnion ... > >> >>> > >> >>> --strk; > >> >>> > >> >>> Â () Â Free GIS & Flash consultant/developer > >> >>> Â /\ Â http://strk.keybit.net/services.html > >> >>> ___ > >> >>> geos-devel mailing list > >> >>> geos-devel@lists.osgeo.org > >> >>> http://lists.osgeo.org/mailman/listinfo/geos-devel > >> >>> > >> >> > >> > > >> ___ > >> geos-devel mailing list > >> geos-devel@lists.osgeo.org > >> http://lists.osgeo.org/mailman/listinfo/geos-devel > > > > -- > > > > Â () Â Free GIS & Flash consultant/developer > > Â /\ Â http://strk.keybit.net/services.html > > ___ > > geos-devel mailing list > > geos-devel@lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/geos-devel > > > ___ > geos-devel mailing list > geos-devel@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/geos-devel -- () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] CascadedPolygonUnion XML testing
On Sat, Jun 26, 2010 at 12:26:11AM +0200, G. Allegri wrote: > Before going to bed... a snapshot of the location causing the > exception: http://www.giovanniallegri.it/share/error_condition_snapshot.png Just in case mine is smaller, another reduction here: http://strk.keybit.net/tmp/another_dump1.sql (201 points in 3 geoms) NOTE: my version is a database dump, failure happens on st_union which fails with original geoms and fails with snapped overlay. dropping any of the 3 geoms makes the operation succeed, haven't checked if that's a special handling within postgis. It'd be worth filing a ticket on trac for better handling. --strk; > > > > 2010/6/25 G. Allegri : > > This is the reduced version of the test xml: > > http://www.giovanniallegri.it/share/TestUnionMultiPolygon_red.xml > > > > Now it contains only two geometries. It tries to node them but fails, > > so a second try is done with the SnapOverlay, but it fails too. > > I don't know the algorithm so I'm not able, yet, to say what is failing. > > > > giovanni > > > > 2010/6/25 G. Allegri : > >> Here is a test xml: > >> http://www.giovanniallegri.it/share/TestUnionMultiPolygon.xml > >> It's big, but I will reduce it nex time :) > >> > >> Notes: > >> > >> 1 - this multipolygon comes from an st_collect on 95 rows in a postgis > >> table. The test on it fails with Topology Expection found non-noded > >> intersection, because the MP is invalid. I've tested it on jts from > >> trunk. > >> 2 - I've run a cascadedunion.union operation on a List of the same > >> geometries (picked with Geotools directly from the DB). It works fine. > >> In this test I've used jts 1.10 shipped with Geotools. I will try it > >> agains the trunk version as soon as possible. > >> > >> Giovanni > >> > >> 2010/6/25 strk : > >>> On Fri, Jun 25, 2010 at 04:39:17PM +0200, strk wrote: > >>>> Martin, is there any support for testing CascadedUnion > >>>> with the XML format ? Would help comparing GEOS/JTS. > >>> > >>> I've found TestUnaryUnion.xml in JTS repository. > >>> I guess that's what GEOS should be using > >>> for testing CascadedPolygonUnion. > >>> > >>> Only need to actually port UnaryUnion ... > >>> > >>> --strk; > >>> > >>> Â () Â Free GIS & Flash consultant/developer > >>> Â /\ Â http://strk.keybit.net/services.html > >>> ___ > >>> geos-devel mailing list > >>> geos-devel@lists.osgeo.org > >>> http://lists.osgeo.org/mailman/listinfo/geos-devel > >>> > >> > > > ___ > geos-devel mailing list > geos-devel@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/geos-devel -- () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] CascadedPolygonUnion XML testing
On Fri, Jun 25, 2010 at 04:39:17PM +0200, strk wrote: > Martin, is there any support for testing CascadedUnion > with the XML format ? Would help comparing GEOS/JTS. I've found TestUnaryUnion.xml in JTS repository. I guess that's what GEOS should be using for testing CascadedPolygonUnion. Only need to actually port UnaryUnion ... --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] TopologyException: found non-noded intersection
On Tue, Jun 22, 2010 at 08:52:30AM -0700, Martin Davis wrote: > Also, there was a bug uncovered recently in JTS which has the effect of > not performing some robustness improvement steps during CascadedUnion. > It's a simple fix, so perhaps someone (strk?) will be able to implement > it in GEOS. Martin, could you give more info about this ? I see nothing about "Cascaded" in the commit log. The closest I see is: 2010-06-09 04:42 dr_jts * [r112] operation/union/UnaryUnionOp.java: Fixed to use SnapIfNeededOverlayOp But maybe SVN logs don'g go back enough ? First entry is 2010-02-10 --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] CascadedPolygonUnion XML testing
Martin, is there any support for testing CascadedUnion with the XML format ? Would help comparing GEOS/JTS. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] TopologyException: found non-noded intersection
It's to be noted that non-cascaded union (the one using robustness handling heuristics) succeeds with this input. --strk; On Fri, Jun 25, 2010 at 02:14:51PM +0200, G. Allegri wrote: > Here is a testcase which reproduces the exception: > http://www.giovanniallegri.it/share/selezione_exp1_red2.sql > Me and strk are trying to get into the problem... If someone else > (Martin) could give it a try... > > giovanni > > > 2010/6/25 G. Allegri : > > Actually this selection works. We're selecting more precisely the > > geometries that give problems. > > > > giovanni > > > > 2010/6/25 strk : > >> On Tue, Jun 22, 2010 at 08:58:24AM -0700, Martin Davis wrote: > >>> By the way, I tried the sample dataset you posted here in JTS 1.12 > >>> (alpha): > >>> > >>> http://www.giovanniallegri.it/share/postgis_selection.zip > >>> > >>> and it processes fine. Â Actually it also works fine in JTS 1.11 (before > >>> the > >>> bug fix I mentioned). > >> > >> Tried with GEOS trunk too, and works as well. > >> We need another selection ... > >> > >> --strk; > >> > >> Â () Â Free GIS & Flash consultant/developer > >> Â /\ Â http://strk.keybit.net/services.html > >> > > > ___ > geos-devel mailing list > geos-devel@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/geos-devel -- () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] TopologyException: found non-noded intersection
On Tue, Jun 22, 2010 at 08:58:24AM -0700, Martin Davis wrote: > By the way, I tried the sample dataset you posted here in JTS 1.12 (alpha): > > http://www.giovanniallegri.it/share/postgis_selection.zip > > and it processes fine. Actually it also works fine in JTS 1.11 (before the > bug fix I mentioned). Tried with GEOS trunk too, and works as well. We need another selection ... --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] PHP binding ready
PHP bindings for GEOS are ready for wider test/use. Exposed classes: - GEOSWKTReader - GEOSWKTWriter - GEOSWKBReader (hex-only) - GEOSWKBWriter (hex-only) - GEOSGeometry Only missing functionality in GEOSGeometry is the ::normalize function, being the only mutator function in the whole C-API (ouch). The code comes with unit testing, which you can look at to see how to use. ./configure --enable-php && make check Buildbot support for such configuration would be nice to have. Anyone ? http://buildbot.osgeo.org:8506/waterfall times out, btw. Suggestions for a good documentation plan are welcome. Ideally something integrating with Doxygen. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] gstrdup in CAPI implementation
I haven't investigated much, but valgrind is complaining about some non-null-terminated strings coming out from WKBWriter::writeHEX. I guess it _might_ be expected, given writeHEX takes a size_t output parameter, but wanted to make sure this is the case. I find it pretty useless for an HEX-returning function to skip null-termination (let alone return by unsigned char*). But this is another story. So, question is: are gstrdup and gstrdup_s functions in geos_ts.cpp intended to include or not a null termination ? Note that gstrdup_s takes a size but reads one more byte from input pointer: char* gstrdup_s(const char* str, const std::size_t size) { char* out = static_cast(std::malloc(size + 1)); if (0 != out) { // as no strlen call necessary, memcpy may be faster than strcpy std::memcpy(out, str, size + 1); ^ HERE ^ } assert(0 != out); return out; } --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] TopologyException: found non-noded intersection
On Tue, Jun 22, 2010 at 08:52:30AM -0700, Martin Davis wrote: > Also, there was a bug uncovered recently in JTS which has the effect of > not performing some robustness improvement steps during CascadedUnion. > It's a simple fix, so perhaps someone (strk?) will be able to implement A ticket with an attached testcase would help going there. Fundings would even get it done within a reasonable amount of time :) --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Re: [geos-commits] r3046 - trunk/src/geom
Alright, convinced. Thanks for the review. r3060 has them back unchecked, with checks moved at PHP level. --strk; On Mon, Jun 21, 2010 at 01:23:08PM +0200, Maxime van Noppen wrote: > On 06/21/2010 11:22 AM, strk wrote: > > Not really. > > You're right about additional cost, but I dubt it'll really > > be noticeable. Have some profiles ? > > Not directly on geos but testing the same scenario against a trivial > example (attached) gives these results on gcc 4.4.3 : > > $ g++ -O0 -o bench bench.cc && ./bench > elapsed: 00:00:24.000799 > elapsed: 00:00:27.809378 > diff: 00:00:03.808579 > added cost: 15.8686% > > $ g++ -O2 -o bench bench.cc && ./bench > elapsed: 00:00:13.456086 > elapsed: 00:00:14.927550 > diff: 00:00:01.471464 > added cost: 10.9353% > > $ g++ -O3 -o bench bench.cc && ./bench > elapsed: 00:00:01.757662 > elapsed: 00:00:02.050734 > diff: 00:00:00.293072 > added cost: 16.674% > > > First 'elapsed' is an unsafe access, second is the same access protected > by an if(). > > It is clearly noticeable in any optimization level. > > > We could move the checks in higher level APIs and > > leave internals alone. Note that the C-API says it'd return > > 0 on exception. Isn't asking for an non-existant child > > an exceptional request ? Should the C-API functions check ? > > It is indeed an exceptional request and this is why I find that paying > the cost of this additional safety for exceptional cases is too much. > These methods are typically used in loop-intensive contexts. > > Furthermore, they add no safety when used in loops such as : > > for(std::size_t i = 0; i < geom->getNumGeometries(); ++i) > // ...geom->getGeometryN(i)... > > Having a safe and slow API is fine, std::vector has one, but not having > an unsafe bust fast API is bad for those who care about performance. > These functions are quite fundamental and broadly used in geos, this is > going to slow down everything a bit. > > As I don't use the C-API I don't know if it should do the test or not. > I'd say that there should also be two functions, unsafe & fast and safe > & slow. By the way, a lot of C code has the 'unsafe & fast' behaviour. > Typically the libc : str{len,cpy,...} functions will segfault if they > are given invalid arguments (NULL pointers, ...). So a C developer > should be used to functions that fail when given invalid arguments. > > -- > Maxime > ___ > geos-devel mailing list > geos-devel@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/geos-devel -- () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Re: [geos-commits] r3046 - trunk/src/geom
On Mon, Jun 21, 2010 at 09:32:50AM +0200, Maxime van Noppen wrote: > On 06/21/2010 02:53 AM, svn_g...@osgeo.org wrote: > > Modified: > >trunk/src/geom/GeometryCollection.cpp > > Log: > > Geometry::getGeometryN is an API function, so make it safe/checked > > Is there a guideline on such topics ? Not really. You're right about additional cost, but I dubt it'll really be noticeable. Have some profiles ? We could move the checks in higher level APIs and leave internals alone. Note that the C-API says it'd return 0 on exception. Isn't asking for an non-existant child an exceptional request ? Should the C-API functions check ? The ones I changed are: GeometryCollection::getGeometryN LineString::getPointN Polygon::getInteriorRingN Note that LineString::getStartPoint and ::getEndPoint already check for being empty. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] Polygonizer bug ?
Martin, I'm adding a testcase for the Polygonizer using example from : "JTS Developer's Guide, Chapter 6 - Polygonization" Here's the input, represented as a collection: GEOMETRYCOLLECTION( LINESTRING(0 0, 10 10), LINESTRING(185 221, 100 100), LINESTRING(185 221, 88 275, 180 316), LINESTRING(185 221, 292 281, 180 316), LINESTRING(189 98, 83 187, 185 221), LINESTRING(189 98, 325 168, 185 221)) ) When passing it into the Polygonizer class I get 2 rings, no cut or invalid edges and 3 dangles. Also notable is that of the 3 dangles, 2 are identical and specificall are the isolated edge (first geometry in the collection). The example in the guide suggests the rings should be 3 instead, and that there should be one cut edge (represented in blue) and 2 dangles the red ones. Does it sound as a bug in GEOS or does JTS give the same results ? Note that forcing proper noding using the union trick does give the 3 expected rings, but still lacks the cut edge and duplicates the dangle. Thanks in advance. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] linearref::LinearIterator segfaults
Doing tests for the PHP biding I found a segfault when using the C-API GEOSProject method against something which is not a lineal geometry. This goes down to linearref::LinearIterator assuming the input is a lineal geometry w/out checking. The bug goes deep into JTS as well, where you don't get a segfault but do a wrong assumption here: private void loadCurrentLine() { if (componentIndex >= numLines) { currentLine = null; return; } currentLine = (LineString) linear.getGeometryN(componentIndex); } That is, there's no code checking that 'linear' is a LINESTRING or MULTILINESTRING: public LinearIterator(Geometry linear, int componentIndex, int vertexIndex) { this.linear = linear; numLines = linear.getNumGeometries(); this.componentIndex = componentIndex; this.vertexIndex = vertexIndex; loadCurrentLine(); } I'd throw an IllegalArgumentException from the constructor, if geom is not LINEAL. Will do this in GEOS trunk, but wanted to signal JTS too... --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] PHP bindings
On Fri, Jun 18, 2010 at 06:53:19PM +0200, strk wrote: > On Fri, Jun 18, 2010 at 06:41:47PM +0200, strk wrote: > > So, current trunk as a -std=gnu99 added to CFLAGS > > when building the PHP bindings and was tested to > > work on OpenSUSE 11.1 and Ubuntu 8.10 with gcc-4.3.2 > > (-std=c99 didn't work on the Ubuntu box). > > FYI: also tested successfully on > Debian 4.0 with: > gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] Another success on Snow Leopard 10.6.3 with i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5659 --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] PHP bindings
On Fri, Jun 18, 2010 at 06:41:47PM +0200, strk wrote: > So, current trunk as a -std=gnu99 added to CFLAGS > when building the PHP bindings and was tested to > work on OpenSUSE 11.1 and Ubuntu 8.10 with gcc-4.3.2 > (-std=c99 didn't work on the Ubuntu box). FYI: also tested successfully on Debian 4.0 with: gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] --strk; > > If anyone feels like testing on other systems these > are the steps: > > 0: svn up > 1: make sure you have php5 dev files > installed (for debian-based: apt-get install php5-dev) > 2: ./autogen.sh && ./configure --enable-php > 3: make > 4: make check (bonus) > > Bonus step 4 you may want to run under php/ dir only. > If you get lots of errors in step 3 that's likely Zend > interaction with -ansi, which is what I'm trying to > fix in a general way. > > --strk; > > On Fri, Jun 18, 2010 at 11:26:35AM +0200, strk wrote: > > I've started hand-crafting PHP bindings for the GEOS C-API. > > Currently in the process of merging into trunk for proper > > build scripts. > > > > One obstacle I found is that -ansi, which is added to > > CFLAGS by ./configure, won't accept Zend (PHP engine) > > headers, so that switch must be removed when building > > the PHP module. > > > > Does anyone know how to override the cflags for just > > one dir ? Or ideally, only drop the -ansi switch ? > > > > Here's the relevant annotation from configure.in: > > > > 2533mloskot AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -ansi], > > [dum > > my_cv_ansi], [-ansi], [], [WARNFLAGS="$WARNFLAGS -ansi"], []) > > > > --strk; > > > > () Free GIS & Flash consultant/developer > > /\ http://strk.keybit.net/services.html > > ___ > > geos-devel mailing list > > geos-devel@lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/geos-devel > > -- > > () Free GIS & Flash consultant/developer > /\ http://strk.keybit.net/services.html > ___ > geos-devel mailing list > geos-devel@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/geos-devel -- () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] PHP bindings
So, current trunk as a -std=gnu99 added to CFLAGS when building the PHP bindings and was tested to work on OpenSUSE 11.1 and Ubuntu 8.10 with gcc-4.3.2 (-std=c99 didn't work on the Ubuntu box). If anyone feels like testing on other systems these are the steps: 0: svn up 1: make sure you have php5 dev files installed (for debian-based: apt-get install php5-dev) 2: ./autogen.sh && ./configure --enable-php 3: make 4: make check (bonus) Bonus step 4 you may want to run under php/ dir only. If you get lots of errors in step 3 that's likely Zend interaction with -ansi, which is what I'm trying to fix in a general way. --strk; On Fri, Jun 18, 2010 at 11:26:35AM +0200, strk wrote: > I've started hand-crafting PHP bindings for the GEOS C-API. > Currently in the process of merging into trunk for proper > build scripts. > > One obstacle I found is that -ansi, which is added to > CFLAGS by ./configure, won't accept Zend (PHP engine) > headers, so that switch must be removed when building > the PHP module. > > Does anyone know how to override the cflags for just > one dir ? Or ideally, only drop the -ansi switch ? > > Here's the relevant annotation from configure.in: > > 2533mloskot AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -ansi], > [dum > my_cv_ansi], [-ansi], [], [WARNFLAGS="$WARNFLAGS -ansi"], []) > > --strk; > > () Free GIS & Flash consultant/developer > /\ http://strk.keybit.net/services.html > ___ > geos-devel mailing list > geos-devel@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/geos-devel -- () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] Online doxygen docs
I was looking for info about WKTWriter::setTrim but haven't found it on http://download.osgeo.org/geos/doxygen/ Who's in charge for updating that page ? Can we track both latest release and trunk ? --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] C/C++ Standards, switches ordering
Alright, as of r3006 AM_ is used. This means that you can finally override the CFLAGS yourself w/out loosing the important ones (-ffloat-store, -DGEOS_INLINE, -DNDEBUG). The first one is mandatory, the second two are controlled trough ./configure switches (--disable-inline, --disable-cassert) But also you won't loose the -pedantic -Wall -ansi -Wno-long-long, which might be not what we want (ie: how does a user asks for a build w/out those flags ? -no-flag ?). I kindly ask anyone to test their build with their existing configure scripts to catch any problem with the current setup. --strk; On Fri, Jun 18, 2010 at 11:59:04AM +0200, strk wrote: > So, -ansi is equivalent to -std=c89 > Using -std=c99 works fine. > > Now, the problem is that GEOS's ./configure script > is setting CFLAGS, which it shouldn't. > CFLAGS is always added last as it is considered > the user-defined one. > > Doing so (as we do) will drop our own flags when > user specifies others (I think, to be tested). > > Instead, configure is fine to set 'AM_' variables > which are used to replace whatever_CFLAGS when they > are not needed, and to properly position $(AM_xxx) > when in need for overrides. > > Currently, only CAPI and SWIG dirs do use overrides > of whatever_CFLAGS. > > I'll see how to sort this all out. > > --strk; > > On Fri, Jun 18, 2010 at 11:26:35AM +0200, strk wrote: > > I've started hand-crafting PHP bindings for the GEOS C-API. > > Currently in the process of merging into trunk for proper > > build scripts. > > > > One obstacle I found is that -ansi, which is added to > > CFLAGS by ./configure, won't accept Zend (PHP engine) > > headers, so that switch must be removed when building > > the PHP module. > > > > Does anyone know how to override the cflags for just > > one dir ? Or ideally, only drop the -ansi switch ? > > > > Here's the relevant annotation from configure.in: > > > > 2533mloskot AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -ansi], > > [dum > > my_cv_ansi], [-ansi], [], [WARNFLAGS="$WARNFLAGS -ansi"], []) > > > > --strk; > > > > () Free GIS & Flash consultant/developer > > /\ http://strk.keybit.net/services.html > > -- > > () Free GIS & Flash consultant/developer > /\ http://strk.keybit.net/services.html > ___ > geos-devel mailing list > geos-devel@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/geos-devel -- () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] C/C++ Standards, switches ordering
So, -ansi is equivalent to -std=c89 Using -std=c99 works fine. Now, the problem is that GEOS's ./configure script is setting CFLAGS, which it shouldn't. CFLAGS is always added last as it is considered the user-defined one. Doing so (as we do) will drop our own flags when user specifies others (I think, to be tested). Instead, configure is fine to set 'AM_' variables which are used to replace whatever_CFLAGS when they are not needed, and to properly position $(AM_xxx) when in need for overrides. Currently, only CAPI and SWIG dirs do use overrides of whatever_CFLAGS. I'll see how to sort this all out. --strk; On Fri, Jun 18, 2010 at 11:26:35AM +0200, strk wrote: > I've started hand-crafting PHP bindings for the GEOS C-API. > Currently in the process of merging into trunk for proper > build scripts. > > One obstacle I found is that -ansi, which is added to > CFLAGS by ./configure, won't accept Zend (PHP engine) > headers, so that switch must be removed when building > the PHP module. > > Does anyone know how to override the cflags for just > one dir ? Or ideally, only drop the -ansi switch ? > > Here's the relevant annotation from configure.in: > > 2533mloskot AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -ansi], > [dum > my_cv_ansi], [-ansi], [], [WARNFLAGS="$WARNFLAGS -ansi"], []) > > --strk; > > () Free GIS & Flash consultant/developer > /\ http://strk.keybit.net/services.html -- () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] PHP bindings
I've started hand-crafting PHP bindings for the GEOS C-API. Currently in the process of merging into trunk for proper build scripts. One obstacle I found is that -ansi, which is added to CFLAGS by ./configure, won't accept Zend (PHP engine) headers, so that switch must be removed when building the PHP module. Does anyone know how to override the cflags for just one dir ? Or ideally, only drop the -ansi switch ? Here's the relevant annotation from configure.in: 2533mloskot AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -ansi], [dum my_cv_ansi], [-ansi], [], [WARNFLAGS="$WARNFLAGS -ansi"], []) --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] PHP bindings anyone ?
On Wed, Jun 16, 2010 at 11:48:33AM +0100, Mateusz Loskot wrote: > On 16/06/10 09:21, strk wrote: > >On Wed, Jun 16, 2010 at 09:53:00AM +0200, Sean Gillies wrote: > > > >>Are there any libffi (used by ctypes) intefaces for PHP? If so, I'd > >>recommend giving that a try. > > > >Found this: http://pecl.php.net/package/ffi > >Last release (0.3-alpha) is from 2004 :! > > Sandro, > > You may find this interesting: > > http://wiki.github.com/moriyoshi/boost.php/ Promising indeed. But at first glance it must be requiring a too new version of boost (running make failed). For now I started a direct Zend implementation. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] PHP bindings anyone ?
On Wed, Jun 16, 2010 at 09:53:00AM +0200, Sean Gillies wrote: > Are there any libffi (used by ctypes) intefaces for PHP? If so, I'd > recommend giving that a try. Found this: http://pecl.php.net/package/ffi Last release (0.3-alpha) is from 2004 :! --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] PHP bindings anyone ?
I'm plaing with drupal recently and be wondering if the SWIG binding for GEOS are still in use by anyone or not. In particular, I think Shapely and GeoDjango are using a direct interface rather than swig, right ? Is anyone else interested in a PHP binding for GEOS ? --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Missing const on Geometry::isWithinDistance
On Fri, Jun 11, 2010 at 11:15:51AM +0200, Maxime van Noppen wrote: > It seems that the method Geometry::isWithinDistance is const while not > flagged as such. Could it be possible to make it const ? Do you mind filing a bug for this ? http://trac.osgeo.org/geos Thank you . --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] getCoordinateDimension() - ticket 311
On Wed, May 26, 2010 at 09:08:24AM -0700, Martin Davis wrote: > getDimension follows the OGC spec. Seems to me it's better to simply > change it to match the spec and the C++ API. This was clearly a bug in > the first place, no? It was, yes. I'm just being extra-nice to exclude any possibility of backward compatibility, but I've to admit the probability of people using that function is very low. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] getCoordinateDimension() - ticket 311
On Tue, May 25, 2010 at 09:27:16PM -0400, Frank Warmerdam wrote: > I think we will have to change the values returned by the C API getDimension > function to match C++ even though this introduces a modest risk of problems > for applications using the undocumented current behavior. What's the problem with deprecating it and use a new, more explicit name ? GEOSGeom_getSpatialDimension() maybe ? Note that there are other functions which I think should be deprecated so getDimension won't feel alone (the setOrdinate/getOrdinate ones in particular, as they use 1-based index and in an undocumented way). --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] getCoordinateDimension() - ticket 311
On Tue, May 25, 2010 at 01:56:25PM -0700, Martin Davis wrote: > Maybe strk is right, and this should be changed to an enum. Perhaps the > enum could be defined as > > XY = 2 > XYZ = 3 > XYZM = 4 > XYM = 5 ? My enum suggestion was for the spatial dimension, not coordinate dimension. PUNTUAL/LINEAL/AREAL kind of enum. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] WKT / WKB Writer Output Dimension
On Wed, May 26, 2010 at 12:41:53AM -0400, Frank Warmerdam wrote: > Note that I'll default to writing the new syntax. I'm not sure if I > will support writing the old syntax or not via a flag. If current WKTWriter didn't output old syntax it makes perfectly sense to start the support with new syntax. Keep up the good work ! --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Dimension and Coordinate Sequences
On Tue, May 18, 2010 at 03:38:57PM -0400, Frank Warmerdam wrote: > Rather than ask for permission, I've just gone ahead and applied the > changes. Good job. Free Software is ... never ask for permissions ! > Future directions might include preserve dimension carefully through > geometry > operations, and having the WKT and WKB Writer classes produce output based > on the dimension of the geometry. Note that empty geometries will have NO CoordinateSequence associated, which means you won't be able to get their coordinate dimension from there... > I haven't checked WKBWriter, but > WKTWriter > is (annoyingly) only supporting 3D output based on a build time choice, > rather > than dynamically based on the input geometry. WKTWriter should accept number of dimensions in the constructor, following JTS design. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Dimension and Coordinate Sequences
On Mon, May 17, 2010 at 12:39:15PM -0400, Frank Warmerdam wrote: > At this time I'm not going to try and address M, nor to start going into > the algorithms and making them dimension aware. M will be much harder indeed. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Dimension and Coordinate Sequences
On Mon, May 17, 2010 at 11:42:34AM -0400, Frank Warmerdam wrote: > Is this a good time for me to take a crack at implementing dimension > support? I see the dimension potentially makes it as far as the > CoordinateArraySequenceFactory, but that CoordinateArraySequence has > nothing to keep track of it. I could add it as a private member and > ensure it is passed in by the factory. Sure, you may try that. Only, I highly dubt any computation will check dimension of input(s) and use that to dimension the output. I belive neither JTS will do that, is that correct Martin ? --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Dimension and Coordinate Sequences
On Mon, May 17, 2010 at 11:25:56AM -0400, Frank Warmerdam wrote: > Folks, > > I am creating a GEOS Point from 2D WKB input, then fetching back the > CoordinateSequence and interogating it's dimension. I get "3". > > Looking through the code there does not seem to be a real effort to preserve > dimension for coordinate sequences, at least with the > CoordinateArraySequence > implementation. Is this intentional? The interface was added to later make a real effort, but none is made at this time indeed. When non-empty you could check for IsNan(Z) but when empty you can't tell.. > As the Z coordinate is NaN I'll try and adapt my code to watch for that as > a clue to dimension but it is not entirely clear to me why dimension is not > currently preserved. PostGIS extracts dimension from postgis format, then converts, does the thing and converts back to same dimension of input. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] [GEOS] #343: After applying a buffer over a multiline the library starts growing in memory usage and hungs
On Fri, May 14, 2010 at 03:05:29PM -0700, Martin Davis wrote: > Yes, that would be very interesting. Does GGL provide polygon union now? Seems so: http://geometrylibrary.geodan.nl/group__union.html --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] [GEOS] #343: After applying a buffer over a multiline the library starts growing in memory usage and hungs
On Fri, May 14, 2010 at 02:28:39PM -0700, Martin Davis wrote: > Interesting that GEOS seems to have caught up to JTS in terms of > performance. I seem to remember it used to be slower. (But it's not > really any faster, either, in spite of all that C goodness! 8^) That's the price to pay for "closely tracking JTS" :> Would be interesting to see how GGL deals with this dataset (the union part). --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] [GEOS] #343: After applying a buffer over a multiline the library starts growing in memory usage and hungs
On Fri, May 14, 2010 at 11:35:45AM -0700, Martin Davis wrote: > Ok, I tried the roads_broken geometry in JTS using the buffer-and-union > approach. The result matches the one you posted, strk. > > Time was 2.7 s. So the two systems are pretty close. > > It would be interesting if you tried the other geometry as well. Done, but on another (older) machine: Intel(R) Pentium(R) 4 CPU 2.66GHz bogomips: 5333.43 Input points: 11502 Input components: 5615 Output points: 417 $ time psql -c ' select st_npoints(st_union(st_buffer(geom, 0.005))) from ( select (st_dump(g)).geom from bug ) as foo; ' real1m9.838s user0m0.100s sys 0m0.028s Memory is fine, CPU is pretty much fixed at 100%. Interesting enough the buffer itself is pretty quick: $ time psql -c ' select sum(st_npoints(st_buffer(geom, 0.005))) from ( select (st_dump(g)).geom from bug ) as foo;' real0m3.170s user0m0.108s sys 0m0.024s --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] [GEOS] #343: After applying a buffer over a multiline the library starts growing in memory usage and hungs
On Fri, May 14, 2010 at 09:11:30AM -0700, Martin Davis wrote: > I'm surprise that PostGIS is so much faster too! Can you supply the > output, so I can check it against JTS? > > One thing I notice is that the input I'm using has 5615 elements and > 11502 points. The input I'm using is this: http://trac.osgeo.org/geos/attachment/ticket/344/roads_broken_geom.txt.gz The output I have with it is attached. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html out.txt.gz Description: application/gunzip ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] [GEOS] #343: After applying a buffer over a multiline the library starts growing in memory usage and hungs
On Fri, May 14, 2010 at 03:09:40PM +0200, strk wrote: > On Thu, May 13, 2010 at 09:22:49AM -0700, Martin Davis wrote: > > Just tried the buffer-and-union approach in JTS. It works fine - about > > 70 s for the union, less for the initial buffering. Memory usage was low. > > I tried buffer-and-union approach in PostGIS. > It was very fast ! > > Some stats: > > - Original geometry is a MULTILINESTRING with 3272 components > - Average number of points per component: 3.3 (from 2 to 93) > - Total number of points: 10677 > > Postgis operations with timing: > > $ time psql -c 'create table bug_dump2 as select (st_dump(g)).* from bug;' > real0m0.330s > user0m0.032s > sys 0m0.012s > > $ time psql strk -c 'update bug_dump2 set geom = st_buffer(geom, 0.005)'; > UPDATE 3272 > real0m0.463s > user0m0.040s > sys 0m0.008s > > $ time psql strk -Ac 'select st_npoints(st_union(geom)) from bug_dump2'; > st_npoints: 1336 > real0m1.181s > user0m0.040s > sys 0m0.008s > > This is postgis trunk (to be 2.0.0) with GEOS trunk (to be 3.3.0). > > I'm surprised it takes 70 seconds with JTS. Am I doing anything wrong here ? Note that postgis uses the cascaded union... --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] [GEOS] #343: After applying a buffer over a multiline the library starts growing in memory usage and hungs
On Thu, May 13, 2010 at 09:22:49AM -0700, Martin Davis wrote: > Just tried the buffer-and-union approach in JTS. It works fine - about > 70 s for the union, less for the initial buffering. Memory usage was low. I tried buffer-and-union approach in PostGIS. It was very fast ! Some stats: - Original geometry is a MULTILINESTRING with 3272 components - Average number of points per component: 3.3 (from 2 to 93) - Total number of points: 10677 Postgis operations with timing: $ time psql -c 'create table bug_dump2 as select (st_dump(g)).* from bug;' real0m0.330s user0m0.032s sys 0m0.012s $ time psql strk -c 'update bug_dump2 set geom = st_buffer(geom, 0.005)'; UPDATE 3272 real0m0.463s user0m0.040s sys 0m0.008s $ time psql strk -Ac 'select st_npoints(st_union(geom)) from bug_dump2'; st_npoints: 1336 real0m1.181s user0m0.040s sys 0m0.008s This is postgis trunk (to be 2.0.0) with GEOS trunk (to be 3.3.0). I'm surprised it takes 70 seconds with JTS. Am I doing anything wrong here ? --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Applications using GEOS
On Mon, May 10, 2010 at 09:09:33AM -0700, Martin Davis wrote: > There's a few more listed here: > > http://tsusiatsoftware.net/jts/jts-links.html#systems Thanks, page updated. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] Applications using GEOS
I've started a wiki page to list applications using GEOS: http://trac.osgeo.org/geos/wiki/Applications Surely some are missing, can you find them ? Thanks. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [postgis-devel] [geos-devel] initGEOS semantic ?
On Sat, Apr 17, 2010 at 09:19:55PM -0700, Paul Ramsey wrote: > In running make check in 3.2 branch, compile fails thus: > > make[3]: *** No rule to make target `capi/GEOSGetCentroidTest.cpp', > needed by `GEOSGetCentroidTest.o'. Stop. > make[2]: *** [check-am] Error 2 > > Missing rule not committed? Oops, actually I committed too much (the Makefile.am was really just a test). Anyway, since we're at it I did now commit GEOSGetCentroidTest.cpp which doesn't test much but could be used as a starting point to add actual tests for it... Thanks for finding this, ready as r2978. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [postgis-devel] [geos-devel] initGEOS semantic ?
On Sat, Apr 17, 2010 at 10:46:51AM -0700, Paul Ramsey wrote: > Yes, indeed. This could also be the source of a leak reported a couple > weeks ago in the otherwise boring centroid function... Ready for test in r2975. Mat, could you add your changes in the NEWS file too please ? --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [postgis-devel] [geos-devel] initGEOS semantic ?
As of GEOS r2974 initGEOS works back as it did in 3.0.0, that is it will not allocate new memory. To give you a figure, calling 'SELECT ST_IsValid(geom) from myTable;' where myTable contains 120044 geometries resulted in +4Mb of memory leaking: definitely lost: 4,801,698 bytes in 120,040 blocks. With the new commit that figure goes down to a constant 298 bytes. Might be worth a 3.2.2... --strk; On Sat, Apr 17, 2010 at 02:14:59PM +0200, strk wrote: > For the record, I verified that up to 3.0.0 > the semantic was indeed NOT to allocate any new > structures, see: > > http://trac.osgeo.org/geos/browser/branches/3.0/capi/geos_c.cpp > > Thus I think we should go back there. > > --strk; > > > On Sat, Apr 17, 2010 at 01:22:22PM +0200, strk wrote: > > I tought initGEOS() [ the non-rehentrant version ] > > was always returning the same handle, a singleton. > > > > Code reveals that's not the case, which means > > old clients (like postgis) end up allocating > > lots of contexts and leat them leak. > > > > So, is there any reason not to return a singleton ? ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] initGEOS semantic ?
For the record, I verified that up to 3.0.0 the semantic was indeed NOT to allocate any new structures, see: http://trac.osgeo.org/geos/browser/branches/3.0/capi/geos_c.cpp Thus I think we should go back there. --strk; On Sat, Apr 17, 2010 at 01:22:22PM +0200, strk wrote: > I tought initGEOS() [ the non-rehentrant version ] > was always returning the same handle, a singleton. > > Code reveals that's not the case, which means > old clients (like postgis) end up allocating > lots of contexts and leat them leak. > > So, is there any reason not to return a singleton ? > > --strk; > > () Free GIS & Flash consultant/developer > /\ http://strk.keybit.net/services.html > ___ > geos-devel mailing list > geos-devel@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/geos-devel -- () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] initGEOS semantic ?
I tought initGEOS() [ the non-rehentrant version ] was always returning the same handle, a singleton. Code reveals that's not the case, which means old clients (like postgis) end up allocating lots of contexts and leat them leak. So, is there any reason not to return a singleton ? --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Motion: Add Paul Ramsey as PSC Member
On Wed, Apr 07, 2010 at 08:14:02AM -0500, Howard Butler wrote: > PSC Members, > > I would like to add Paul Ramsey to the PSC, subject to his acceptance of RFC > 2 (which he wrote ;). His history with the project is well known, and now > that he's more deeply in the technical realm, it makes sense to have him on > the PSC. > > +1 +1 (self-promoting as having voting powers, having bureucracy failed [1]) [1] http://lists.osgeo.org/pipermail/geos-devel/2008-November/003747.html --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Fwd: [GENERAL] Large index operation crashes postgres
On Mon, Mar 29, 2010 at 10:29:06AM -0700, Paul Ramsey wrote: > Can anyone valgrind the capi centroid call on a 2-point linestring and > see if it leaks? It seems like it might... Tried this: LINESTRING(0 0, 10 0) No leaks in C-API from 3.2 branch What's the one exposing the bug ? --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] 3.2.1 tagged
3.2.1 was tagged (r2964 is the good one) svn co http://svn.osgeo.org/geos/tags/3.2.1 Does anyone want to test before uploading ? Will anyone upload or should I ? --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] Re: Call for geos 3.2.1
On Fri, Mar 19, 2010 at 07:19:11PM +0100, strk wrote: > I've been thinking a 3.2.1 is deserved > for the GEOSisValid bug. > > If anyone has other bugfixes they are > welcome in the 3.2 branch. One week as gone under silence. I'll tag tomorrow unless anyone screams. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel