Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARC Linearization causes Out Of Memory Error #171

Open
GisMarsch opened this issue Oct 24, 2024 · 0 comments
Open

ARC Linearization causes Out Of Memory Error #171

GisMarsch opened this issue Oct 24, 2024 · 0 comments

Comments

@GisMarsch
Copy link
Contributor

Hello guys,

I am having an ORACLE SDO Geometry in that way:

SDO_GEOMETRY(3003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1005, 2, 1, 2, 1, 49, 2, 2), SDO_ORDINATE_ARRAY(33375930,096, 6017592,535, 0, 33375926,631, 6017591,297, 0, 33375924,383, 6017590,514, 0, 33375883,231, 6017576,178, 0, 33375862,305, 6017568,889, 0, 33375856,014, 6017552,118, 0, 33375844,541, 6017515,331, 0, 33375849,332, 6017516,935, 0, 33375851,866, 6017517,792, 0, 33375863,228, 6017521,556, 0, 33375874,592, 6017525,325, 0, 33375885,954, 6017529,092, 0, 33375897,316, 6017532,859, 0, 33375908,896, 6017536,8, 0, 33375920,031, 6017540,626, 0, 33375941,906, 6017548,036, 0, 33375945,536, 6017549,333, 0, 33375937,816, 6017570,934, 0, 33375930,096, 6017592,535, 0))

By using the Decoder to read it, I get an Out-Of-Memory Exception:

Caused by: java.lang.OutOfMemoryError: Java heap space
	at java.util.Arrays.copyOf(Arrays.java:3681) ~[?:?]
	at org.geolatte.geom.VariableSizePositionSequenceBuilder.ensureCapacity(VariableSizePositionSequenceBuilder.java:53) ~[geolatte-geom-1.9.1.jar:?]
	at org.geolatte.geom.VariableSizePositionSequenceBuilder.addCoordinate(VariableSizePositionSequenceBuilder.java:46) ~[geolatte-geom-1.9.1.jar:?]
	at org.geolatte.geom.AbstractPositionSequenceBuilder.add(AbstractPositionSequenceBuilder.java:47) ~[geolatte-geom-1.9.1.jar:?]
	at org.geolatte.geom.cga.CircularArcLinearizer.AddPointsBetweenPolarCoordinates(CircularArcLinearizer.java:158) ~[geolatte-geom-1.9.1.jar:?]
	at org.geolatte.geom.cga.CircularArcLinearizer.linearize(CircularArcLinearizer.java:95) ~[geolatte-geom-1.9.1.jar:?]
	at org.geolatte.geom.codec.db.oracle.Linearizer.linearizeToList(Linearizer.java:42) ~[geolatte-geom-1.9.1.jar:?]
	at org.geolatte.geom.codec.db.oracle.Linearizer.linearize(Linearizer.java:49) ~[geolatte-geom-1.9.1.jar:?]
	at org.geolatte.geom.codec.db.oracle.SimpleElement.linearizedPositions(Element.java:68) ~[geolatte-geom-1.9.1.jar:?]
	at org.geolatte.geom.codec.db.oracle.CompoundElement.linearizedPositions(Element.java:152) ~[geolatte-geom-1.9.1.jar:?]
	at org.geolatte.geom.codec.db.oracle.PolygonSdoDecoder.decode(PolygonSdoDecoder.java:38) ~[geolatte-geom-1.9.1.jar:?]
	at org.geolatte.geom.codec.db.oracle.PolygonSdoDecoder.internalDecode(PolygonSdoDecoder.java:24) ~[geolatte-geom-1.9.1.jar:?]
	at org.geolatte.geom.codec.db.oracle.AbstractSDODecoder.decode(AbstractSDODecoder.java:23) ~[geolatte-geom-1.9.1.jar:?]
	at org.geolatte.geom.codec.db.oracle.AbstractSDODecoder.decode(AbstractSDODecoder.java:13) ~[geolatte-geom-1.9.1.jar:?]
	at org.geolatte.geom.codec.db.oracle.Decoders.decode(Decoders.java:30) ~[geolatte-geom-1.9.1.jar:?]
	at org.geolatte.geom.codec.db.oracle.Decoders.decode(Decoders.java:25) ~[geolatte-geom-1.9.1.jar:?]

I think that the problem is because of too many points in linearization.

Are there any plans to introduce such a configuration or a hard coded value that a Runtime or IllegalArgumentException can be thrown before the Out-Of-Memory happens?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant