use of org.openforis.collect.geospatial.GeoToolsCoordinateOperations in project collect by openforis.
the class SamplingPointDataGeneratorTest method init.
@Before
public void init() {
coordinateOperations = new GeoToolsCoordinateOperations();
coordinateOperations.initialize();
}
use of org.openforis.collect.geospatial.GeoToolsCoordinateOperations in project collect by openforis.
the class SpatialReferenceSystemsVM method getAvailablePredefinedSRSs.
public List<String> getAvailablePredefinedSRSs() {
List<SpatialReferenceSystem> currentSRSs = survey.getSpatialReferenceSystems();
List<String> insertedSRSCodes = new ArrayList<String>();
for (SpatialReferenceSystem srs : currentSRSs) {
insertedSRSCodes.add(srs.getId());
}
GeoToolsCoordinateOperations coordinateOperations = (GeoToolsCoordinateOperations) survey.getContext().getCoordinateOperations();
Set<String> availableSRSs = coordinateOperations.getAvailableSRSs();
List<String> result = new ArrayList<String>(availableSRSs);
result.removeAll(insertedSRSCodes);
Collections.sort(result);
return result;
}
Aggregations