From 9924772b0fe525c131049210de0cfcfcf0af0094 Mon Sep 17 00:00:00 2001 From: AlexisDrogoul Date: Wed, 5 May 2021 14:30:11 +0700 Subject: [PATCH] Corrects a bug introduced in the previous commit on GamaShapeFile --- msi.gama.core/src/msi/gama/util/file/GamaGisFile.java | 4 ++-- .../src/msi/gama/util/file/GamaShapeFile.java | 11 ----------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/msi.gama.core/src/msi/gama/util/file/GamaGisFile.java b/msi.gama.core/src/msi/gama/util/file/GamaGisFile.java index 011baa2b2e..463105f88f 100644 --- a/msi.gama.core/src/msi/gama/util/file/GamaGisFile.java +++ b/msi.gama.core/src/msi/gama/util/file/GamaGisFile.java @@ -120,8 +120,8 @@ protected final void readShapes(final IScope scope) { collection.accepts(feature -> { Geometry g = (Geometry) feature.getDefaultGeometryProperty().getValue(); if (g != null && !g.isEmpty() /* Fix for Issue 725 && 677 */ ) { - // if (!with3D && !g.isValid()) { g = GeometryUtils.cleanGeometry(g); } - // g = gis.transform(g); + if (!with3D && !g.isValid()) { g = GeometryUtils.cleanGeometry(g); } + g = gis.transform(g); if (!with3D) { g.apply(ZERO_Z); g.geometryChanged(); diff --git a/msi.gama.core/src/msi/gama/util/file/GamaShapeFile.java b/msi.gama.core/src/msi/gama/util/file/GamaShapeFile.java index d86facd090..0de6f95b78 100644 --- a/msi.gama.core/src/msi/gama/util/file/GamaShapeFile.java +++ b/msi.gama.core/src/msi/gama/util/file/GamaShapeFile.java @@ -33,7 +33,6 @@ import msi.gama.common.geometry.GeometryUtils; import msi.gama.common.util.GISUtils; -import msi.gama.metamodel.shape.IShape; import msi.gama.metamodel.topology.projection.ProjectionFactory; import msi.gama.precompiler.GamlAnnotations.doc; import msi.gama.precompiler.GamlAnnotations.example; @@ -293,16 +292,6 @@ public GamaShapeFile(final IScope scope, final String pathName, final String cod super(scope, pathName, code, with3D); } - /** - * @see msi.gama.util.GamaFile#fillBuffer() - */ - @Override - protected void fillBuffer(final IScope scope) throws GamaRuntimeException { - if (getBuffer() != null) return; - setBuffer(GamaListFactory. create(Types.GEOMETRY)); - readShapes(scope); - } - @Override public IList getAttributes(final IScope scope) { ShapeInfo s;