Stephen Woodbridge | 23 May 2013 16:41
Favicon
Gravatar

Looking for 3.4 to use the Delauny Triangles

Hi,

I'm trying to install postgis 2.1beta with support for Delauny triangles 
which says GEOS 3.4 is required. I'm not seeing that on the website

http://trac.osgeo.org/geos/

So I guessed I needed to grab the current nightly snapshot. I got

http://geos.osgeo.org/snapshots/geos-20130522.tar.bz2

Configured it with:
./configure --enable-php --enable-python
  ...
Swig: true
Python bindings: true
Ruby bindings: false
PHP bindings: true
  PHP: /usr/bin/php
  PHPUNIT:
configure: WARNING: PHP Unit testing disabled (missing PHP or PHPUNIT)
woodbri <at> maps:/u/software/geos-20130522$ make
sh ./tools/svn_repo_revision.sh
sh: Can't open ./tools/svn_repo_revision.sh
make: *** [geos_svn_revision.h] Error 127
woodbri <at> maps:/u/software/geos-20130522$ ls tools/
CMakeLists.txt  geos-config  geos-config.in  Makefile  Makefile.am 
Makefile.in
woodbri <at> maps:/u/software/geos-20130522$ find . -name svn_repo_revision.sh
woodbri <at> maps:/u/software/geos-20130522$
(Continue reading)

Tereza Fiedlerová | 8 May 2013 13:59
Picon

using CoordinateOperation::edit cause memory leaks

Hello,

I'm trying to edit Geometry using class CoordinateOperation. My implementation of CoordinateOperation::edit function looks like follows:


CoordinateSequence* VertexGeometryEditorOperation::edit(const CoordinateSequence *, const Geometry *geom )
{
    CoordinateSequence* coord = geom->getCoordinates();

    for ( size_t i = 0; i < coord->getSize(); i++)
    {
            coord->setAt( closeCoord->getAt(i)+number, i );
    }

    return coord;

}


Everything works fine, but when I check it with walgrind it returned these memory leaks:

==19845== 168 bytes in 3 blocks are possibly lost in loss record 335 of 426
==19845==    at 0x4C2C154: operator new(unsigned long) (vg_replace_malloc.c:298)
==19845==    by 0xF206682: geos::geom::GeometryFactory::createLinearRing(geos::geom::CoordinateSequence*) const (GeometryFactory.cpp:411)
==19845==    by 0xF211A31: geos::geom::util::CoordinateOperation::edit(geos::geom::Geometry const*, geos::geom::GeometryFactory const*) (CoordinateOperation.cpp:38)
==19845==    by 0xF2123D6: geos::geom::util::GeometryEditor::editPolygon(geos::geom::Polygon const*, geos::geom::util::GeometryEditorOperation*) (GeometryEditor.cpp:117)
==19845==    by 0xF212273: geos::geom::util::GeometryEditor::edit(geos::geom::Geometry const*, geos::geom::util::GeometryEditorOperation*) (GeometryEditor.cpp:88)
==19845==    by 0xBFB30FE: geoc::alg::VertexSnapper::snapVertices(geoc::geo::GEOCGeom*, geos::geom::CoordinateSequence*) (in /host/Users/Tereza/Documents/CVUT-FSv/BP/src/geoc_cpp/libgeoc.so.1.0.0)
==19845==    by 0xBFB33A1: geoc::alg::VertexSnapper::snap() (in /host/Users/Tereza/Documents/CVUT-FSv/BP/src/geoc_cpp/libgeoc.so.1.0.0)
==19845==    by 0x566782E: QgsConflateProvider::vertexSnap() (in /host/Users/Tereza/Documents/CVUT-FSv/BP/src/qgsconflate/libqgsconflate.so.1.0.0)
==19845==    by 0x401C65: main (main.cpp:85)

