Yes, it looks better. I suggest you test it well with both Polygons
and MultiPolygons and then submit a patch.
On 31 October 2014 12:50, Patrick Einzinger <[log in to unmask]> wrote:
> Dear all,
> I tried to read a shape file into a GeomVectorField, but when I called
> computeUnion(), an exception was thrown. The problem seems to be that the
> method builds the union in a Geometry p, but in the last line of code
> globalUnion = new PreparedPolygon((Polygon)p);
> it assumes that p can be cast to a Polygon. Unfortunately, it turns out to
> be a MultiPolygon in my case. PreparedPolygon does in fact only demand an
> object of type Polygonal as argument in its constructor, so wouldn't
> globalUnion = new PreparedPolygon((Polygonal)p);
> be better and fix the problem?
> Best regards,