diff --git a/.github/badges/jacoco.svg b/.github/badges/jacoco.svg index c27969f97..22ba8bda7 100644 --- a/.github/badges/jacoco.svg +++ b/.github/badges/jacoco.svg @@ -1 +1 @@ -coverage25.4% \ No newline at end of file +coverage24.8% \ No newline at end of file diff --git a/.github/coverage/jacoco.csv b/.github/coverage/jacoco.csv index 6964e983c..c07f83589 100644 --- a/.github/coverage/jacoco.csv +++ b/.github/coverage/jacoco.csv @@ -20,18 +20,16 @@ AuScope-Portal-API,org.auscope.portal.server.web.controllers,UserController,136, AuScope-Portal-API,org.auscope.portal.server.web.controllers,RemanentAnomaliesAutoSearchController,44,0,0,0,15,0,3,0,3,0 AuScope-Portal-API,org.auscope.portal.server.web.controllers,IRISController,138,269,4,6,28,53,6,7,3,5 AuScope-Portal-API,org.auscope.portal.server.web.controllers,GsmlpNameSpaceTable,90,0,4,0,25,0,6,0,4,0 -AuScope-Portal-API,org.auscope.portal.server.web.controllers,MSCLController,333,0,32,0,72,0,20,0,4,0 +AuScope-Portal-API,org.auscope.portal.server.web.controllers,MSCLController,303,0,32,0,66,0,19,0,3,0 AuScope-Portal-API,org.auscope.portal.server.web.controllers,TIMAController,179,0,10,0,38,0,9,0,4,0 AuScope-Portal-API,org.auscope.portal.server.web.controllers,SF0BoreholeController,635,0,34,0,129,0,23,0,6,0 -AuScope-Portal-API,org.auscope.portal.server.web.controllers,VocabController,102,235,6,6,14,43,6,9,2,7 +AuScope-Portal-API,org.auscope.portal.server.web.controllers,VocabController,10,235,2,6,2,43,2,9,0,7 AuScope-Portal-API,org.auscope.portal.server.web.controllers,PortalParamsController,114,0,10,0,29,0,10,0,5,0 -AuScope-Portal-API,org.auscope.portal.server.web.controllers,CustomKMLController,138,0,4,0,27,0,5,0,3,0 AuScope-Portal-API,org.auscope.portal.server.web.controllers,PortalStateController,212,0,20,0,51,0,17,0,7,0 -AuScope-Portal-API,org.auscope.portal.server.web.controllers,NVCLController,1093,381,76,6,222,83,58,11,19,9 +AuScope-Portal-API,org.auscope.portal.server.web.controllers,NVCLController,792,378,56,6,164,82,43,11,14,9 AuScope-Portal-API,org.auscope.portal.server.web.controllers,EarthResourcesFilterController,385,0,8,0,108,0,15,0,11,0 -AuScope-Portal-API,org.auscope.portal.server.web.controllers,ReprojectionController,0,264,2,36,0,46,2,22,0,5 AuScope-Portal-API,org.auscope.portal.server.web.controllers,VocabController.new Comparator() {...},0,16,0,0,0,2,0,2,0,2 -AuScope-Portal-API,org.auscope.portal.server.web.controllers,GenericController,188,0,12,0,54,0,12,0,5,0 +AuScope-Portal-API,org.auscope.portal.server.web.controllers,GenericController,143,0,10,0,41,0,10,0,4,0 AuScope-Portal-API,org.auscope.portal.server.web.controllers,IRISController.new IterableNamespace() {...},0,12,0,0,0,3,0,1,0,1 AuScope-Portal-API,org.auscope.portal.server.web.controllers,VocabularyCacheController,48,0,0,0,12,0,3,0,3,0 AuScope-Portal-API,org.auscope.portal.server.web.controllers,MSCLController.new Comparator() {...},16,0,0,0,2,0,2,0,2,0 @@ -55,19 +53,6 @@ AuScope-Portal-API,org.auscope.portal.server.web.controllers.sessonobject,String AuScope-Portal-API,org.auscope.portal.server.web.controllers.sessonobject,StringArrayToCustomRegistry,9,0,0,0,2,0,2,0,2,0 AuScope-Portal-API,org.auscope.portal.server.bookmark,BookMarkDownload,86,0,0,0,38,0,24,0,24,0 AuScope-Portal-API,org.auscope.portal.server.bookmark,BookMark,96,0,8,0,33,0,17,0,13,0 -AuScope-Portal-API,org.auscope.portal.mineraloccurrence,MineralOccurrenceNamespaceContext,0,69,0,0,0,13,0,1,0,1 -AuScope-Portal-API,org.auscope.portal.mineraloccurrence,Commodity,54,118,4,0,13,30,3,4,1,4 -AuScope-Portal-API,org.auscope.portal.mineraloccurrence,MineralOccurrenceFilter,137,395,35,63,27,85,33,26,1,8 -AuScope-Portal-API,org.auscope.portal.mineraloccurrence,MinOccurViewFilter,24,73,4,12,4,12,5,6,1,2 -AuScope-Portal-API,org.auscope.portal.mineraloccurrence,MineralOccurrenceFilter.MeasureTypes,0,33,0,0,0,2,0,1,0,1 -AuScope-Portal-API,org.auscope.portal.mineraloccurrence,CommodityFilter,40,0,2,0,9,0,4,0,3,0 -AuScope-Portal-API,org.auscope.portal.mineraloccurrence,MineralTenementCCFilter,36,0,8,0,8,0,6,0,2,0 -AuScope-Portal-API,org.auscope.portal.mineraloccurrence,MineFilter,43,29,6,4,8,7,5,3,1,2 -AuScope-Portal-API,org.auscope.portal.mineraloccurrence,MiningActivityFilter,19,157,1,13,4,42,2,9,1,3 -AuScope-Portal-API,org.auscope.portal.mineraloccurrence,CommodityVocabMethodMaker,45,0,0,0,8,0,3,0,3,0 -AuScope-Portal-API,org.auscope.portal.mineraloccurrence,MineralTenementFilter,24,86,2,4,4,16,3,4,1,3 -AuScope-Portal-API,org.auscope.portal.mineraloccurrence,Mine,122,84,8,2,31,18,7,3,2,3 -AuScope-Portal-API,org.auscope.portal.mineraloccurrence,MineralOccurrence,10,141,1,5,4,37,1,7,0,5 AuScope-Portal-API,org.auscope.portal.server.web.service,PortalUserService,69,0,4,0,19,0,9,0,7,0 AuScope-Portal-API,org.auscope.portal.server.web.service,PortalUserDetailsService,160,0,14,0,39,0,12,0,5,0 AuScope-Portal-API,org.auscope.portal.server.web.service,ErmlVocabService,30,101,4,10,9,29,4,6,1,2 @@ -76,17 +61,16 @@ AuScope-Portal-API,org.auscope.portal.server.web.service,LintResult,37,0,0,0,14, AuScope-Portal-API,org.auscope.portal.server.web.service,RemanentAnomaliesAutoSearchService,27,0,2,0,9,0,4,0,3,0 AuScope-Portal-API,org.auscope.portal.server.web.service,MineralOccurrenceService,71,0,2,0,15,0,7,0,6,0 AuScope-Portal-API,org.auscope.portal.server.web.service,NVCL2_0_DataService,734,1032,68,66,138,195,53,35,11,10 -AuScope-Portal-API,org.auscope.portal.server.web.service,BoreholeService,560,264,23,15,127,53,21,11,7,6 AuScope-Portal-API,org.auscope.portal.server.web.service,NVCLDataService,457,269,46,16,96,64,34,9,7,5 +AuScope-Portal-API,org.auscope.portal.server.web.service,BoreholeService,560,264,23,15,127,53,21,11,7,6 AuScope-Portal-API,org.auscope.portal.server.web.service,RemanentAnomaliesService,38,0,2,0,9,0,4,0,3,0 AuScope-Portal-API,org.auscope.portal.server.web.service,NVCLDataService.DatasetCollection,6,0,0,0,1,0,1,0,1,0 AuScope-Portal-API,org.auscope.portal.server.web.service,LintResult.Location,15,0,0,0,6,0,3,0,3,0 AuScope-Portal-API,org.auscope.portal.server.web.service,LintResult.Severity,15,0,0,0,3,0,1,0,1,0 AuScope-Portal-API,org.auscope.portal.server.web.service,NVCLDataService.Dataset,6,0,0,0,1,0,1,0,1,0 -AuScope-Portal-API,org.auscope.portal.server.web.service,SimpleFeatureProperty,24,39,0,0,12,14,6,7,6,7 +AuScope-Portal-API,org.auscope.portal.server.web.service,SimpleFeatureProperty,63,0,0,0,26,0,13,0,13,0 AuScope-Portal-API,org.auscope.portal.server.web.service,PortalParamsService,22,0,0,0,6,0,4,0,4,0 AuScope-Portal-API,org.auscope.portal.server.web.service,SF0BoreholeService,43,53,0,2,8,10,4,3,4,2 -AuScope-Portal-API,org.auscope.portal.server.web.service,SimpleWfsService,76,103,4,2,16,22,5,3,3,2 AuScope-Portal-API,org.auscope.portal.server.web.service,GeologicalProvincesService,29,0,2,0,9,0,4,0,3,0 AuScope-Portal-API,org.auscope.portal.server.web.service,PortalStateService,27,0,0,0,7,0,5,0,5,0 AuScope-Portal-API,org.auscope.portal.server.web.service,GenericService,28,0,2,0,9,0,4,0,3,0 @@ -95,17 +79,30 @@ AuScope-Portal-API,org.auscope.portal.server.web.service,BookMarkService,41,0,0, AuScope-Portal-API,org.auscope.portal.server.web.service,GenericFilter2,50,0,0,0,8,0,3,0,3,0 AuScope-Portal-API,org.auscope.portal.server.web.service,AuScopeWMSService,180,0,18,0,34,0,11,0,2,0 AuScope-Portal-API,org.auscope.portal.server.web.service,BoreholeService.Mark,56,0,0,0,11,0,3,0,3,0 +AuScope-Portal-API,org.auscope.portal.mineraloccurrence,MineralOccurrenceNamespaceContext,0,69,0,0,0,13,0,1,0,1 +AuScope-Portal-API,org.auscope.portal.mineraloccurrence,Commodity,54,118,4,0,13,30,3,4,1,4 +AuScope-Portal-API,org.auscope.portal.mineraloccurrence,MineralOccurrenceFilter,137,395,35,63,27,85,33,26,1,8 +AuScope-Portal-API,org.auscope.portal.mineraloccurrence,MinOccurViewFilter,24,73,4,12,4,12,5,6,1,2 +AuScope-Portal-API,org.auscope.portal.mineraloccurrence,MineralOccurrenceFilter.MeasureTypes,0,33,0,0,0,2,0,1,0,1 +AuScope-Portal-API,org.auscope.portal.mineraloccurrence,CommodityFilter,40,0,2,0,9,0,4,0,3,0 +AuScope-Portal-API,org.auscope.portal.mineraloccurrence,MineralTenementCCFilter,36,0,8,0,8,0,6,0,2,0 +AuScope-Portal-API,org.auscope.portal.mineraloccurrence,MineFilter,43,29,6,4,8,7,5,3,1,2 +AuScope-Portal-API,org.auscope.portal.mineraloccurrence,MiningActivityFilter,19,157,1,13,4,42,2,9,1,3 +AuScope-Portal-API,org.auscope.portal.mineraloccurrence,CommodityVocabMethodMaker,45,0,0,0,8,0,3,0,3,0 +AuScope-Portal-API,org.auscope.portal.mineraloccurrence,MineralTenementFilter,24,86,2,4,4,16,3,4,1,3 +AuScope-Portal-API,org.auscope.portal.mineraloccurrence,Mine,122,84,8,2,31,18,7,3,2,3 +AuScope-Portal-API,org.auscope.portal.mineraloccurrence,MineralOccurrence,10,141,1,5,4,37,1,7,0,5 AuScope-Portal-API,org.auscope.portal.server.web.service.download,MineralOccurrenceDownloadService,19,0,2,0,7,0,3,0,2,0 AuScope-Portal-API,org.auscope.portal.server.config,ExtraVocabularies,111,0,0,0,13,0,13,0,13,0 AuScope-Portal-API,org.auscope.portal.server.config,LayerFactory.mandRec,16,0,0,0,3,0,1,0,1,0 AuScope-Portal-API,org.auscope.portal.server.config,AppContext.new Runnable() {...},18,0,2,0,3,0,3,0,2,0 -AuScope-Portal-API,org.auscope.portal.server.config,AppContext,601,0,2,0,109,0,48,0,47,0 -AuScope-Portal-API,org.auscope.portal.server.config,LayerFactory,1722,0,152,0,411,0,127,0,40,0 +AuScope-Portal-API,org.auscope.portal.server.config,AppContext,567,0,2,0,105,0,46,0,45,0 +AuScope-Portal-API,org.auscope.portal.server.config,LayerFactory,1693,0,152,0,404,0,127,0,40,0 AuScope-Portal-API,org.auscope.portal.server.config,LayerFactory.wfsRec,16,0,0,0,3,0,1,0,1,0 AuScope-Portal-API,org.auscope.portal.server.config,ProfilePortalTest,79,0,2,0,18,0,5,0,4,0 AuScope-Portal-API,org.auscope.portal.server.config,ElasticsearchConfig,65,0,2,0,18,0,4,0,3,0 -AuScope-Portal-API,org.auscope.portal.server.config,ProfilePortalProduction,79,0,2,0,18,0,5,0,4,0 AuScope-Portal-API,org.auscope.portal.server.config,LayerFactory.filterCtl,6,0,0,0,1,0,1,0,1,0 +AuScope-Portal-API,org.auscope.portal.server.config,ProfilePortalProduction,79,0,2,0,18,0,5,0,4,0 AuScope-Portal-API,org.auscope.portal.server.config,AuscopeRegistries,18,0,0,0,6,0,4,0,4,0 AuScope-Portal-API,org.auscope.portal.server.config,ConversionConfig,29,0,0,0,9,0,3,0,3,0 AuScope-Portal-API,org.auscope.portal.server.config,LayerFactory.selRec,16,0,0,0,3,0,1,0,1,0 @@ -146,13 +143,13 @@ AuScope-Portal-API,org.auscope.portal.server.domain.nvcldataservice,TrayThumbNai AuScope-Portal-API,org.auscope.portal.server.domain.nvcldataservice,GetDatasetCollectionResponse,12,21,0,0,6,8,3,4,3,4 AuScope-Portal-API,org.auscope.portal.server.domain.nvcldataservice,AlgorithmVersion,11,15,0,0,6,6,3,3,3,3 AuScope-Portal-API,org.auscope.portal.server.domain.nvcldataservice,GetLogCollectionResponse,12,21,0,0,6,8,3,4,3,4 -AuScope-Portal-API,org.auscope.portal.server.domain.nvcldataservice,ImageTrayDepthResponse,33,0,0,0,14,0,7,0,7,0 AuScope-Portal-API,org.auscope.portal.server.domain.nvcldataservice,CSVDownloadResponse,5,0,0,0,2,0,1,0,1,0 +AuScope-Portal-API,org.auscope.portal.server.domain.nvcldataservice,ImageTrayDepthResponse,33,0,0,0,14,0,7,0,7,0 AuScope-Portal-API,org.auscope.portal.server.domain.nvcldataservice,AlgorithmOutputClassification,15,21,0,0,8,8,4,4,4,4 AuScope-Portal-API,org.auscope.portal.server.domain.nvcldataservice,AlgorithmOutputResponse,19,27,0,0,10,10,5,5,5,5 AuScope-Portal-API,org.auscope.portal.server.domain.nvcldataservice,TSGStatusResponse,5,0,0,0,2,0,1,0,1,0 -AuScope-Portal-API,org.auscope.portal.server.domain.nvcldataservice,BinnedCSVResponse,3,14,0,0,1,6,1,4,1,4 AuScope-Portal-API,org.auscope.portal.server.domain.nvcldataservice,AnalyticalJobStatus,18,55,0,0,6,26,6,15,6,15 +AuScope-Portal-API,org.auscope.portal.server.domain.nvcldataservice,BinnedCSVResponse,3,14,0,0,1,6,1,4,1,4 AuScope-Portal-API,org.auscope.portal.server.web.security.aaf,UnixTimestampDeserializer,28,0,0,0,7,0,2,0,2,0 AuScope-Portal-API,org.auscope.portal.server.web.security.aaf,AAFAuthenticationToken,29,0,2,0,12,0,6,0,5,0 AuScope-Portal-API,org.auscope.portal.server.web.security.aaf,AAFAuthenticationRedirect,7,0,0,0,2,0,2,0,2,0 diff --git a/.github/coverage/percentage.txt b/.github/coverage/percentage.txt index b90e43c0f..9c84dda0a 100644 --- a/.github/coverage/percentage.txt +++ b/.github/coverage/percentage.txt @@ -1 +1 @@ -25.4086 +24.811 diff --git a/pom.xml b/pom.xml index 9851925c3..891d8a5ce 100644 --- a/pom.xml +++ b/pom.xml @@ -154,12 +154,6 @@ - - com.jhlabs - javaproj - 1.0 - - org.hsqldb @@ -270,7 +264,6 @@ org.springframework.boot spring-boot-maven-plugin - false 17.* diff --git a/src/main/java/org/auscope/portal/server/config/AppContext.java b/src/main/java/org/auscope/portal/server/config/AppContext.java index 3e0193831..a541a16cb 100755 --- a/src/main/java/org/auscope/portal/server/config/AppContext.java +++ b/src/main/java/org/auscope/portal/server/config/AppContext.java @@ -28,7 +28,6 @@ import org.auscope.portal.core.services.VocabularyCacheService; import org.auscope.portal.core.services.VocabularyFilterService; import org.auscope.portal.core.services.WCSService; -import org.auscope.portal.core.services.WFSGml32Service; import org.auscope.portal.core.services.WFSService; import org.auscope.portal.core.services.WMSService; import org.auscope.portal.core.services.csw.CSWServiceItem; @@ -54,7 +53,6 @@ import org.auscope.portal.mscl.MSCLWFSService; import org.auscope.portal.server.web.CatalogServicesHealthIndicator; import org.auscope.portal.server.web.SearchHttpServiceCaller; -import org.auscope.portal.server.web.service.SimpleWfsService; import org.auscope.portal.server.web.service.monitor.KnownLayerStatusMonitor; import org.quartz.Trigger; import org.springframework.beans.factory.annotation.Autowired; @@ -139,19 +137,6 @@ public WFSService wfsService() { return new WFSService(httpServiceCallerApp(), methodMaker(), new GmlToHtml()); } - @Bean - public WFSGml32Service wfsGml32Service() { - WFSGetFeatureMethodMaker methodMaker = new WFSGetFeatureMethodMaker(); - // give it a ERML 2.0 namespace context - methodMaker.setNamespaces(new ErmlNamespaceContext("2.0")); - // HttpServiceCaller will ignore SSL errors if the test profile is active (locally signed SSL certs) - return new WFSGml32Service(new HttpServiceCaller(900000, activeProfile.contains("test")), - methodMaker, - // can instantiate with a different XSLT for GML 32 mapping? - new GmlToHtml() - ); - } - /*** * Returns a factory to create jobs that update the OpenStack service status * for known layer services @@ -309,11 +294,6 @@ public WFSGetFeatureMethodMaker wfsMethodMaker() { @Autowired VocabularyServiceItem vocabularyGeologicTimescales; - @Bean - public SimpleWfsService simpleWfsService() { - return new SimpleWfsService(httpServiceCallerApp(), wfsMethodMaker()); - } - @Autowired VocabularyServiceItem vocabularyCommodities; diff --git a/src/main/java/org/auscope/portal/server/config/LayerFactory.java b/src/main/java/org/auscope/portal/server/config/LayerFactory.java index bc2847e8c..44d253881 100644 --- a/src/main/java/org/auscope/portal/server/config/LayerFactory.java +++ b/src/main/java/org/auscope/portal/server/config/LayerFactory.java @@ -302,7 +302,6 @@ KnownLayer annotateLayer(String id) { case "initialBBox": { JSONArray bboxGeoJson = new JSONArray(); - ArrayList x2 = (ArrayList) v1; ArrayList x3 = (ArrayList) ((ArrayList) v1).get(0); int len = x3.size(); if (len == 4) { @@ -564,9 +563,6 @@ else if (cswKey.startsWith("serviceNames")) { if (sk2.startsWith("options")) { ArrayList x2 = (ArrayList) sv2; x2.forEach((item) -> { - ArrayList x3 = (ArrayList) item; - String i1 = (String) x3.get(0); - String i2 = (String) x3.get(1); filter.selectlist.options.add(item); }); } @@ -585,9 +581,6 @@ else if (cswKey.startsWith("serviceNames")) { if (sk2.startsWith("options")) { ArrayList x2 = (ArrayList) sv2; x2.forEach((item) -> { - ArrayList x3 = (ArrayList) item; - String i1 = (String) x3.get(0); - String i2 = (String) x3.get(1); filter.mandatorylist.options.add(item); }); } diff --git a/src/main/java/org/auscope/portal/server/web/controllers/CustomKMLController.java b/src/main/java/org/auscope/portal/server/web/controllers/CustomKMLController.java deleted file mode 100644 index a2cdc0d4d..000000000 --- a/src/main/java/org/auscope/portal/server/web/controllers/CustomKMLController.java +++ /dev/null @@ -1,101 +0,0 @@ -package org.auscope.portal.server.web.controllers; - -import java.io.IOException; -import java.net.URI; -import java.nio.charset.StandardCharsets; - -import jakarta.servlet.http.HttpServletResponse; - -import org.apache.commons.io.IOUtils; -import org.auscope.portal.core.server.controllers.BasePortalController; -import org.auscope.portal.core.server.http.download.DownloadResponse; -import org.auscope.portal.core.server.http.download.FileDownloadService; -import org.auscope.portal.core.server.http.download.FileUploadBean; -import org.auscope.portal.core.util.MimeUtil; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.validation.BindingResult; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.multipart.MultipartFile; -import org.springframework.web.servlet.ModelAndView; - -import com.google.gson.Gson; - -/* - * Controller enables loading of KML layers onto map - */ - -@Controller -public class CustomKMLController extends BasePortalController { - FileDownloadService fileDownloadService; - - @Autowired - public CustomKMLController(FileDownloadService fileDownloadService) { - this.fileDownloadService = fileDownloadService; - } - - /** - * Parses the given KML file content - * - * @return KML data which can be loaded as a layer - * @throws Exception - */ - @RequestMapping("/addKMLLayer.do") - public @ResponseBody String addKMLLayer(FileUploadBean uploadItem, BindingResult result, - HttpServletResponse response) { - try { - MultipartFile file = uploadItem.getFile(); - ModelMap model = new ModelMap(); - model.put("success", true); - model.put("file", IOUtils.toString(file.getInputStream(), StandardCharsets.UTF_8)); - model.put("name", file.getOriginalFilename()); - return new Gson().toJson(model); - } catch (Exception e) { - ModelMap model = new ModelMap(); - model.put("success", false); - return new Gson().toJson(model); - } - } - - /** - * Retrieves KML from the given URL - * - * @param url - * URL of KML file to be retrieved - * @return KML data which can be loaded as a layer - * @throws Exception - */ - @RequestMapping("/addKMLUrl.do") - public ModelAndView addKMLUrl( - @RequestParam("url") String url, - HttpServletResponse response) throws IOException { - - try { - - DownloadResponse dlRes = this.fileDownloadService.singleFileDownloadFromURL(url); - - URI uri = new URI(url); - String fileExtension = MimeUtil.mimeToFileExtension(dlRes.getContentType()); - if (fileExtension != null && !fileExtension.isEmpty()) { - fileExtension = "." + fileExtension; - } - - ModelMap model = new ModelMap(); - model.put("success", true); - model.put("file", IOUtils.toString(dlRes.getResponseAsStream(), StandardCharsets.UTF_8)); - model.put("name", uri.getHost() + fileExtension); - - return generateJSONResponseMAV(true, model, "success"); - - } catch (Exception e) { - log.warn(String.format("Error performing filter for '%1$s': %2$s", url, e)); - log.debug("Exception: ", e); - return generateJSONResponseMAV(false, null, e.getMessage()); - - } - - } -} diff --git a/src/main/java/org/auscope/portal/server/web/controllers/GenericController.java b/src/main/java/org/auscope/portal/server/web/controllers/GenericController.java index 4b4546df8..601ad1c5a 100644 --- a/src/main/java/org/auscope/portal/server/web/controllers/GenericController.java +++ b/src/main/java/org/auscope/portal/server/web/controllers/GenericController.java @@ -26,41 +26,7 @@ public class GenericController extends BasePortalController { public GenericController(GenericService genericService) { this.genericService = genericService; } - /** - * Handles getting the filter of the generic borehole queries. (If the bbox elements are specified, they will limit the output response to 200 records - * implicitly) - * - * @param bbox - * @param optionalFilters - * @throws Exception - */ - @RequestMapping("/doGenericFilter.do") - public void doGenericFilter( - HttpServletResponse response, - @RequestParam(required = false, value = "bbox") String bboxJson, - @RequestParam(required = true, value = "optionalFilters") String optionalFilters) - - throws Exception { - FilterBoundingBox bbox = FilterBoundingBox.attemptParseFromJSON(bboxJson); - response.setContentType("text/xml"); - String filter = ""; - if (optionalFilters != null) { - filter = this.genericService.getFilter(bbox,optionalFilters); - filter = filter.replace("",""); - - //DOCUMENT_SPEC_ID*PR4535* - // remove matchCase from propertyIsLike because getFeature don't like it. - filter = filter.replace("PropertyIsLike escapeChar=\"!\" singleChar=\"#\" matchCase=\"false\"","PropertyIsLike escapeChar=\"!\" singleChar=\"#\" "); - } - ByteArrayInputStream styleStream = new ByteArrayInputStream(filter.getBytes()); - OutputStream outputStream = response.getOutputStream(); - - FileIOUtil.writeInputToOutputStream(styleStream, outputStream, 1024, false); - - styleStream.close(); - outputStream.close(); - } /** * Handles getting the style of the generic borehole filter queries. (If the bbox elements are specified, they will limit the output response to 200 records * implicitly) @@ -118,7 +84,7 @@ public void doGenericFilterStyle( * @param styleColor 1-1 correspondance with filters - The CSS color for each filter to be symbolised with * @return */ - public String getStyle(String filter, String layerName, String spatialPropertyName, String styleType, String styleColor) { + private String getStyle(String filter, String layerName, String spatialPropertyName, String styleType, String styleColor) { String header = "" + "" + "" + layerName + "" + "" + "portal-style" + ""; @@ -158,7 +124,7 @@ public String getStyle(String filter, String layerName, String spatialPropertyNa * @param styleColor 1-1 correspondance with filters - The CSS color for each filter to be symbolised with * @return */ - public String getStyleWithLabel(String filter, String layerName, String spatialPropertyName, String styleType, String styleColor, String labelProperty) { + private String getStyleWithLabel(String filter, String layerName, String spatialPropertyName, String styleType, String styleColor, String labelProperty) { String header = "" + "" + "" + layerName + "" + "" + "portal-style" + ""; diff --git a/src/main/java/org/auscope/portal/server/web/controllers/MSCLController.java b/src/main/java/org/auscope/portal/server/web/controllers/MSCLController.java index 9132521c5..85b0eb4c2 100644 --- a/src/main/java/org/auscope/portal/server/web/controllers/MSCLController.java +++ b/src/main/java/org/auscope/portal/server/web/controllers/MSCLController.java @@ -57,38 +57,6 @@ public class MSCLController extends BasePortalController { public MSCLController(MSCLWFSService msclWfsService) { this.msclWfsService = msclWfsService; } - - /** - * Retrieves MCSL observations in JSON format - * - * @param serviceUrl - * The URL of the WFS's endpoint. It should be of the form: http://{domain}:{port}/{path}/wfs - * @param featureType - * The name of the feature type you wish to request (including its prefix if necessary). - * @param featureId - * The ID of the feature you want to return. - * @return A ModelAndView object encapsulating the WFS response along with an indicator of success or failure. - * @throws Exception - */ - @RequestMapping("/getMsclObservations.do") - public ModelAndView getMsclObservations( - @RequestParam("serviceUrl") final String serviceUrl, - @RequestParam("typeName") final String featureType, - @RequestParam("featureId") final String featureId) { - - try { - String wfsResponse = msclWfsService.getWFSReponse(serviceUrl, - featureType, featureId); - - // I have to wrap this response in a 'gml' JSON tag in order - // to keep the "Download Feature" part happy. - ModelMap data = new ModelMap(); - data.put("gml", wfsResponse); - return generateJSONResponseMAV(true, data, null); - } catch (Exception e) { - return generateJSONResponseMAV(false, null, e.getMessage()); - } - } /** * Retrieves MCSL observations in JSON format for use in a graph diff --git a/src/main/java/org/auscope/portal/server/web/controllers/NVCLController.java b/src/main/java/org/auscope/portal/server/web/controllers/NVCLController.java index ef77c41b6..0cf9f2098 100644 --- a/src/main/java/org/auscope/portal/server/web/controllers/NVCLController.java +++ b/src/main/java/org/auscope/portal/server/web/controllers/NVCLController.java @@ -7,8 +7,6 @@ import java.net.URL; import java.util.Arrays; import java.util.List; -import java.util.zip.ZipEntry; -import java.util.zip.ZipOutputStream; import java.nio.charset.StandardCharsets; import jakarta.servlet.ServletException; @@ -18,8 +16,6 @@ import org.apache.http.HttpStatus; import org.apache.commons.io.IOUtils; -import org.apache.commons.lang3.ArrayUtils; -import org.apache.commons.lang3.StringUtils; import org.auscope.portal.core.server.controllers.BasePortalController; import org.auscope.portal.core.services.CSWCacheService; import org.auscope.portal.core.services.csw.CSWRecordsHostFilter; @@ -30,8 +26,6 @@ import org.auscope.portal.server.domain.nvcldataservice.AbstractStreamResponse; import org.auscope.portal.server.domain.nvcldataservice.AlgorithmOutputClassification; import org.auscope.portal.server.domain.nvcldataservice.AlgorithmOutputResponse; -import org.auscope.portal.server.domain.nvcldataservice.AnalyticalJobResults; -import org.auscope.portal.server.domain.nvcldataservice.AnalyticalJobStatus; import org.auscope.portal.server.domain.nvcldataservice.BinnedCSVResponse; import org.auscope.portal.server.domain.nvcldataservice.CSVDownloadResponse; import org.auscope.portal.server.domain.nvcldataservice.GetDatasetCollectionResponse; @@ -44,7 +38,6 @@ import org.auscope.portal.server.web.service.BoreholeService; import org.auscope.portal.server.web.service.NVCL2_0_DataService; import org.auscope.portal.server.web.service.NVCLDataService; -import org.auscope.portal.server.web.service.SF0BoreholeService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -72,7 +65,6 @@ public class NVCLController extends BasePortalController { private NVCLDataService dataService; private NVCL2_0_DataService dataService2_0; private CSWCacheService cswService; - private SF0BoreholeService sf0BoreholeService; private HttpServiceCaller serviceCaller; private ServiceConfiguration serviceConfiguration; @@ -84,7 +76,6 @@ public NVCLController(BoreholeService boreholeService, CSWCacheService cswService, NVCLDataService dataService, NVCL2_0_DataService dataService2_0, - SF0BoreholeService sf0BoreholeService, HttpServiceCaller serviceCaller, ServiceConfiguration serviceConfiguration) { @@ -92,7 +83,6 @@ public NVCLController(BoreholeService boreholeService, this.cswService = cswService; this.dataService = dataService; this.dataService2_0 = dataService2_0; - this.sf0BoreholeService = sf0BoreholeService; this.serviceCaller = serviceCaller; this.serviceConfiguration = serviceConfiguration; } @@ -642,185 +632,6 @@ public ModelAndView getNVCLWFSDownloadStatus( } } - /** - * Submits an NVCL processing job to the remote analytical services - * - * @return - * @throws Exception - */ - @RequestMapping("/submitSF0NVCLProcessingJob.do") - public ModelAndView submitSF0NVCLProcessingJob( - @RequestParam("email") String email, - @RequestParam("jobName") String jobName, - - @RequestParam("wfsUrl") String[] wfsUrls, - - @RequestParam(required = false, value = "boreholeName", defaultValue = "") String boreholeName, - @RequestParam(required = false, value = "dateOfDrillingStart", defaultValue = "") String dateOfDrillingStart, - @RequestParam(required = false, value = "dateOfDrillingEnd", defaultValue = "") String dateOfDrillingEnd, - @RequestParam(required = false, value = "bbox") String bboxJson, - - @RequestParam(required = false, value = "algorithmOutputId") String[] algorithmOutputIds, - @RequestParam(required = false, value = "logName") String logName, - - @RequestParam(required = false, value = "classification") String classification, - @RequestParam(required = false, value = "ogcFilter") String ogcFilter, - - @RequestParam("startDepth") int startDepth, - @RequestParam("endDepth") int endDepth, - @RequestParam("operator") String operator, - @RequestParam("value") String value, - @RequestParam("units") String units, - @RequestParam("span") int span) - throws Exception { - - - if ((ArrayUtils.isEmpty(algorithmOutputIds) && StringUtils.isEmpty(logName)) || - ArrayUtils.isNotEmpty(algorithmOutputIds) && StringUtils.isNotEmpty(logName)) { - return generateJSONResponseMAV(false, null, "Must define exactly one of algorithmOutputId or logName"); - } - - FilterBoundingBox bbox = FilterBoundingBox.attemptParseFromJSON(bboxJson); - if (StringUtils.isEmpty(ogcFilter)) { - ogcFilter = sf0BoreholeService.getFilter(boreholeName, "", dateOfDrillingStart, dateOfDrillingEnd, -1, bbox, null, true,null); - } - - try { - boolean result = this.dataService2_0.submitProcessingJob(email, jobName, wfsUrls, ogcFilter, algorithmOutputIds, logName, classification, startDepth, endDepth, operator, value, units, span); - return generateJSONResponseMAV(result); - } catch (Exception ex) { - log.error("Unable to submit processing job: " + ex.getMessage()); - log.debug("Exception: ", ex); - return generateJSONResponseMAV(false); - } - } - - /** - * Submits an NVCL processing TsgJob to the remote analytical services - * - * @return - * @throws Exception - */ - @RequestMapping("/submitSF0NVCLProcessingTsgJob.do") - public ModelAndView submitSF0NVCLProcessingTsgJob( - @RequestParam("email") String email, - @RequestParam("jobName") String jobName, - - @RequestParam("wfsUrl") String[] wfsUrls, - - @RequestParam(required = false, value = "boreholeName", defaultValue = "") String boreholeName, - @RequestParam(required = false, value = "dateOfDrillingStart", defaultValue = "") String dateOfDrillingStart, - @RequestParam(required = false, value = "dateOfDrillingEnd", defaultValue = "") String dateOfDrillingEnd, - @RequestParam(required = false, value = "bbox") String bboxJson, - @RequestParam(required = false, value = "tsgAlgName") String tsgAlgName, - @RequestParam(required = false, value = "tsgAlgorithm") String tsgAlgorithm, - @RequestParam(required = false, value = "ogcFilter") String ogcFilter, - - @RequestParam("startDepth") int startDepth, - @RequestParam("endDepth") int endDepth, - @RequestParam("operator") String operator, - @RequestParam("value") String value, - @RequestParam("units") String units, - @RequestParam("span") int span) - throws Exception { - - - if ((StringUtils.isEmpty(tsgAlgorithm))) { - return generateJSONResponseMAV(false, null, "Must define tsgAlgorithm"); - } - - FilterBoundingBox bbox = FilterBoundingBox.attemptParseFromJSON(bboxJson); - if (StringUtils.isEmpty(ogcFilter)) { - ogcFilter = sf0BoreholeService.getFilter(boreholeName, "", dateOfDrillingStart, dateOfDrillingEnd, -1, bbox, null, true,null); - } - try { - boolean result = this.dataService2_0.submitProcessingTsgJob(email, jobName, wfsUrls, ogcFilter, tsgAlgName, tsgAlgorithm, startDepth, endDepth, operator, value, units, span); - return generateJSONResponseMAV(result); - } catch (Exception ex) { - log.error("Unable to submit processing job: " + ex.getMessage()); - log.debug("Exception: ", ex); - return generateJSONResponseMAV(false); - } - } - - /** - * Returns an array of JSON AnalyticalJobStatus objects describing job status responses for a given email - * @param email - * @return - */ - @RequestMapping("/checkNVCLProcessingJob.do") - public ModelAndView checkNVCLProcessingJob(@RequestParam("email") String email) { - try { - List statuses = this.dataService2_0.checkProcessingJobs(email); - return generateJSONResponseMAV(true, statuses, ""); - } catch (Exception ex) { - log.error("Unable to check NVCL processing jobs: " + ex.getMessage()); - log.debug("Exception: ", ex); - return generateJSONResponseMAV(false); - } - } - - /** - * Returns an object containing passing, failing and erroring borehole ID's for a given processing job - * @param jobid - * requested job id - * @return - */ - @RequestMapping("/getNVCLProcessingResults.do") - public ModelAndView getNVCLProcessingResults(@RequestParam("jobId") String jobId) { - try { - AnalyticalJobResults results = this.dataService2_0.getProcessingResults(jobId); - return generateJSONResponseMAV(true, Arrays.asList(results), ""); - } catch (Exception ex) { - log.error("Unable to check NVCL processing jobs: " + ex.getMessage()); - log.debug("Exception: ", ex); - return generateJSONResponseMAV(false); - } - } - - - /** - * Downloads results of NVCL processing job - * @param jobId - * job id NVCL processing job - * @param returns results as a byte stream encoded in zip format, containing csv files - * @throws Exception - */ - @RequestMapping("/downloadNVCLProcessingResults.do") - public void downloadNVCLProcessingResults(@RequestParam("jobId") String jobId, HttpServletResponse response) throws Exception { - AnalyticalJobResults results = this.dataService2_0.getProcessingResults(jobId); - - response.setContentType("application/zip"); - response.setHeader("Content-Disposition","inline; filename=nvclanalytics-" + jobId + ".zip;"); - ZipOutputStream zout = new ZipOutputStream(response.getOutputStream()); - - try{ - zout.putNextEntry(new ZipEntry("passIds.csv")); - for (String id : results.getPassBoreholes()) { - zout.write((id + '\n').getBytes()); - } - zout.closeEntry(); - - zout.putNextEntry(new ZipEntry("failIds.csv")); - for (String id : results.getFailBoreholes()) { - zout.write((id + '\n').getBytes()); - } - zout.closeEntry(); - - zout.putNextEntry(new ZipEntry("errorIds.csv")); - for (String id : results.getErrorBoreholes()) { - zout.write((id + '\n').getBytes()); - } - zout.closeEntry(); - - zout.finish(); - zout.flush(); - } finally { - zout.close(); - } - } - - /** * Requests the image tray depth from NVCL services * diff --git a/src/main/java/org/auscope/portal/server/web/controllers/ReprojectionController.java b/src/main/java/org/auscope/portal/server/web/controllers/ReprojectionController.java deleted file mode 100644 index de7927ee2..000000000 --- a/src/main/java/org/auscope/portal/server/web/controllers/ReprojectionController.java +++ /dev/null @@ -1,137 +0,0 @@ -package org.auscope.portal.server.web.controllers; - -import java.awt.geom.Rectangle2D; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.auscope.portal.core.server.controllers.BasePortalController; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.servlet.ModelAndView; - -import com.jhlabs.map.proj.Projection; -import com.jhlabs.map.proj.ProjectionFactory; - -/** - * Controller for performing simplistic BBox reprojection - * @author Josh Vote - * - */ -@Controller -public class ReprojectionController extends BasePortalController { - protected final Log logger = LogFactory.getLog(getClass()); - - public ReprojectionController() { - - } - - /** - * Utility for calculating the best Mga zone for a given point - * (Inherited from VEGL - should be revised) - */ - private int calculateIdealMgaZone(double northBoundLatitude, double southBoundLatitude, double eastBoundLongitude, double westBoundLongitude) { - double lngDiff = eastBoundLongitude - westBoundLongitude; - double lngCenter = westBoundLongitude + (lngDiff/2); - double latDiff = northBoundLatitude - southBoundLatitude; - double latCenter = southBoundLatitude + (latDiff/2); - - return calculateIdealMgaZone(latCenter, lngCenter); - } - - /** - * Utility for calculating the best Mga zone for a given point - * (Inherited from VEGL - should be revised) - */ - private int calculateIdealMgaZone(double latitude, double longitude) { - if (longitude >= 108 && longitude < 114){ - return 49; - } else if (longitude >= 114 && longitude < 120){ - return 50; - } else if (longitude >= 120 && longitude < 126){ - return 51; - } else if (longitude >= 126 && longitude < 132){ - return 52; - } else if (longitude >= 132 && longitude < 138){ - return 53; - } else if (longitude >= 138 && longitude < 144){ - return 54; - } else if (longitude >= 144 && longitude < 150){ - return 55; - } else if (longitude >= 150 && longitude < 156){ - return 56; - } - - logger.error("could not calculate MGA zone"); - return-1; - } - - /** - * Calculates the likely MGA zone that the user should use. This zone is determined by finding what zone - * the center of the selected region is in. - * @return - */ - @RequestMapping("/calculateMgaZoneForBBox.do") - public ModelAndView calculateMgaZoneForBBox(@RequestParam("northBoundLatitude") final double northBoundLatitude, - @RequestParam("southBoundLatitude") final double southBoundLatitude, - @RequestParam("eastBoundLongitude") final double eastBoundLongitude, - @RequestParam("westBoundLongitude") final double westBoundLongitude) { - - // calculate likely MGA zone - int mgaZone = calculateIdealMgaZone(northBoundLatitude, southBoundLatitude, eastBoundLongitude, westBoundLongitude); - if (mgaZone < 0) { - logger.error("could not calculate MGA zone"); - return generateJSONResponseMAV(false, null, "Could not calculate MGA zone"); - } - - return generateJSONResponseMAV(true, mgaZone, ""); - } - - /** - * Projects the lat/lng co-ordinates to UTM. If mga zone is not specified it will be estimated - * - * @return - * @throws Exception - */ - @RequestMapping("/projectBBoxToUtm.do") - public ModelAndView projectBBoxToUtm(@RequestParam("northBoundLatitude") double northBoundLatitude, - @RequestParam("southBoundLatitude") double southBoundLatitude, - @RequestParam("eastBoundLongitude") double eastBoundLongitude, - @RequestParam("westBoundLongitude") double westBoundLongitude, - @RequestParam(required=false, value="mgaZone") Integer mgaZone) { - - if (mgaZone == null) { - mgaZone = calculateIdealMgaZone(northBoundLatitude, southBoundLatitude, eastBoundLongitude, westBoundLongitude); - if (mgaZone < 0) { - logger.error("could not calculate MGA zone"); - return generateJSONResponseMAV(false, null, "Could not calculate MGA zone"); - } - } - - // create new projection object - Projection projection = ProjectionFactory.fromPROJ4Specification( - new String[] { - "+proj=utm", // Projection name - "+zone=" + mgaZone, //UTM zone - "+ellps=WGS84", // Ellipsoid name - "+x_0=500000", // False easting - "+y_0=10000000", // False northing - "+k_0=0.99960000" // Scaling factor (new name) - } - ); - - // project the selected region into appropriate UTM projection - Rectangle2D rect = new Rectangle2D.Double(eastBoundLongitude, southBoundLatitude, (westBoundLongitude - eastBoundLongitude), (northBoundLatitude - southBoundLatitude)); - Rectangle2D approxAreaMga = projection.transform(rect); - - // Calculate bounding box which fully encompasses this polygon - ModelMap data = new ModelMap(); - data.put("minNorthing", (int)Math.floor(approxAreaMga.getMinY())); - data.put("maxNorthing", (int)Math.ceil(approxAreaMga.getMaxY())); - data.put("minEasting", (int)Math.floor(approxAreaMga.getMinX())); - data.put("maxEasting", (int)Math.ceil(approxAreaMga.getMaxX())); - data.put("mgaZone", mgaZone); - return generateJSONResponseMAV(true, data, ""); - } -} diff --git a/src/main/java/org/auscope/portal/server/web/controllers/SF0BoreholeController.java b/src/main/java/org/auscope/portal/server/web/controllers/SF0BoreholeController.java index 0c6e5e443..c61d24ae0 100644 --- a/src/main/java/org/auscope/portal/server/web/controllers/SF0BoreholeController.java +++ b/src/main/java/org/auscope/portal/server/web/controllers/SF0BoreholeController.java @@ -116,6 +116,7 @@ public void doNVCLBoreholeViewCSVDownload(String serviceUrl,String typeName, filterString = filter; result = wfsService.downloadCSVByPolygonFilter(serviceUrl, typeName, filterString, maxFeatures); // LJ filtering out records of nvclCollection == false + @SuppressWarnings("unused") int totalReturnLine = nvclDataService.nvclCollectionFilter(result, outputStream); //System.out.print(totalReturnLine); } else { @@ -379,26 +380,4 @@ public void doFilterStyle( styleStream.close(); outputStream.close(); } - - /** - * NOT CURRENTLY USED - * This controller method is for forcing the internal cache of GsmlpNameSpaceTable to invalidate and update. - * - * @return - */ - /* - @RequestMapping("/updateGsmlpNSCache.do") - public ModelAndView updateGsmlpNSCache() throws Exception { - try { - if (gsmlpNameSpaceTable != null ) - gsmlpNameSpaceTable.clearCache(); - return generateJSONResponseMAV(true); - } catch (Exception e) { - log.warn(String.format("Error updating GsmlpNS cache: %1$s", e)); - log.debug("Exception:", e); - return generateJSONResponseMAV(false); - } - - } - */ } diff --git a/src/main/java/org/auscope/portal/server/web/controllers/VocabController.java b/src/main/java/org/auscope/portal/server/web/controllers/VocabController.java index bd453fa2c..59a1c69ab 100644 --- a/src/main/java/org/auscope/portal/server/web/controllers/VocabController.java +++ b/src/main/java/org/auscope/portal/server/web/controllers/VocabController.java @@ -18,7 +18,6 @@ import org.springframework.web.servlet.ModelAndView; import org.apache.jena.rdf.model.Property; -import org.apache.jena.rdf.model.RDFNode; import org.apache.jena.rdf.model.ResourceFactory; import org.apache.jena.rdf.model.Selector; import org.apache.jena.rdf.model.SimpleSelector; @@ -163,52 +162,6 @@ public ModelAndView getAllTimescales() { return getVocabularyMappings(vocabularyMappings); } - /** - * Queries the vocabulary service for a list of mineral tenement types - * - * @return vocublary mapping in JSON format - */ - @RequestMapping("getTenementTypes.do") - public ModelAndView getTenementTypes() { - String[] topConcepts = { - "http://resource.geoscience.gov.au/classifier/ggic/tenementtype/production", - "http://resource.geoscience.gov.au/classifier/ggic/tenementtype/exploration" - }; - - Selector[] selectors = new Selector[topConcepts.length]; - - for (int i = 0; i < topConcepts.length; i++) { - selectors[i] = new SimpleSelector(ResourceFactory.createResource(topConcepts[i]), null, (RDFNode) null); - } - - Map vocabularyMappings = this.vocabularyFilterService.getVocabularyById(TENEMENT_TYPE_VOCABULARY_ID, selectors); - - return getVocabularyMappings(vocabularyMappings); - } - - /** - * Queries the vocabulary service for a list of the different kinds of mineral tenement status - * - * @return vocublary mapping in JSON format - */ - @RequestMapping("getTenementStatuses.do") - public ModelAndView getTenementStatuses() { - String[] topConcepts = { - "http://resource.geoscience.gov.au/classifier/ggic/tenement-status/granted", - "http://resource.geoscience.gov.au/classifier/ggic/tenement-status/application" - }; - - Selector[] selectors = new Selector[topConcepts.length]; - - for (int i = 0; i < topConcepts.length; i++) { - selectors[i] = new SimpleSelector(ResourceFactory.createResource(topConcepts[i]), null, (RDFNode) null); - } - - Map vocabularyMappings = this.vocabularyFilterService.getVocabularyById(TENEMENT_STATUS_VOCABULARY_ID, selectors); - - return getVocabularyMappings(vocabularyMappings); - } - /** * @param vocabularyMappings * @return diff --git a/src/main/java/org/auscope/portal/server/web/service/SimpleWfsService.java b/src/main/java/org/auscope/portal/server/web/service/SimpleWfsService.java deleted file mode 100644 index 54472aea0..000000000 --- a/src/main/java/org/auscope/portal/server/web/service/SimpleWfsService.java +++ /dev/null @@ -1,148 +0,0 @@ -package org.auscope.portal.server.web.service; - -import java.net.URISyntaxException; -import java.util.ArrayList; -import java.util.List; - -import javax.xml.namespace.NamespaceContext; -import javax.xml.xpath.XPathConstants; -import javax.xml.xpath.XPathExpression; - -import org.apache.http.client.methods.HttpRequestBase; -import org.auscope.portal.core.server.http.HttpServiceCaller; -import org.auscope.portal.core.services.BaseWFSService; -import org.auscope.portal.core.services.PortalServiceException; -import org.auscope.portal.core.services.methodmakers.WFSGetFeatureMethodMaker; -import org.auscope.portal.core.services.methodmakers.WFSGetFeatureMethodMaker.ResultType; -import org.auscope.portal.core.services.methodmakers.filter.FilterBoundingBox; -import org.auscope.portal.core.services.namespaces.XsdNamespace; -import org.auscope.portal.core.services.responses.ows.OWSExceptionParser; -import org.auscope.portal.core.services.responses.wfs.WFSCountResponse; -import org.auscope.portal.core.util.DOMUtil; -import org.w3c.dom.Document; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - -/** - * Minimal implementation of the core BaseWFSService - * @author Josh Vote - * - */ -public class SimpleWfsService extends BaseWFSService { - - public SimpleWfsService(HttpServiceCaller httpServiceCaller, - WFSGetFeatureMethodMaker wfsMethodMaker) { - super(httpServiceCaller, wfsMethodMaker); - } - - /** - * Makes a WFS GetFeature request constrained by the specified parameters. Instead - * of returning the full response only the count of features will be returned. - * - * @param wfsUrl the web feature service url - * @param featureType the type name - * @param filterString A OGC filter string to constrain the request - * @param maxFeatures A maximum number of features to request - * @param srsName [Optional] the SRS to make the WFS request using - will use BaseWFSService.DEFAULT_SRS if unspecified - * @return - * @throws PortalServiceException - * @throws URISyntaxException - */ - public WFSCountResponse getWfsFeatureCount(String wfsUrl, String featureType, String filterString, Integer maxFeatures, String srsName) throws PortalServiceException, URISyntaxException { - HttpRequestBase method = generateWFSRequest(wfsUrl, featureType, null, filterString, maxFeatures, srsName, ResultType.Hits); - return getWfsFeatureCount(method); - } - - /** - * Gets the WFS GET URL for executing a GetFeature request with the specified parameters. Does NOT execute the request, - * only generates the URL for request execution - * @param wfsUrl The service endpoint to query - * @param featureType The feature type to request - * @param bbox [Optional] The bounds to constrain the request - * @param maxFeatures [Optional] an upper bound bound of features - * @param srsName [Optional] the SRS that the response should be encoded using - * @param outputFormat [Optional] The output format that the response should take - * @return - * @throws PortalServiceException - */ - public String getFeatureRequestAsString(String wfsUrl, String featureType, FilterBoundingBox bbox, Integer maxFeatures, String srsName, String outputFormat) throws PortalServiceException { - if (srsName == null || srsName.isEmpty()) { - srsName = BaseWFSService.DEFAULT_SRS; - } - - try { - return this.wfsMethodMaker.makeGetMethod(wfsUrl, featureType, maxFeatures, ResultType.Results, srsName, bbox, outputFormat).getURI().toString(); - } catch (URISyntaxException e) { - throw new PortalServiceException("",e); - } - } - - /** - * Makes a WFS request to the specified service, returns the resulting GML - * @param serviceUrl The service endpoint to query - * @param featureType The feature type to request - * @param featureId The specific feature to request - * @return - * @throws PortalServiceException - */ - public String getWfsFeature(String serviceUrl, String featureType, String featureId) throws PortalServiceException { - HttpRequestBase method = null; - try { - method = generateWFSRequest(serviceUrl, featureType, featureId, null, null, null, null); - String wfs = httpServiceCaller.getMethodResponseAsString(method); - - OWSExceptionParser.checkForExceptionResponse(wfs); - - return wfs; - } catch (Exception ex) { - throw new PortalServiceException(method, ex); - } - } - - /** - * Utility for making a DescribeFeatureType request for a SF0 feature. The resulting - * simple schema will be parsed into a collection of SimpleFeatureProperty elements - * @param serviceUrl The WFS endpoint to query - * @param featureType The feature type name to describe - * @return - * @throws PortalServiceException - */ - public List describeSimpleFeature(String serviceUrl, String featureType) throws PortalServiceException { - - HttpRequestBase request = null; - String wfsDescribeFeatureResponse = null; - try { - //Make our request - request = this.wfsMethodMaker.makeDescribeFeatureTypeMethod(serviceUrl, featureType); - wfsDescribeFeatureResponse = httpServiceCaller.getMethodResponseAsString(request); - - OWSExceptionParser.checkForExceptionResponse(wfsDescribeFeatureResponse); - - //Parse our response - Document doc = DOMUtil.buildDomFromString(wfsDescribeFeatureResponse); - - NamespaceContext nc = new XsdNamespace(); - XPathExpression expr = DOMUtil.compileXPathExpr(String.format("xsd:schema/xsd:complexType/xsd:complexContent/xsd:extension/xsd:sequence/xsd:element", featureType), nc); - NodeList elementNodes = (NodeList) expr.evaluate(doc, XPathConstants.NODESET); - - List featureTypes = new ArrayList<>(); - for (int i = 0; i < elementNodes.getLength(); i++) { - Node n = elementNodes.item(i); - - SimpleFeatureProperty sft = new SimpleFeatureProperty( - Integer.parseInt(n.getAttributes().getNamedItem("maxOccurs").getTextContent()), - Integer.parseInt(n.getAttributes().getNamedItem("minOccurs").getTextContent()), - n.getAttributes().getNamedItem("name").getTextContent(), - Boolean.parseBoolean(n.getAttributes().getNamedItem("nillable").getTextContent()), - n.getAttributes().getNamedItem("type").getTextContent(), - i + 1); - - featureTypes.add(sft); - } - - return featureTypes; - } catch (Exception ex) { - throw new PortalServiceException(request, "Error making/handling DescribeFeatureType request"); - } - } -} diff --git a/src/main/resources/application-registries.yaml b/src/main/resources/application-registries.yaml index 3825a48b9..33a63644f 100644 --- a/src/main/resources/application-registries.yaml +++ b/src/main/resources/application-registries.yaml @@ -2,7 +2,7 @@ csw: registries: - id: cswGAECat serviceUrl: https://ecat.ga.gov.au/geonetwork/srv/eng/csw - recordInformationUrl: https://ecat.ga.gov.au/geonetwork/srv/eng/main.home?uuid=%1$s + recordInformationUrl: https://ecat.ga.gov.au/geonetwork/srv/eng/catalog.search#/metadata/%1$s title: Geoscience Australia eCat serverType: Default pageSize: 200 diff --git a/src/test/java/org/auscope/portal/server/web/controllers/MyHttpResponse.java b/src/test/java/org/auscope/portal/server/web/controllers/MyHttpResponse.java index 266be8833..5de46f03e 100644 --- a/src/test/java/org/auscope/portal/server/web/controllers/MyHttpResponse.java +++ b/src/test/java/org/auscope/portal/server/web/controllers/MyHttpResponse.java @@ -12,7 +12,6 @@ import org.apache.http.params.HttpParams; import org.auscope.portal.core.server.http.HttpClientResponse; -@SuppressWarnings("deprecation") public class MyHttpResponse extends HttpClientResponse { InputStream content; int statusCode; diff --git a/src/test/java/org/auscope/portal/server/web/controllers/TestNVCLController.java b/src/test/java/org/auscope/portal/server/web/controllers/TestNVCLController.java index 34304815d..edb3f284c 100644 --- a/src/test/java/org/auscope/portal/server/web/controllers/TestNVCLController.java +++ b/src/test/java/org/auscope/portal/server/web/controllers/TestNVCLController.java @@ -12,7 +12,6 @@ import org.apache.http.HttpStatus; import org.apache.http.client.methods.HttpRequestBase; -import org.auscope.portal.core.configuration.ServiceConfigurationItem; import org.auscope.portal.core.server.http.HttpServiceCaller; import org.auscope.portal.core.services.CSWCacheService; import org.auscope.portal.core.services.csw.CSWRecordsFilterVisitor; @@ -29,7 +28,6 @@ import org.auscope.portal.server.web.service.BoreholeService; import org.auscope.portal.server.web.service.NVCL2_0_DataService; import org.auscope.portal.server.web.service.NVCLDataService; -import org.auscope.portal.server.web.service.SF0BoreholeService; import org.jmock.Expectations; import org.junit.Assert; import org.junit.Before; @@ -64,8 +62,6 @@ public class TestNVCLController extends PortalTestClass { /** The nvcl controller. */ private NVCLController nvclController; - private SF0BoreholeService mockSF0Service; - private HttpServiceCaller mockServiceCaller; private ServiceConfiguration mockServiceConfiguration; @@ -79,11 +75,10 @@ public void setUp() { this.mockCSWService = context.mock(CSWCacheService.class); this.mockDataService = context.mock(NVCLDataService.class); this.mock2_0_DataService = context.mock(NVCL2_0_DataService.class); - this.mockSF0Service = context.mock(SF0BoreholeService.class); this.mockServiceCaller = context.mock(HttpServiceCaller.class); this.mockServiceConfiguration = context.mock(ServiceConfiguration.class); this.nvclController = new NVCLController(this.mockBoreholeService, this.mockCSWService, this.mockDataService, - this.mock2_0_DataService, this.mockSF0Service, this.mockServiceCaller, this.mockServiceConfiguration ); + this.mock2_0_DataService, this.mockServiceCaller, this.mockServiceConfiguration ); } /** diff --git a/src/test/java/org/auscope/portal/server/web/controllers/TestReprojectionController.java b/src/test/java/org/auscope/portal/server/web/controllers/TestReprojectionController.java deleted file mode 100644 index cddce2a9c..000000000 --- a/src/test/java/org/auscope/portal/server/web/controllers/TestReprojectionController.java +++ /dev/null @@ -1,204 +0,0 @@ -package org.auscope.portal.server.web.controllers; - -import org.auscope.portal.core.test.PortalTestClass; -import org.junit.Assert; -import org.junit.Test; -import org.springframework.ui.ModelMap; -import org.springframework.web.servlet.ModelAndView; - -public class TestReprojectionController extends PortalTestClass { - ReprojectionController cont = new ReprojectionController(); - - /** - * Simple test with dataset that will return MGA Zone of 49. - */ - @Test - public void testCalculateMgaZoneForBBox_MGAZone_49() { - double north = -30; - double south = -32; - double east = 125; - double west = 100; - - ModelAndView mav = cont.calculateMgaZoneForBBox(north, south, east, west); - Assert.assertNotNull(mav); - Assert.assertTrue((Boolean) mav.getModel().get("success")); - int result = (Integer)mav.getModel().get("data"); - Assert.assertEquals(49, result); - } - - /** - * Simple test with dataset that will return MGA Zone of 50. - */ - @Test - public void testCalculateMgaZoneForBBox_MGAZone_50() { - double north = -30; - double south = -32; - double east = 125; - double west = 110; - - ModelAndView mav = cont.calculateMgaZoneForBBox(north, south, east, west); - Assert.assertNotNull(mav); - Assert.assertTrue((Boolean) mav.getModel().get("success")); - int result = (Integer)mav.getModel().get("data"); - Assert.assertEquals(50, result); - } - - /** - * Simple test with dataset that will return MGA Zone of 51. - */ - @Test - public void testCalculateMgaZoneForBBox_MGAZone_51() { - double north = -30; - double south = -32; - double east = 150; - double west = 100; - - ModelAndView mav = cont.calculateMgaZoneForBBox(north, south, east, west); - Assert.assertNotNull(mav); - Assert.assertTrue((Boolean) mav.getModel().get("success")); - int result = (Integer)mav.getModel().get("data"); - Assert.assertEquals(51, result); - } - - /** - * Simple test with dataset that will return MGA Zone of 52. - */ - @Test - public void testCalculateMgaZoneForBBox_MGAZone_52() { - double north = -30; - double south = -32; - double east = 150; - double west = 110; - - ModelAndView mav = cont.calculateMgaZoneForBBox(north, south, east, west); - Assert.assertNotNull(mav); - Assert.assertTrue((Boolean) mav.getModel().get("success")); - int result = (Integer)mav.getModel().get("data"); - Assert.assertEquals(52, result); - } - - /** - * Simple test with dataset that will return MGA Zone of 53. - */ - @Test - public void testCalculateMgaZoneForBBox_MGAZone_53() { - double north = -30; - double south = -32; - double east = 170; - double west = 100; - - ModelAndView mav = cont.calculateMgaZoneForBBox(north, south, east, west); - Assert.assertNotNull(mav); - Assert.assertTrue((Boolean) mav.getModel().get("success")); - int result = (Integer)mav.getModel().get("data"); - Assert.assertEquals(53, result); - } - - /** - * Simple test with dataset that will return MGA Zone of 54. - */ - @Test - public void testCalculateMgaZoneForBBox_MGAZone_54() { - double north = -30; - double south = -32; - double east = 180; - double west = 100; - - ModelAndView mav = cont.calculateMgaZoneForBBox(north, south, east, west); - Assert.assertNotNull(mav); - Assert.assertTrue((Boolean) mav.getModel().get("success")); - int result = (Integer)mav.getModel().get("data"); - Assert.assertEquals(54, result); - } - - /** - * Simple test with dataset that will return MGA Zone of 55. - */ - @Test - public void testCalculateMgaZoneForBBox_MGAZone_55() { - double north = -30; - double south = -32; - double east = 190; - double west = 100; - - ModelAndView mav = cont.calculateMgaZoneForBBox(north, south, east, west); - Assert.assertNotNull(mav); - Assert.assertTrue((Boolean) mav.getModel().get("success")); - int result = (Integer)mav.getModel().get("data"); - Assert.assertEquals(55, result); - } - - /** - * Simple test with dataset that will return MGA Zone of 56. - */ - @Test - public void testCalculateMgaZoneForBBox_MGAZone_56() { - double north = -30; - double south = -32; - double east = 200; - double west = 100; - - ModelAndView mav = cont.calculateMgaZoneForBBox(north, south, east, west); - Assert.assertNotNull(mav); - Assert.assertTrue((Boolean) mav.getModel().get("success")); - int result = (Integer)mav.getModel().get("data"); - Assert.assertEquals(56, result); - } - - /** - * Simple test with dataset that will fail. - */ - @Test - public void testCalculateMgaZoneForBBox_MGAZoneSmallerThanZero() { - // The following dataset will yield -1 MGA zone - double north = -30; - double south = -32; - double east = 100; - double west = 50; - - ModelAndView mav = cont.calculateMgaZoneForBBox(north, south, east, west); - Assert.assertNotNull(mav); - Assert.assertFalse((Boolean) mav.getModel().get("success")); - Assert.assertNull(mav.getModel().get("data")); - } - - /** - * Simple test to ensure no errors (no validity of conversion is tested) - */ - @Test - public void testBBoxReproject() { - double north = -30; - double south = -32; - double east = 125; - double west = 110; - - ModelAndView mav = cont.projectBBoxToUtm(north, south, east, west, null); - Assert.assertNotNull(mav); - Assert.assertTrue((Boolean) mav.getModel().get("success")); - Assert.assertNotNull(mav.getModel().get("data")); - - ModelMap data = (ModelMap) mav.getModel().get("data"); - data.containsKey("mgaZone"); - data.containsKey("minNorthing"); - data.containsKey("maxNorthing"); - data.containsKey("minEasting"); - data.containsKey("maxEasting"); - } - - /** - * Simple test with dataset that will fail. - */ - @Test - public void testBBoxReproject_MGAZoneSmallerThanZero() { - // The following dataset will yield -1 MGA zone - double north = -30; - double south = -32; - double east = 100; - double west = 50; - - ModelAndView mav = cont.projectBBoxToUtm(north, south, east, west, null); - Assert.assertNotNull(mav); - Assert.assertFalse((Boolean) mav.getModel().get("success")); - Assert.assertNull(mav.getModel().get("data")); - } -} \ No newline at end of file diff --git a/src/test/java/org/auscope/portal/server/web/controllers/TestVocabController.java b/src/test/java/org/auscope/portal/server/web/controllers/TestVocabController.java index 6bbe6ce86..df24303ea 100644 --- a/src/test/java/org/auscope/portal/server/web/controllers/TestVocabController.java +++ b/src/test/java/org/auscope/portal/server/web/controllers/TestVocabController.java @@ -1,29 +1,22 @@ package org.auscope.portal.server.web.controllers; -import java.util.Arrays; + import java.util.HashMap; -import java.util.List; + import java.util.Map; import java.util.ArrayList; import org.auscope.portal.core.services.VocabularyFilterService; import org.auscope.portal.core.test.PortalTestClass; -import org.auscope.portal.server.web.controllers.VocabController; + import org.hamcrest.Matcher; import org.jmock.Expectations; import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import org.springframework.ui.ModelMap; + import org.springframework.web.servlet.ModelAndView; -import org.apache.jena.rdf.model.Literal; -import org.apache.jena.rdf.model.Model; -import org.apache.jena.rdf.model.ModelFactory; -import org.apache.jena.rdf.model.Property; -import org.apache.jena.rdf.model.Resource; -import org.apache.jena.rdf.model.Selector; import org.apache.jena.rdf.model.SimpleSelector; -import org.auscope.portal.core.services.PortalServiceException; import org.apache.jena.vocabulary.SKOS; import au.gov.geoscience.portal.services.vocabularies.VocabularyLookup; diff --git a/src/test/java/org/auscope/portal/server/web/service/TestSimpleWfsService.java b/src/test/java/org/auscope/portal/server/web/service/TestSimpleWfsService.java deleted file mode 100644 index 62fa1c3a3..000000000 --- a/src/test/java/org/auscope/portal/server/web/service/TestSimpleWfsService.java +++ /dev/null @@ -1,68 +0,0 @@ -package org.auscope.portal.server.web.service; - -import java.util.List; - -import org.apache.http.client.methods.HttpRequestBase; -import org.auscope.portal.core.server.http.HttpServiceCaller; -import org.auscope.portal.core.services.methodmakers.WFSGetFeatureMethodMaker; -import org.auscope.portal.core.test.PortalTestClass; -import org.auscope.portal.core.util.ResourceUtil; -import org.jmock.Expectations; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - -public class TestSimpleWfsService extends PortalTestClass { - final HttpServiceCaller mockServiceCaller = context.mock(HttpServiceCaller.class); - final WFSGetFeatureMethodMaker mockMethodMaker = context.mock(WFSGetFeatureMethodMaker.class); - final HttpRequestBase mockMethod = context.mock(HttpRequestBase.class); - - SimpleWfsService service; - - @Before - public void setup() { - service = new SimpleWfsService(mockServiceCaller, mockMethodMaker); - } - - /** - * Tests that a DescribeFeatureType response is correctly parsed - * @throws Exception - */ - @Test - public void testDescribeFeatures() throws Exception { - - final String endpoint = "http://example.com/wfs"; - final String typeName = "ga:gravitypoints"; - final String responseString = ResourceUtil.loadResourceAsString("DescribeFeatureTypeResponse-SF0.xml"); - - context.checking(new Expectations() {{ - oneOf(mockMethodMaker).makeDescribeFeatureTypeMethod(endpoint, typeName); - will(returnValue(mockMethod)); - - oneOf(mockServiceCaller).getMethodResponseAsString(mockMethod); - will(returnValue(responseString)); - }}); - - List result = service.describeSimpleFeature(endpoint, typeName); - - Assert.assertNotNull(result); - Assert.assertEquals(18, result.size()); - - SimpleFeatureProperty sf0 = result.get(0); - Assert.assertEquals(1, sf0.getMaxOccurs()); - Assert.assertEquals(1, sf0.getMinOccurs()); - Assert.assertEquals(1, sf0.getIndex()); - Assert.assertEquals("xsd:int", sf0.getTypeName()); - Assert.assertEquals("id", sf0.getName()); - Assert.assertFalse(sf0.isNillable()); - - SimpleFeatureProperty sf17 = result.get(17); - Assert.assertEquals(1, sf17.getMaxOccurs()); - Assert.assertEquals(0, sf17.getMinOccurs()); - Assert.assertEquals(18, sf17.getIndex()); - Assert.assertEquals("xsd:double", sf17.getTypeName()); - Assert.assertEquals("infinite_slab_bouguer_anomaly", sf17.getName()); - Assert.assertTrue(sf17.isNillable()); - } - -} diff --git a/src/test/java/org/auscope/portal/server/web/service/monitor/TestKnownLayerServiceStatusMonitor.java b/src/test/java/org/auscope/portal/server/web/service/monitor/TestKnownLayerServiceStatusMonitor.java index ab2622e46..760d3eb9d 100644 --- a/src/test/java/org/auscope/portal/server/web/service/monitor/TestKnownLayerServiceStatusMonitor.java +++ b/src/test/java/org/auscope/portal/server/web/service/monitor/TestKnownLayerServiceStatusMonitor.java @@ -7,14 +7,12 @@ import java.util.HashMap; import java.util.List; -import org.auscope.portal.core.server.http.HttpServiceCaller; import org.auscope.portal.core.services.CSWCacheService; import org.auscope.portal.core.services.ElasticsearchService; import org.auscope.portal.core.services.GoogleCloudMonitoringCachedService; import org.auscope.portal.core.services.KnownLayerService; import org.auscope.portal.core.services.PortalServiceException; import org.auscope.portal.core.services.WMSService; -import org.auscope.portal.core.services.responses.csw.AbstractCSWOnlineResource; import org.auscope.portal.core.services.responses.csw.CSWOnlineResourceImpl; import org.auscope.portal.core.services.responses.csw.CSWRecord; import org.auscope.portal.core.services.responses.stackdriver.ServiceStatusResponse; @@ -49,7 +47,6 @@ public class TestKnownLayerServiceStatusMonitor extends PortalTestClass { private GoogleCloudMonitoringCachedService mockStackDriverService = context.mock(GoogleCloudMonitoringCachedService.class); - private HttpServiceCaller mockHttpServiceCaller = context.mock(HttpServiceCaller.class); private ElasticsearchService mockElasticsearchService = context.mock(ElasticsearchService.class); private KnownLayerService knownLayerService; diff --git a/src/test/resources/DescribeCoverageResponse1.xml b/src/test/resources/DescribeCoverageResponse1.xml deleted file mode 100644 index a0a46793b..000000000 --- a/src/test/resources/DescribeCoverageResponse1.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - description1 - name1 - - - 0.0 -89.4375 - - 358.875 89.4375 - 2005-05-10T00:00:00Z - 2005-05-10T00:00:00Z - - - - - 0.0 -89.4375 - 358.875 89.4375 - - - - 0.0 -89.4375 - 358.875 89.4375 - 2005-05-10T00:00:00Z - 2005-05-10T00:00:00Z - - - - - - 0 0 0 - 319 159 26 - - - x - y - - z - - 0.0 -89.4375 100.0 - - 1.125 0.0 0.0 - 0.0 1.125 0.0 - 0.0 0.0 33.333334115835335 - - - - - 2005-05-10T12:34:56Z - 2006-05-10T12:34:56Z - - - - - rsdescription1 - rsname1 - - - - adname1 - - - - 100.0 - 133.33 - 166.66 - 200.0 - 233.33 - - 266.66 - 300.0 - 333.33 - 366.66 - 400.0 - 433.33 - - 466.66 - 500.0 - 533.33 - 566.66 - 600.0 - 633.33 - - 666.66 - 700.0 - 733.33 - 766.66 - 800.0 - 833.33 - - 866.66 - 900.0 - 933.33 - 966.66 - - - - - - - - OGC:CRS84 - EPSG:4326 - - - GeoTIFF - - GeoTIFF_Float - NetCDF3 - - - none - - - - - diff --git a/src/test/resources/DescribeCoverageResponse2.xml b/src/test/resources/DescribeCoverageResponse2.xml deleted file mode 100644 index 74b05e82b..000000000 --- a/src/test/resources/DescribeCoverageResponse2.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - description2 - name2 - - - -179.12303011456 63.0415709487752 - - 179.982766500967 82.4151433839318 - - - Bedrock Elevation - Cryosphere - Earth Science - Greenland - - Ice Sheets - Ice Sheet Elevation - Polar - - - - - - -179.123 63.041 - 179.982 82.415 - - - -825267.555 -1151631.237 - 2173789.735 2041572.863 - - - - - - 0 0 - 599 638 - - - x - - y - - -825267.555 2041572.863 - - 5000 0 - 0 -5000 - - - - - - - rsdescription2 - rsname2 - - - - - - EPSG:32661 - EPSG:4326 - EPSG:3408 - EPSG:3410 - - EPSG:32661 - EPSG:4326 - - - - GeoTIFFFloat32 - - - nearest neighbor - bilinear - - - -