==19845== 192 bytes in 3 blocks are possibly lost in loss record 347 of 426
==19845==    at 0x4C2C154: operator new(unsigned long) (vg_replace_malloc.c:298)
==19845==    by 0xF206ACA: geos::geom::GeometryFactory::createPolygon(geos::geom::LinearRing*, std::vector<geos::geom::Geometry*, std::allocator<geos::geom::Geometry*> >*) const (GeometryFactory.cpp:525)
==19845==    by 0xF212568: geos::geom::util::GeometryEditor::editPolygon(geos::geom::Polygon const*, geos::geom::util::GeometryEditorOperation*) (GeometryEditor.cpp:144)
==19845==    by 0xF212273: geos::geom::util::GeometryEditor::edit(geos::geom::Geometry const*, geos::geom::util::GeometryEditorOperation*) (GeometryEditor.cpp:88)
==19845==    by 0xBFB30FE: geoc::alg::VertexSnapper::snapVertices(geoc::geo::GEOCGeom*, geos::geom::CoordinateSequence*) (in /host/Users/Tereza/Documents/CVUT-FSv/BP/src/geoc_cpp/libgeoc.so.1.0.0)
==19845==    by 0xBFB33A1: geoc::alg::VertexSnapper::snap() (in /host/Users/Tereza/Documents/CVUT-FSv/BP/src/geoc_cpp/libgeoc.so.1.0.0)
==19845==    by 0x566782E: QgsConflateProvider::vertexSnap() (in /host/Users/Tereza/Documents/CVUT-FSv/BP/src/qgsconflate/libqgsconflate.so.1.0.0)
==19845==    by 0x401C65: main (main.cpp:85)


==19845== 408 bytes in 3 blocks are possibly lost in loss record 382 of 426
==19845==    at 0x4C2C154: operator new(unsigned long) (vg_replace_malloc.c:298)
==19845==    by 0xF1FABE5: geos::geom::CoordinateArraySequence::CoordinateArraySequence(geos::geom::CoordinateArraySequence const&) (new_allocator.h:92)
==19845==    by 0xF1FACD8: geos::geom::CoordinateArraySequence::clone() const (CoordinateArraySequence.cpp:77)
==19845==    by 0xBFB7B6C: geoc::edit::VertexGeometryEditorOperation::edit(geos::geom::CoordinateSequence const*, geos::geom::Geometry const*) (in /host/Users/Tereza/Documents/CVUT-FSv/BP/src/geoc_cpp/libgeoc.so.1.0.0)
==19845==    by 0xF211A26: geos::geom::util::CoordinateOperation::edit(geos::geom::Geometry const*, geos::geom::GeometryFactory const*) (CoordinateOperation.cpp:36)
==19845==    by 0xF2123D6: geos::geom::util::GeometryEditor::editPolygon(geos::geom::Polygon const*, geos::geom::util::GeometryEditorOperation*) (GeometryEditor.cpp:117)
==19845==    by 0xF212273: geos::geom::util::GeometryEditor::edit(geos::geom::Geometry const*, geos::geom::util::GeometryEditorOperation*) (GeometryEditor.cpp:88)
==19845==    by 0xBFB30FE: geoc::alg::VertexSnapper::snapVertices(geoc::geo::GEOCGeom*, geos::geom::CoordinateSequence*) (in /host/Users/Tereza/Documents/CVUT-FSv/BP/src/geoc_cpp/libgeoc.so.1.0.0)
==19845==    by 0xBFB33A1: geoc::alg::VertexSnapper::snap() (in /host/Users/Tereza/Documents/CVUT-FSv/BP/src/geoc_cpp/libgeoc.so.1.0.0)
==19845==    by 0x566782E: QgsConflateProvider::vertexSnap() (in /host/Users/Tereza/Documents/CVUT-FSv/BP/src/qgsconflate/libqgsconflate.so.1.0.0)
==19845==    by 0x401C65: main (main.cpp:85)


...

Anybody knows how to fix that?

Thanks,

Tereza

_______________________________________________
geos-devel mailing list
geos-devel <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-devel
GEOS | 30 Apr 2013 21:26
Favicon

[GEOS] #629: Improve the snap algorithm choosing the closest_point as snapped vertex

