[geos-devel] Re: [GEOS] #353: LinearReferencing functions segfaults

2010-06-19 Thread GEOS
#353: LinearReferencing functions segfaults
+---
 Reporter:  strk|   Owner:  geos-de...@…  
 Type:  defect  |  Status:  new   
 Priority:  blocker |   Milestone:  3.2.1 
Component:  Default | Version:  3.2.0 
 Severity:  Unassigned  |Keywords:
+---

Comment(by strk):

 Ok, I'm done, linearref patches are finished.
 Just a backport to branch before closing this.
 I don't have time to do it myself.

-- 
Ticket URL: 
GEOS 
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite 
(JTS).
___
geos-devel mailing list
geos-devel@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-devel

[geos-devel] Re: [GEOS] #353: LinearReferencing functions segfaults

2010-06-19 Thread GEOS
#353: LinearReferencing functions segfaults
+---
 Reporter:  strk|   Owner:  geos-de...@…  
 Type:  defect  |  Status:  new   
 Priority:  blocker |   Milestone:  3.2.1 
Component:  Default | Version:  3.2.0 
 Severity:  Unassigned  |Keywords:
+---

Comment(by strk):

 GEOSInterpolate CAPI side fixed in r3021 (catching the exception)

-- 
Ticket URL: 
GEOS 
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite 
(JTS).
___
geos-devel mailing list
geos-devel@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-devel

[geos-devel] Re: [GEOS] #353: LinearReferencing functions segfaults (was: GEOSInterpolate segfaults)

2010-06-19 Thread GEOS
#353: LinearReferencing functions segfaults
+---
 Reporter:  strk|   Owner:  geos-de...@…  
 Type:  defect  |  Status:  new   
 Priority:  blocker |   Milestone:  3.2.1 
Component:  Default | Version:  3.2.0 
 Severity:  Unassigned  |Keywords:
+---

Comment(by strk):

 Fixed GEOSInterpolate in r3019, won't close so we remember to back-port.
 Also, I rename to keep this for generic linear referencing segfaults (I'm
 sure I'll find more)

-- 
Ticket URL: 
GEOS 
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite 
(JTS).
___
geos-devel mailing list
geos-devel@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-devel

[geos-devel] Re: [GEOS] #283: Patch: ported linearref from JTS

2010-06-19 Thread GEOS
#283: Patch: ported linearref from JTS
+---
 Reporter:  novalis |Owner:  geos-de...@…  
 Type:  defect  |   Status:  closed
 Priority:  blocker |Milestone:  3.2.0 
Component:  Default |  Version:  svn-trunk 
 Severity:  Unassigned  |   Resolution:  fixed 
 Keywords:  |  
+---
Changes (by strk):

  * status:  reopened => closed
  * resolution:  => fixed


Comment:

 Filed another ticket for the segfault: #353

-- 
Ticket URL: 
GEOS 
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite 
(JTS).
___
geos-devel mailing list
geos-devel@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-devel

[geos-devel] [GEOS] #353: GEOSInterpolate segfaults

2010-06-19 Thread GEOS
#353: GEOSInterpolate segfaults
+---
 Reporter:  strk|   Owner:  geos-de...@…  
 Type:  defect  |  Status:  new   
 Priority:  blocker |   Milestone:  3.2.1 
Component:  Default | Version:  3.2.0 
 Severity:  Unassigned  |Keywords:
+---
 When calling GEOSInterpolate against a POINT geometry (C-API), a segfault
 happens. See #283 for when that code was added.

 NOTE: milestone should be 3.2.3 but doesn't exist.
 Also, versions 3.2.1 and 3.2.2 should be added to trac.

 Also, r3012, r3013, r3014 and r3015 should be back-ported to 2.x branch.

-- 
Ticket URL: 
GEOS 
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite 
(JTS).
___
geos-devel mailing list
geos-devel@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-devel

[geos-devel] Re: [GEOS] #283: Patch: ported linearref from JTS

2010-06-19 Thread GEOS
#283: Patch: ported linearref from JTS
+---
 Reporter:  novalis |Owner:  geos-de...@…  
 Type:  defect  |   Status:  reopened  
 Priority:  blocker |Milestone:  3.2.0 
Component:  Default |  Version:  svn-trunk 
 Severity:  Unassigned  |   Resolution:
 Keywords:  |  
+---
Changes (by strk):

  * priority:  major => blocker
  * status:  closed => reopened
  * resolution:  fixed =>


Comment:

 GEOSInterpolate, like GEOSProject, segfaults.
 I fixed GEOSProject, but don't have time/funding to fix GEOSInterpolate.

 When new code is added, it should come with unit testing.
 It would have been easy to catch such situations.

 Also in this case the segfault is triggered by calling the function
 against a POINT, so the root cause might be the same (not checking
 that input is a LINESTRING)

-- 
Ticket URL: 
GEOS 
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite 
(JTS).
___
geos-devel mailing list
geos-devel@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-devel

[geos-devel] linearref::LinearIterator segfaults

2010-06-19 Thread strk
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