IllegalArgumentException: Error while creating GAIRMET polygon from XML [Gairmet{receiptTime=2024-08-09T18:00:15Z, issueTime=2024-08-09T17:59Z, expireTime=2024-08-09T21:00Z, validTime=2024-08-09T18:00Z, type=SIERRA, hazard=Hazard{type=IFR, severity=null}, geometryType=AREA, rawWeatherText='null', altitude=null, freezingLevel=null, points=[Point{longitude=-124.89, latitude=48.63}, Point{longitude=-123.44, latitude=46.97}, Point{longitude=-123.55, latitude=43.81}, Point{longitude=-124.31, latitude=42.58}, Point{longitude=-123.53, latitude=41.07}, Point{longitude=-124.21, latitude=40.03}, Point{longitude=-123.2, latitude=38.55}]}]
java.lang.IllegalArgumentException: Error while creating GAIRMET polygon from XML [Gairmet{receiptTime=2024-08-09T18:00:15Z, issueTime=2024-08-09T17:59Z, expireTime=2024-08-09T21:00Z, validTime=2024-08-09T18:00Z, type=SIERRA, hazard=Hazard{type=IFR, severity=null}, geometryType=AREA, rawWeatherText='null', altitude=null, freezingLevel=null, points=[Point{longitude=-124.89, latitude=48.63}, Point{longitude=-123.44, latitude=46.97}, Point{longitude=-123.55, latitude=43.81}, Point{longitude=-124.31, latitude=42.58}, Point{longitude=-123.53, latitude=41.07}, Point{longitude=-124.21, latitude=40.03}, Point{longitude=-123.2, latitude=38.55}]}]
at com.flightchop.jobs.ConvertGairmetHelper.convertToDomain(ConvertGairmetHelper.java:85)
at com.flightchop.jobs.LoadGairmetDataService.insertNew(LoadGairmetDataService.java:94)
at com.flightchop.jobs.LoadGairmetDataService.insertNew(LoadGairmetDataService.java:24)
at com.flightchop.jobs.AbstractLoadDataService.loadData(AbstractLoadDataService.java:70)
at com.flightchop.jobs.AbstractLoadDataRunner.run(AbstractLoadDataRunner.java:50)
at org.springframework.boot.SpringApplication.lambda$callRunner$4(SpringApplication.java:786)
at org.springframework.util.function.ThrowingConsumer$1.acceptWithException(ThrowingConsumer.java:83)
at org.springframework.util.function.ThrowingConsumer.accept(ThrowingConsumer.java:60)
at org.springframework.util.function.ThrowingConsumer$1.accept(ThrowingConsumer.java:88)
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:798)
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:786)
at org.springframework.boot.SpringApplication.lambda$callRunners$3(SpringApplication.java:774)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:774)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:341)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343)
at com.flightchop.jobs.JobsApplication.main(JobsApplication.java:49)
Caused by: java.lang.IllegalArgumentException: Points of LinearRing do not form a closed linestring
at org.locationtech.jts.geom.LinearRing.validateConstruction(LinearRing.java:91)
at org.locationtech.jts.geom.LinearRing.(LinearRing.java:86)
at org.locationtech.jts.geom.GeometryFactory.createLinearRing(GeometryFactory.java:380)
at org.locationtech.jts.geom.GeometryFactory.createLinearRing(GeometryFactory.java:367)
at org.locationtech.jts.geom.GeometryFactory.createPolygon(GeometryFactory.java:493)
at com.flightchop.jobs.ConvertGairmetHelper.convertToDomain(ConvertGairmetHelper.java:81)
... 24 more