#629: Improve the snap algorithm choosing the closest_point as snapped vertex
-------------------------+--------------------------------------------------
 Reporter:  aperi2007    |       Owner:  geos-devel <at> …              
     Type:  enhancement  |      Status:  new                       
 Priority:  major        |   Milestone:                            
Component:  Default      |     Version:  svn-trunk                 
 Severity:  Unassigned   |    Keywords:                            
-------------------------+--------------------------------------------------
 Actually the snap algorithm choose as snap point the first vertex that
 match the rules (under to snap value) calling it "first snappable point".
 This could cause invalid polygon when there is more than one vertex under
 the limit snap value.
 To avoid this kind of invalidity an improve to the algorithm could be to
 snap the closest_point instead of the first snappable point.

 Find the closest_point if a time consuming analyze because should be
 necessary to analyze all the vertex of the geometry.
 But realistic many cases are resolvable checking a more limited number of
 vertex after the the analyzing vertex as example checking 10 or 20 vertex
 after the first snappable point to see if exists a more closest point.

--

-- 
Ticket URL: <http://trac.osgeo.org/geos/ticket/629>
GEOS <http://geos.refractions.net/>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
_______________________________________________
geos-devel mailing list
geos-devel <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-devel
vishal tiwari | 29 Apr 2013 15:40
Picon

GSoC 2013 Project Proposal

Hey,
I have submitted my GSoC proposal for the project: "Adding Voronoi Diagrams to GEOS" , here:

Feedback and suggestions are most welcome.

Thanks and kind Regards,
--
Vishal Tiwari
Undergraduate
Computer Science and Engineering
Lab for Spatial Informatics
IIIT-Hyderabad
_______________________________________________
geos-devel mailing list
geos-devel <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-devel
Richard Frith-Macdonald | 16 Apr 2013 20:53
Picon
Picon

Problem with convex hull generating bad polygons (I think)

Sorry, this is not really a developer question, but I don't know where else to ask.
I might be encountering a bug, but most likely I'm just misunderstanding and doing something wrong.

I have code which is failing with 'TopologyException:side location conflict at' errors when performing a
convex hull operation using the C API.
Adding diagnostics to print the WKT of things before the operation, it looks like I'm feeding in an invalid
polygon (one with repeated points), but I don't know why.
My code starts (as far as I can tell) with valid simple (ie no inner rings) polygons, and attempts top
merge/extend some of them as follows:

In some cases, I want one polygon to be extended to include another ... I do a union of the two and then a convex
hull of the result, using this to replace the original polygon.
In other cases, I want one polygon to be extended to touch another ... I calculate the nearest points on the
two polygons and then union the first polygon with the closest point of the second polygon, and do a convex
hull of the union, using it to replace the first polygon.

I think one of these operations must be producing an invalid polygon as its output, and then that is causing
the topology exception later on when the output of one pass is used as input in a later pass.

So, my guess is I'm doing something stupid here ... should the convex hull operation always produce a valid
polygon as output?
Is a union of two polygons not valid as input for convex hull?
Is a union of a polygon and a point not valid for input for convex hull?

Thanks in advance for any help.
Crispin Cooper | 5 Apr 2013 16:54
Picon
Picon

Compiling GEOS 64-bit

Hi, quick question:

Is there an option I can feed to nmake (building under windows/msvc) 
that will cause GEOS to be compiled 64-bit?

Best regards

Crispin

--

-- 
Dr Crispin Cooper
Sustainable Places Research Institute
33 Park Place, Cardiff CF10 3BA
Phone +44 (0)29 20876072
vishal tiwari | 29 Mar 2013 10:03
Picon

Gsoc 2013


Hi!
i am Vishal, pursuing my B.Tech in computer science from IIIT-Hyderabad, India. I am also a part of the lab, Lab for Spatial Informatics (LSI). In which i will be pursuing my MS by research degree. I saw your ideas page on OSGeo site.I was looking at the project "adding Voronoi Diagrams to GEOS". I was looking for JTS, and GEOS, and want to know more about it. Though i am comfortable with C/C++ and java, but have not made any kind of a port from java to c++. Would like to know more on how GEOS does this, so that i could contribute to GEOS.
Anyone willing to guide me on this project?

