Dear OpenForis team, I would like to have plot coordinates presented by default according to strata and plots. For this, I am using a function 'idm:samplingPointCoordinate(strata, plot)' in a 'plot_coordinate' attribute. However, with a change of stratum and plot id, plot coordinates do not change. Where did I make a mistake? Besides, I need to have a list of available plot ids per stratum (one stratum can have several plots). Thus, a plot attribute is defined as 'calculated' with the following function: 'idm:samplingPointData('plot', strata). In this case, drop down plot window is not active. What is wrong here? I would appreciate your help very much. Cheers, Roksolana asked 19 Apr '22, 10:28 petrovska |
Dear Roksolana,
Then, if you need to have a list of available plot ids per stratum, you need to define a hierarchical code list where you have stratum at the first level and plot ids at the second level, then you could make your stratum attribute in the survey a code attribute that uses the list you have just created and add use the same list for the "plot_id" attribute, but selecting "stratum" as parent code attribute. answered 19 Apr '22, 11:30 Stefano (OF) ♦♦ |
Dear Roksolana, answered 19 Apr '22, 22:37 Stefano (OF) ♦♦ |
Dear Roksolana, answered 20 Apr '22, 16:07 Stefano (OF) ♦♦ |
Thank you for your hints, I fixed my issues. Now I have another problem with circular dependency. How to resolve it? Circular dependency found in graph for node /strata/plots/height[2]/tree_id java.lang.IllegalStateException: Circular dependency found in graph for node /strata/plots/height[2]/tree_id at org.openforis.idm.model.DependencyGraph$GraphSorter.visit(DependencyGraph.java:385) at org.openforis.idm.model.DependencyGraph$GraphSorter.visit(DependencyGraph.java:391) at org.openforis.idm.model.DependencyGraph$GraphSorter.visit(DependencyGraph.java:391) at org.openforis.idm.model.DependencyGraph$GraphSorter.sort(DependencyGraph.java:378) at org.openforis.idm.model.CalculatedAttributeDependencyGraph.getSortedDependentItems(CalculatedAttributeDependencyGraph.java:30) at org.openforis.idm.model.DependencyGraph.getDependentNodes(DependencyGraph.java:148) at org.openforis.idm.model.DependencyGraph.dependenciesForItems(DependencyGraph.java:137) at org.openforis.idm.model.DependencyGraph.dependenciesFor(DependencyGraph.java:129) at org.openforis.idm.model.Record.determineCalculatedAttributes(Record.java:400) at org.openforis.collect.model.RecordUpdater.recalculateDependentCalculatedAttributes(RecordUpdater.java:468) at org.openforis.collect.model.RecordUpdater.initializeEntity(RecordUpdater.java:879) at org.openforis.collect.model.RecordUpdater.addEntity(RecordUpdater.java:202) at org.openforis.collect.model.RecordUpdater.addNode(RecordUpdater.java:179) at org.openforis.collect.command.handler.AddNodeCommandHandler.executeForResult(AddNodeCommandHandler.java:16) at org.openforis.collect.command.handler.AddNodeCommandHandler.executeForResult(AddNodeCommandHandler.java:9) at org.openforis.collect.command.handler.RecordCommandHandler$1$1.execute(RecordCommandHandler.java:72) at org.openforis.concurrency.Worker.run(Worker.java:103) at org.openforis.concurrency.Job.runTask(Job.java:95) at org.openforis.concurrency.Job.execute(Job.java:80) at org.openforis.concurrency.Worker.run(Worker.java:103) at org.openforis.concurrency.SimpleJobManager$2.run(SimpleJobManager.java:120) at org.springframework.core.task.SimpleAsyncTaskExecutor$ConcurrencyThrottlingRunnable.run(SimpleAsyncTaskExecutor.java:286) at java.lang.Thread.run(Thread.java:748) answered 19 Apr '22, 15:58 petrovska |
thank you, I corrected it as you suggested! Everything works fine. answered 20 Apr '22, 16:24 petrovska |