Skip to content

Commit

Permalink
Corrects a bug introduced in the previous commit on GamaShapeFile
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisDrogoul committed May 5, 2021
1 parent 1b6c637 commit 9924772
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
4 changes: 2 additions & 2 deletions msi.gama.core/src/msi/gama/util/file/GamaGisFile.java
Expand Up @@ -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();
Expand Down
11 changes: 0 additions & 11 deletions msi.gama.core/src/msi/gama/util/file/GamaShapeFile.java
Expand Up @@ -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;
Expand Down Expand Up @@ -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.<IShape> create(Types.GEOMETRY));
readShapes(scope);
}

@Override
public IList<String> getAttributes(final IScope scope) {
ShapeInfo s;
Expand Down

0 comments on commit 9924772

Please sign in to comment.