Thanks and kind regards,
Vishal Tiwari
Undergraduate
Computer Science and Engineering
Lab for Spatial Informatics
IIIT-Hyderabad
_______________________________________________
geos-devel mailing list
geos-devel <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-devel
GEOS | 25 Mar 2013 18:51
Favicon

[GEOS] #627: Voronoi

#627: Voronoi
---------------------------+------------------------------------------------
 Reporter:  smathermather  |       Owner:  geos-devel <at> …              
     Type:  enhancement    |      Status:  new                       
 Priority:  major          |   Milestone:  GEOS Future               
Component:  Default        |     Version:  3.3.8                     
 Severity:  Unassigned     |    Keywords:                            
---------------------------+------------------------------------------------
 Port voronoi from JTS.  Would be really nice to add ST_Voronoi to PostGIS


 Possibly remove dependency of cgal for pgRouting


 Allow for any number of skeletonization solutions


 Thus allowing for non-polygon outputs from Raster, like an
 ST_PixelAsLinestring


 start the process toward world peace

--

-- 
Ticket URL: <http://trac.osgeo.org/geos/ticket/627>
GEOS <http://geos.refractions.net/>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
_______________________________________________
geos-devel mailing list
geos-devel <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-devel
Jose Romero Miret | 21 Mar 2013 15:58

Calculates distance between 3D points lat,long,alt

Hej, just checking the API for calculating distances in in points in the space but i did not found points lat,long,alt. can someone point out for directions?

_______________________________________________
geos-devel mailing list
geos-devel <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-devel
GEOS | 15 Mar 2013 22:52
Favicon

[GEOS] #626: Intersection with result from intersection --> TopologyException Error

#626: Intersection with result from intersection --> TopologyException Error
-------------------------+--------------------------------------------------
 Reporter:  rajanski     |       Owner:  geos-devel <at> …                                     
     Type:  defect       |      Status:  new                                              
 Priority:  major        |   Milestone:                                                   
Component:  Default      |     Version:  3.3.3                                            
 Severity:  Significant  |    Keywords:  intersection, st_intersection, topology exception
-------------------------+--------------------------------------------------
 I have three geometries (Attached).

 I am intersecting the first two,and then intersect the result with the
 third geometry.

 Follows the error message

 Error performing intersection: TopologyException: found non-noded
 intersection between LINESTRING (15.1068 51.0102, 15.0974 51.0034) and
 LINESTRING (15.1068 51.0102, 15.0976 51.0036) at 15.101547860470001
 51.006448703862588

 but only when Iam directly taking the geometries from a table (see
 attachment)

 When I produce the geometries with st_geomfromtext, it works.

 When I take the geometries from the table, transform themto text,and then
 back to geometry,it also works.

--

-- 
Ticket URL: <http://trac.osgeo.org/geos/ticket/626>
GEOS <http://geos.refractions.net/>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
_______________________________________________
geos-devel mailing list
geos-devel <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-devel
Richard Frith-Macdonald | 15 Mar 2013 06:56
Picon
Picon

Using the C API

I'm not a C+ programmer, all the code I work with is ObjectiveC (occasionally Java) so I'm really interested
in the C API.

Clearly the C API only exposes a tiny subset of the C++ API , but what decides which functions are exposed?

I have a need to get the nearest points of two geometries, but there's nothing in the C API to do that, though
there is a function to get the distance between the two.
It would make more sense to me for it to be the other way round (you can easily derive the distance from the
nearest points, but you can't derive the nearest points from the distance), but better would be to provide
a C function to get the nearest points as well as the function to get the distance between geometries.

Would a patch to do that be acceptable (if/when I can get it working)?
_______________________________________________
geos-devel mailing list
geos-devel <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-devel

Gmane