OperatorImportFromESRIShape causes java.lang.OutOfMemoryError
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 30/100
Línea de trabajo
Reproduzca el fallo con el data.zip adjunto y el método readShape en ShapeUtilTest1.java:68. Rastree OperatorImportFromESRIShapeCursor.importFromESRIShapeMultiPath y AttributeStreamOfInt32, y determine después qué causa el agotamiento del heap durante la iteración del cursor. Se considera terminado cuando el archivo shape adjunto se pueda importar sin OutOfMemoryError y las geometrías resultantes estén verificadas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hi together,
currently I play arround with your geometry-api-java (version 1.2.1 from maven) to read an entire shape file and stumbled over the following issue:
java.lang.OutOfMemoryError: Java heap space
at com.esri.core.geometry.AttributeStreamOfInt32.<init>(AttributeStreamOfInt32.java:61)
at com.esri.core.geometry.AttributeStreamBase.createIndexStream(AttributeStreamBase.java:465)
at com.esri.core.geometry.OperatorImportFromESRIShapeCursor.importFromESRIShapeMultiPath(OperatorImportFromESRIShapeCursor.java:268)
at com.esri.core.geometry.OperatorImportFromESRIShapeCursor.importFromESRIShape(OperatorImportFromESRIShapeCursor.java:190)
at com.esri.core.geometry.OperatorImportFromESRIShapeCursor.next(OperatorImportFromESRIShapeCursor.java:55)
at com.esri.core.geometry.ShapeUtilTest1.readShape(ShapeUtilTest1.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
The below snippet shows how I try to read the shape file.
public List<Geometry> readShape(InputStream shape) throws IOException
{
List<Geometry> geometries = new ArrayList<>();
ByteBuffer bb = ByteBuffer.wrap(IOUtils.toByteArray(shape));
GeometryCursor cursor = OperatorImportFromESRIShape.local().execute(0,
Geometry.Type.Unknown, new SimpleByteBufferCursor(bb));
Geometry geometry;
while ((geometry = cursor.next()) != null)
{
geometries.add(geometry);
}
return geometries;
}
I Hope you can help me out with my problem. I also attached the shape file.
- Lenguaje dominante
- Java
- Estrellas
- 710
- Forks
- 268
- Merge medio
- 7 d 23 h
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Esri/geometry-api-java
-
GeometryEngine.Difference throws GeometryException: internal error for closed polyline touching endpointPosiblemente ocupada @DavidHollman la tomó hace 24 días. Abiertobug fixed_to_verify
Esri/geometry-api-java#328 · 3 comentarios · 1 asignado ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Esri/geometry-api-java#324 · 17 comentarios · 1 reacción ·
-
esrijson to geojson ExceptionAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Esri/geometry-api-java#321 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 30/100
Esri/geometry-api-java#320 · 1 comentario ·
-
cannot reproduce
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Esri/geometry-api-java#316 · 5 comentarios ·
Todos los issues de Esri/geometry-api-java
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
aoqia194/leaf-loader#19 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
apache/streampark#4521 ·
-
Update license yearAbierto0 - Backlog 1 - Ready documentation good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
cbor
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
FasterXML/jackson-dataformats-binary#844 ·
Los mantenedores suelen responder en 1 día
-
Issue: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
OpenAPITools/openapi-generator#25107 ·
Los mantenedores suelen responder en 1 día