[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 reply+i-2343458-1cdc8d98222d899aaee0dec2f2f850335f50-289...@reply.github.com - Date: Thu, 24 Nov 2011 09:07:04 -0800 From: Kashif Rasul reply+i-2343458-1cdc8d98222d899aaee0dec2f2f850335f50-289...@reply.github.com To: strk s...@keybit.net Subject: [geos] Fix to enable ruby bindings with ruby 1.9.3 (#5) List-Id: geos.strk.github.com 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 s...@keybit.net 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 Geometry} subclasses which * are 1
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 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.netforum_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 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 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] 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] 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] 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
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
[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: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 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: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
[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 IDEhttp://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 cstdlib 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] 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] 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] 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=value optimized out, geom=value optimized out) 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] 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
[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
[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
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
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] 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
[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 Im 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] 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 Im 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
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
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 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 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
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 s...@keybit.net: 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 gioha...@gmail.com: 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 gioha...@gmail.com: 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 s...@keybit.net: 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] 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
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 gioha...@gmail.com: Actually this selection works. We're selecting more precisely the geometries that give problems. giovanni 2010/6/25 strk s...@keybit.net: 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: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
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
[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
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
[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_castchar*(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] 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
[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
[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] 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] 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] 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
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
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 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] 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] 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] 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] 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] [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] [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 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 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 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] 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 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: [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
Re: [geos-devel] Re: [GEOS] #334: README file could be a bit more modern and consistent
On Sat, Mar 06, 2010 at 02:04:35AM -, GEOS wrote: #334: README file could be a bit more modern and consistent [...] Comment (by mwtoews): Replying to [comment:1 mloskot]: There are Wiki pages explaining build procedure Wikis are fine for the long detailed procedures, but the purpose of the README file is to quickly look up the procedure without needing to start up a web browser and navigate to the web page. A README file is the first place I look after uncompressing source code, since it tells me what to do next. +1 -- 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] Problems compiling nightly snapshot
On Wed, Mar 03, 2010 at 11:20:34AM +0100, Paul Meems wrote: What is the best approach the get the latest version? svn checkout http://svn.osgeo.org/geos/trunk --strk; Share. It's fair. http://iwouldntsteal.net ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] deprecate non-thread-safe CAPI interfaces
On Wed, Feb 10, 2010 at 09:42:56PM -0600, Howard Butler wrote: On Feb 10, 2010, at 5:26 PM, strk wrote: I'd like to deprecate non-thread-safe version of CAPI interface in next release, and stop providing them for new methods. If anyone sees a reason not to do that please scream before it's too late (you've plenty of time). The proposal would be to stop providing new methods and method updates for the non-thread-safe API, correct? What I mean is that when *new* interfaces are added, only the version taking GEOSContextHandler would be provided. And (I meant) all other ones not taking that handler would be marked with deprecated attribute so warnings come out at build time (only for GCC I know how..). Can still wait for the second part (deprecation), but I think it makes sense for the first part (stop *adding* the bare ones). --strk; () Free GIS Flash consultant/developer /\ http://foo.keybit.net/~strk/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] What do GEOSSymDifference and GEOSIntersection (CAPI) do?
On Wed, Feb 10, 2010 at 12:00:31PM +0100, Roger Bivand wrote: I've tried to go through GEOSPolygonize() to put the MULTILINESTRING together again, and am analysing what has happened, but think that the output has lost hole attributions, so needs running through GEOSContains or similar. Oh, if your goal is building an area you may consider moving the algorithm implemented by PostGIS's ST_BuildArea code down into the C-API (from the postgis geos wrapper). I belive it would be useful in general... --strk; () Free GIS Flash consultant/developer /\ http://foo.keybit.net/~strk/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Re: cmake: distclean-like ? out of source tree build ?
On Sat, Feb 06, 2010 at 09:13:46PM +, Mateusz Loskot wrote: Mateusz Loskot wrote: mlos...@dog:~/dev/geos/_svn/trunk$ svn-clean By the way, if you are suspicious about some remaining garbage in the source tree, just run svn-clean and confirm you have trunk up-to-date with nothing reported by svn status. svn-clean doesn't seem to be part of 'svn' package, do you confirm ? On an OpenSUSE I'm prompted to install kde-related things ?! The program 'svn-clean' can be found in following packages: * kdesdk3 [ path: /opt/kde3/bin/svn-clean, repository: zypp (ARKANIS_openSUSE_11.1_1) ] * kdesdk4-scripts [ path: /usr/bin/svn-clean, repository: zypp (ARKANIS_openSUSE_11.1_1) ] Try installing with: sudo zypper install kdesdk3 --strk; () Free GIS Flash consultant/developer /\ http://foo.keybit.net/~strk/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] deprecate non-thread-safe CAPI interfaces
I'd like to deprecate non-thread-safe version of CAPI interface in next release, and stop providing them for new methods. If anyone sees a reason not to do that please scream before it's too late (you've plenty of time). --strk; () Free GIS Flash consultant/developer /\ http://foo.keybit.net/~strk/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] cmake: distclean-like ? out of source tree build ?
Mat, is there a 'cleanup' command for cmake-prepared build trees ? I start to suspect my source tree was 'infected' by cmake things :) Like: build$ cmake ../trunk # does things but *build* dir is empty build$ cd ../trunk trunk$ cmake . make ... CMakeFiles/geos_unit.dir/geostest2.cpp.o: In function `main': /usr/src/geos/trunk/tests/unit/geostest2.cpp:56: multiple definition of `main' CMakeFiles/geos_unit.dir/geos_unit.cpp.o:/usr/src/geos/trunk/tests/unit/geos_unit.cpp:56: first defined here Didn't you fix the last error ? (which is what makes me think there might be something old around). --strk; () Free GIS Flash consultant/developer /\ http://foo.keybit.net/~strk/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] Unary Union (was: rgeos interface to R classes)
On Mon, Feb 01, 2010 at 09:48:57AM -0800, Martin Davis wrote: The technique of using buffer(0) to union polygons is now deprecated in favour of using Unary Union (Geometry.union() - not sure what the exact GEOS signature is). Unary Union is usually faster and more robust than the previous technique. You might want to check this out. Uhm, I might have missed this in my last port (either completely or just the outer interface). Is the JTS repository finally landed so to take a look ? I'm interested in evaluating its use for geometry cleanup purposes (http://trac.osgeo.org/postgis/ticket/399) --strk; () Free GIS Flash consultant/developer /\ http://foo.keybit.net/~strk/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] cmake: geos-config
cmake based installation results in a broken geos-config script. geos-config --ldflags, which is used by postgis, returns '-L'. --strk; () Free GIS Flash consultant/developer /\ http://foo.keybit.net/~strk/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] cmake build on ubuntu-8.04
Ubuntu 8.04 cmake build attempt: $ cmake ../trunk CMake Error at CMakeLists.txt:220 (if): if had incorrect arguments: ${CMAKE_VERSION} VERSION_LESS 2.8.0 (Unknown arguments specified). ... $ cmake --version cmake version 2.6-patch 0 What's the min version supported ? --strk; () Free GIS Flash consultant/developer /\ http://foo.keybit.net/~strk/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] Quick cmake/autotools comparison on OpenSUSE
FYI. Only 'make' was timed, no ./configure nor cmake runs. cat cmake/TIMING real7m18.909s user6m11.319s sys 0m42.419s cat autotools/TIMING time make - real7m58.631s user7m1.418s sys 0m43.067s --strk; () Free GIS Flash consultant/developer /\ http://foo.keybit.net/~strk/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] cmake does not recognize sub-command RENAME
GEOS revision 2893. CMake Error at CMakeLists.txt:204 (file): file does not recognize sub-command RENAME cmake version 2.6-patch 0 --strk; () Free GIS Flash consultant/developer /\ http://foo.keybit.net/~strk/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Build and install instructions
On Wed, Jan 27, 2010 at 11:52:47PM +, Mateusz Loskot wrote: Hi, I reorganised the Build and Install instructions a bit: http://trac.osgeo.org/geos/wiki#BuildandInstall Please, update if anything is missing or buggy. May I ask for 'make check' rather than 'make test' for the Test TODO item ? 'check' is a GNU standard rule. --strk; () Free GIS Flash consultant/developer /\ http://foo.keybit.net/~strk/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] [#317] Build configuration for CMake build system
On Wed, Jan 20, 2010 at 11:05:40PM +, Mateusz Loskot wrote: strk wrote: /usr/src/geos/cmake_build/include/geos/platform.h:147:3: error: #error Could not find finite or isfinite function or macro! make[2]: *** [src/CMakeFiles/geos.dir/algorithm/distance/DiscreteHausdorffDistance.cpp.o] Error 1 make[1]: *** [src/CMakeFiles/geos.dir/all] Error 2 Yes, I was playing with the platform.h a bit and then I was gradually fixing this kind of issues about missing isnan or isfinite on various systems. So, something may be still not working well on some environments. However, remember to remove old versions of platform.h if you have any, for instance generated by autoconf build in trunk/include/geos. It may cause problems. No platform.h in source tree. The platform.h in build tree is created by cmake from platform.h.cmake (I double-checked by removing and running cmake again) --strk; () Free GIS Flash consultant/developer /\ http://foo.keybit.net/~strk/services.html ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Missing file in Makefile.vc
On Tue, Dec 15, 2009 at 01:04:11PM -0500, Glenn Waldron wrote: I wish I'd caught this before the 3.2 release, but geom/CoordinateSequenceFactory is missing from source/Makefile.vc. The fixed makefile.vc is attached. Glen, was this applied ? If not, could you put it on trac ? --strk; Free GIS Flash consultant/developer () ASCII Ribbon Campaign http://foo.keybit.net/~strk/services.html /\ Keep it simple! ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Installation of Postgis/postgresql
On Mon, Dec 28, 2009 at 07:43:08PM -0800, Nick Uebelhor wrote: during ./configure of geos errors out looking for g++ to the best of my knowledge g++ is part of gcc and we have a current version of the gcc compiler on the computer GCC is big so distributors usually split the binary packages by different runtimes and dev environment. Make sure to install the GNU C++ compiler. --strk; Free GIS Flash consultant/developer () ASCII Ribbon Campaign http://foo.keybit.net/~strk/services.html /\ Keep it simple! ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] 3.2.0 release ready for download
On Mon, Dec 14, 2009 at 06:39:21PM -0500, Greg Troxel wrote: The shlib major version changed; probably NEWS should mention that. GEOS has 2 shared libraries. The one implementing the C++ API and the one implementing the C API. While we maintain proper library versioning for the C API, we don't for the C++ one, due to the way too wide set of exposed interfaces we should look at to figure when ABI was or wasn't broken (and in C++ land ABI breaks SO easily). Are there incompatible ABI changes? For the C++ shlib, most likely. (From a packaging point of view, shlib version changes when there aren't actually ABI changes generates work that could be avoided; all depending packages need a version change because they only interoperate with one or the other geos version.) This is exactly the reason why we incourage use of the C library (libgeos_c.so). The C library hard continues to expose a compatible ABI to the ABI-incompatible C++ library. So, while GEOS 3.2.0 *c++* lib is a few steps away from GEOS 3.0.0 *c++* lib, any code which linked against the *c* lib in GEOS 3.0.0 will still work with the *c* lib of GEOS 3.2.0. From a packaging point of view you should likely properly encode if a client is dependent on *libgeos* or *libgeos_c* as that makes a big difference. Is this too much confusing ? --strk; Free GIS Flash consultant/developer () ASCII Ribbon Campaign http://foo.keybit.net/~strk/services.html /\ Keep it simple! ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] 3.2.0 Final
On Fri, Dec 11, 2009 at 03:55:54PM -0500, Frank Warmerdam wrote: I would suggest If you prefer troubles you can use the C++ interface to Applications requiring API/ABI stability are encouraged to use the C interface instead of the C++ interface. I changed: If you prefer troubles you can use the C++ interface. with: If you don't care about adapting/rebuilding your client code you can still use the C++ interface. Your statement was already in previous statement: The recommended low-level interface to the GEOS library is the simplified C wrapper interface. This will ensure stability of the API and the ABI of the library during performance improvements that will likely change classes definitions. --strk; Free GIS Flash consultant/developer () ASCII Ribbon Campaign http://foo.keybit.net/~strk/services.html /\ Keep it simple! ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] 3.2.0 Final
On Fri, Dec 11, 2009 at 03:55:54PM -0500, Frank Warmerdam wrote: I am not aware of memory leaks related to the C++ API, and if there are some there is no reason not to fix them. I'm not aware either, but it may happen because the clients we test GEOS again all use the C Api, which doesn't expose the leaks itself. I just fixed a couple of leaks reported by a C++ API user in methods that would never be called by the C-Api, that's why I mentioned them. --strk; Free GIS Flash consultant/developer () ASCII Ribbon Campaign http://foo.keybit.net/~strk/services.html /\ Keep it simple! ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] 3.2.0 Final
On Sat, Dec 12, 2009 at 10:04:26AM +0100, Maxime van Noppen wrote: strk wrote: Remember that GEOS is a direct port of JTS, where (in Java) there are visibility levels that are not supported in C++ (default visibility == only classes in same package can use those interfaces). In GEOS those all became public instead. I believe it's a design issue. It could be possible to put those methods as protected and to define friend classes that have access to those methods. Yes but then we'll have to add new friends everytime a new class is added and it's something increasing the maintainance cost. If we could mark a whole namespace as a friend that'd be 1:1 mapping with JTS I guess, and no additional maintainance cost. --strk; Free GIS Flash consultant/developer () ASCII Ribbon Campaign http://foo.keybit.net/~strk/services.html /\ Keep it simple! ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] 3.2.0 Final
On Thu, Dec 10, 2009 at 12:30:43PM -0800, Paul Ramsey wrote: Shall we release 3.2.0 final? Things seem quiet... I've fixed a reported leak in r2822. r2823 also contains an updated ChangeLog. Ready for final myself. --strk; Free GIS Flash consultant/developer () ASCII Ribbon Campaign http://foo.keybit.net/~strk/services.html /\ Keep it simple! ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] 3.2.0 Final
On Fri, Dec 11, 2009 at 11:49:54AM +0100, Barend Gehrels wrote: Hi, Maybe you can consider removing (or altering) this statement from the documentation main page: If you prefer troubles you can use the C++ interface. (in geom.h). It's still troubles ! how would you reword it ? Leaks, API/ABI instabilities... --strk; Free GIS Flash consultant/developer () ASCII Ribbon Campaign http://foo.keybit.net/~strk/services.html /\ Keep it simple! ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Re: Return value of GEOSGeom_getDimensions_r
On Fri, Dec 11, 2009 at 07:51:37AM -0500, Alex Trofast wrote: If this is the case am I misunderstanding what GEOSGeom_getDimensions_r is actually supposed to do: return 0 for point, 1 for curve, 2 for surface? Any help is greatly appreciated, It's the number of ordinates used in the geometry (2 or 3, but will always be 3 atm). Pretty useless method indeed. --strk; Free GIS Flash consultant/developer () ASCII Ribbon Campaign http://foo.keybit.net/~strk/services.html /\ Keep it simple! ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] 3.1 vs 3.2
On Tue, Dec 08, 2009 at 02:12:38PM -0800, Paul Ramsey wrote: Not sure what this means, but: 3.1 3.2 Files: 20Files: 58 Tests: 2216 Tests: 3582 Failed: 0Failed: 0 Succeeded: 2216 Succeeded: 3582 PASS: testrunner PASS: testrunner real 0m29.194s real 0m11.558s user 0m24.750s user 0m10.630s sys 0m1.489s sys 0m0.230s Much more tests in less of half the time ! It seems to mean 3.2.0 rocks :) --strk; Free GIS Flash consultant/developer () ASCII Ribbon Campaign http://foo.keybit.net/~strk/services.html /\ Keep it simple! ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Benchmark between various geometry libraries
On Wed, Dec 09, 2009 at 05:13:15PM +0100, Maxime van Noppen wrote: Maxime van Noppen wrote: I will post any numbers I get. I'm still far from having a solid and complete report but just to give you a taste : on 100 intersections dynamic allocations represent 25.01% of the time cost (17.14% spent allocating, 7.87% deallocating). I've also found several small optimizations that can lead to significant performance boosts. For example, on the 100 intersection benchmark I found that 10% of the time was spent in CoordinateArraySequence::getAt. The fact is that as the code is in the .cpp file it cannot be inlined by the compiler. So I juste moved the one-line code of the .cpp file to the .h file and the runtime cost dropped drastically (to ~ 2%). CoordinateArraySequence::getAt is a virtual function, which is probably the reason why the fully templated solution is much faster instead. How can a virtual method be inlined by the compiler ? --strk; Free GIS Flash consultant/developer () ASCII Ribbon Campaign http://foo.keybit.net/~strk/services.html /\ Keep it simple! ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] 3.2 RC4?
On Tue, Dec 08, 2009 at 07:04:26PM +0100, strk wrote: On Tue, Dec 08, 2009 at 08:01:25AM -0800, Paul Ramsey wrote: Thanks to Mats for taking the cleanup run through the code! I would like to cut one more RC, anyone have objections, fixes-in-progress? Just closed a couple ([1], [2]) of fresh tickets and am now ready for rc4. Actually, distcheck is failing: make[2]: *** No rule to make target `geos.vsprops', needed by `distdir'. Stop. Mat ? --strk; Free GIS Flash consultant/developer () ASCII Ribbon Campaign http://foo.keybit.net/~strk/services.html /\ Keep it simple! ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] Another cleanup pass on 3.2.0 ongoing
FYI, Mateusz is doing a cleanup pass on trunk. He mentioned it should be done in a week. I think it's worth waiting till then and ship an rc4. If anyone is concerned with that please let me know. TIA --strk; Free GIS Flash consultant/developer () ASCII Ribbon Campaign http://foo.keybit.net/~strk/services.html /\ Keep it simple! ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
[geos-devel] 3.2.0-rc3 tagged
Packaging and platform support tweaks mostly. Please take another loop, this could be final. --strk; Free GIS Flash consultant/developer () ASCII Ribbon Campaign http://foo.keybit.net/~strk/services.html /\ Keep it simple! ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel
Re: [geos-devel] Find self-intersections
What do you really need to do at the end of the day ? Want a simple ring ? A polygon ? --strk; On Fri, Nov 27, 2009 at 05:22:22PM +0100, Frederik Ramm wrote: Hi, today I came across the following problem that I tried to solve with GEOS. I had 3.000 linestrings which together formed one large ring. However, this ring was not simple; it was 8-shaped. I wanted to find out where the intersection point - or perhaps the intersection line! - was. The best I could come up with was: for (i=0; icount; i++) { for (j=i+1; jcount; j++) { Geometry *p = linestring[i]-intersection(linestring[j]) if (p) { // found something } } } This is of course rather inefficient! I'd better build a LinearRing from the lot of them and then query for self-intersection. I did find some code that does this when looking at how isSimple() is implemented; however, that code would only find self intersection points, not lines. I wonder if there is some generic way to determine a geometry's self intersection? Bye Frederik ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel -- Free GIS Flash consultant/developer () ASCII Ribbon Campaign http://foo.keybit.net/~strk/services.html /\ Keep it simple! ___ geos-devel mailing list geos-devel@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/geos-devel