AW: [Qgis-developer] Planning for QGIS 1.0.0 '????'

Hugentobler Marco marco.hugentobler at karto.baug.ethz.ch
Fri Aug 8 05:20:36 EDT 2008


Hi Jürgen,

Thank you for the fixes. I made some more tests with the updated patch and found following things:

- 'Add ring' and 'Add island' tools basically work now. However, there is still an issue with 'Add ring' that occurs when adding several rings into a multipolygon part. In this case, the first ring disappears after adding a second one into the same polygon part. 

- I tried to compile also with geos2. However, I reveive the following compiler error:

/home/marco/src/qgis_geos_c_api/src/core/qgsdistancearea.cpp
In file included from /home/marco/src/qgis_geos_c_api/src/core/qgsdistancearea.cpp:28:
/home/marco/src/qgis_geos_c_api/src/core/qgsgeometry.h:369: Fehler: expected »,« or »...« before »*« token
/home/marco/src/qgis_geos_c_api/src/core/qgsgeometry.h:370: Fehler: ISO-C++ verbietet Deklaration von »GEOSCoordSequence« ohne Typ

- And I also did some tests with the valgrind memory debugger that revealed two possible memory leaks related to the c_api port:

==12251== 184,824 bytes in 6 blocks are possibly lost in loss record 733 of 739
==12251==    at 0x4023294: operator new(unsigned) (vg_replace_malloc.c:224)
==12251==    by 0x50C3330: geos::geom::CoordinateArraySequence::CoordinateArraySequence(geos::geom::CoordinateArraySequence const&) (new_allocator.h:88)
==12251==    by 0x50C33F6: geos::geom::CoordinateArraySequence::clone() const (CoordinateArraySequence.cpp:58)
==12251==    by 0x50D2124: geos::geom::LineString::LineString(geos::geom::LineString const&) (LineString.cpp:48)
==12251==    by 0x50D00F8: geos::geom::LinearRing::LinearRing(geos::geom::LinearRing const&) (LinearRing.cpp:31)
==12251==    by 0x50D6256: geos::geom::Polygon::Polygon(geos::geom::Polygon const&) (Polygon.cpp:56)
==12251==    by 0x50D85B6: geos::geom::Polygon::clone() const (Polygon.h:74)
==12251==    by 0x50C9A62: geos::geom::GeometryCollection::GeometryCollection(geos::geom::GeometryCollection const&) (GeometryCollection.cpp:50)
==12251==    by 0x50B2D98: geos::geom::MultiPolygon::MultiPolygon(geos::geom::MultiPolygon const&) (MultiPolygon.inl:28)
==12251==    by 0x50B2DE6: geos::geom::MultiPolygon::clone() const (MultiPolygon.inl:35)
==12251==    by 0x5FEFCB0: GEOSGeom_clone (geos_c.cpp:1760)
==12251==    by 0x4156F25: QgsGeometry::QgsGeometry(QgsGeometry const&) (qgsgeometry.cpp:134)

and

==12251== 12,236 (224 direct, 12,012 indirect) bytes in 8 blocks are definitely lost in loss record 687 of 739
==12251==    at 0x4023294: operator new(unsigned) (vg_replace_malloc.c:224)
==12251==    by 0x50CBF45: geos::geom::GeometryFactory::createPolygon(geos::geom::LinearRing*, std::vector<geos::geom::Geometry*, std::allocator<geos::geom::Geometry*> >*) const (GeometryFactory.cpp:489)
==12251==    by 0x5FF245E: GEOSGeom_createPolygon (geos_c.cpp:1742)
==12251==    by 0x41544DD: createGeosPolygon(QVector<GEOSGeom_t*> const&) (qgsgeometry.cpp:273)
==12251==    by 0x415453F: createGeosPolygon(GEOSGeom_t*) (qgsgeometry.cpp:283)
==12251==    by 0x41566D7: QgsGeometry::addRing(QList<QgsPoint> const&) (qgsgeometry.cpp:2571)
==12251==    by 0x41A8EA8: QgsVectorLayer::addRing(QList<QgsPoint> const&) (qgsvectorlayer.cpp:1628)
==12251==    by 0x8175A82: QgsMapToolAddRing::canvasReleaseEvent(QMouseEvent*) (qgsmaptooladdring.cpp:84)
==12251==    by 0x405CF7F: QgsMapCanvas::mouseReleaseEvent(QMouseEvent*) (qgsmapcanvas.cpp:762)
==12251==    by 0x4663303: QWidget::event(QEvent*) (qwidget.cpp:7021)
==12251==    by 0x49A0322: QFrame::event(QEvent*) (qframe.cpp:657)
==12251==    by 0x4A3428E: QAbstractScrollArea::viewportEvent(QEvent*) (qabstractscrollarea.cpp:947)



Regards,
Marco




-----Ursprüngliche Nachricht-----
Von: qgis-developer-bounces at lists.osgeo.org im Auftrag von Jürgen E. Fischer
Gesendet: Do 07.08.2008 18:38
An: qgis-developer at lists.osgeo.org
Betreff: Re: [Qgis-developer] Planning for QGIS 1.0.0 '????'
 
Hi Marco,

On Thu, 07. Aug 2008 at 11:40:41 +0200, Hugentobler  Marco wrote:
> - GEOSGeometry seems to be GEOSGeom in geos 2. Maybe version 2 could
>   be supported by a typedef or define ?

Added - also changed for the GEOSPolygonizer_getCutEdges() call.  See
[1] for the updated patch.

> - The tool to add rings to a polygon did not work when I tested it
> - The same with the tool to add islands to selected polygons

as far as I can tell: both fixed 

> Thanks anyway for doing the port to c-api. I know it is a difficult
> task because many parts in qgis depend on geos functionality.

You're welcome.


Jürgen


[1] http://trac.osgeo.org/qgis/ticket/1193

-- 
Jürgen E. Fischer         norBIT GmbH               Tel. +49-4931-918175-0
Dipl.-Inf. (FH)           Rheinstraße 13            Fax. +49-4931-918175-50
Software Engineer         D-26506 Norden               http://www.norbit.de

-- 
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502

_______________________________________________
Qgis-developer mailing list
Qgis-developer at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer



More information about the Qgis-developer mailing list