From: user Date: Wed, 06 Jan 2021 16:04:25 +0530 Subject: hello --- hello --- --- /dev/null +++ b/BANDP_01_MET.TXT @@ -0,0 +1,97 @@ +ProductID=085051800101 +SatID=CARTOSAT-2 +Sensor=PAN +GenAgency=NRSA +Path= +Row= +DateOfPass=24MAR08 +PassType=PLD +OrbitNo=6489 +AOI_SceneSequenceNumber=1 +BytesPerPixel=2 +GenerationDateTime=21APR08 +ProductCode=ST00001OJ +ProductType=ORTHOKIT +ResolutionAlong=1.00000000 +ResolutionAcross=1.00000000 +Season=MAR +ImageFormat=GeoTIFF +ProcessingLevel=STD +ResampCode=NONE +NoScans=7168 +NoPixels=6784 +MapProjection=NONE +Ellipsoid=WGS_84 +Datum=WGS_84 +MapOriginLat=0.00000000 +MapOriginLon=0.00000000 +ProdULLat=23.94668815 +ProdULLon=72.34074039 +ProdURLat=23.94624602 +ProdURLon=72.39627432 +ProdLRLat=23.89444216 +ProdLRLon=72.39622594 +ProdLLLat=23.89488428 +ProdLLLon=72.34069201 +ProdULMapX=0.00000000 +ProdULMapY=0.00000000 +ProdURMapX=0.00000000 +ProdURMapY=0.00000000 +ProdLRMapX=0.00000000 +ProdLRMapY=0.00000000 +ProdLLMapX=0.00000000 +ProdLLMapY=0.00000000 +SceneCenterLat=23.92704500 +SceneCenterLon=72.38362600 +SatAltitude=636445.33500000 +SunAzimuth=119.06281400 +SunElevation=50.39858400 +SatelliteHeading=191.63823793 +AngleIncidence=12.62103254 +DEMCorrection=NONE +SourceOrbitvalues=1 +SourceQs=1 +CompressionType=CI +CCDTemp=0.00000000 +SceneCenterTime=04:56:11:6537 +SceneCenterRoll=-11.50907700 +SceneCenterPitch=0.24675600 +SceneCenterYaw=-8.02151000 +ImagingMode=SPOTIMAGE +ImageHeading=166.48694200 +CompressionTable=0 +YawSteeringTableNumber= +Lmin=0.00000000 +Lmax=52.34800000 +NoLineLoss=0 +AdifRegenCounter=0 +DPCounter=1 +Adif_regen_Rbias=0.00000000 +Adif_regen_Pbias=0.00000000 +Adif_regen_Ybias=0.00000000 +MapSheetId= +AOISceneNumber=01/01 +NumUserCoordinate=4 +UserLat#1=23.94440000 +UserLon#1=72.34330000 +UserLat#2=23.94440000 +UserLon#2=72.39360000 +UserLat#3=23.89720000 +UserLon#3=72.39360000 +UserLat#4=23.89720000 +UserLon#4=72.34330000 +PayloadFlag=2 +OnboardSessionNumber=1 +OnboardStripNumber=0 +SessionNumber=1 +SegmentNumber=1 +SceneSeqNumber=1 +StripNumber=1 +NumOfStrips=1 +VariableLineIntgrationTimeFactor=1 +ImagingDirection=F +ImagingOrientation=NORTH +PortNumbers=0 +PlannedGSD= +ObservedGSDScan= +ObservedGSDPixel= --- 'a/src/main/java/com/GisSatellite/Server/Controller/ApiController.java' +++ b/src/main/java/com/GisSatellite/Server/Controller/ApiController.java @@ -92,7 +92,7 @@ public class ApiController { // if ( filterData.getLocalIdFrom() != null && filterData.getLocalIdTo() != null) { // predicates.add(cb.between(satellite.get("localcd"),filterData.getLocalIdFrom() ,filterData.getLocalIdTo())); // } - if ( !filterData.getDateOfPassFrom().toString().equals("1111-01-01") && (!filterData.getDateOfPassTo().toString().equals("1111-01-01"))) { + if ( !filterData.getDateOfPassFrom().toString().equals("2020-12-31") && (!filterData.getDateOfPassTo().toString().equals("2020-12-31"))) { predicates.add(cb.between(satellite.get("date"),filterData.getDateOfPassFrom() ,filterData.getDateOfPassTo())); } --- 'a/src/main/java/com/GisSatellite/Server/Controller/SatelliteController.java' +++ b/src/main/java/com/GisSatellite/Server/Controller/SatelliteController.java @@ -1,9 +1,17 @@ package com.GisSatellite.Server.Controller; +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; import java.util.List; +import java.util.Scanner; import javax.servlet.http.HttpServletRequest; +import org.apache.tomcat.util.http.fileupload.IOUtils; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.io.WKTReader; import org.springframework.beans.factory.annotation.Autowired; @@ -14,6 +22,7 @@ import org.springframework.ui.ModelMap; import org.springframework.validation.BindingResult; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; @@ -125,6 +134,49 @@ public class SatelliteController { return "success"; } + + @PostMapping("/uploadFile") + public String uploadFile(@RequestParam("textFile") MultipartFile file,Model model) throws FileNotFoundException { + + if(file.isEmpty()){ + + //if file is empty then put your message + System.out.println("No File Found"); + } + else { + String content; + try { + content = new String(file.getBytes(), StandardCharsets.UTF_8); + Scanner myReader = new Scanner(content); + + + + + HashMap map = new HashMap<>(); + while (myReader.hasNext()) { + + String data = myReader.nextLine(); + String part[]= data.split("="); + map.put(part[0],part[1]); + + + } + + System.out.println(map); + System.out.println(map.get("DPCounter")); + System.out.println(map.size()); + myReader.close(); + model.addAttribute("filedata", map); + return "satelliteform"; + + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + // File myObj = new File(file); + } + return "satelliteform"; + } } --- 'a/src/main/resources/application.properties' +++ b/src/main/resources/application.properties @@ -2,7 +2,7 @@ spring.mvc.view.prefix=/views/ spring.mvc.view.suffix=.jsp server.port=9080 -spring.datasource.url=jdbc:postgresql://localhost:5432/postgres?useSSL=false +spring.datasource.url=jdbc:postgresql://localhost:5432/vedas?useSSL=false spring.datasource.username=postgres spring.datasource.password=postgres spring.datasource.platform=postgres @@ -12,5 +12,5 @@ spring.jpa.properties.hibernate.dialect= spring.jpa.hibernate.ddl-auto=update spring.datasource.driver-class-name=org.postgresql.Driver #https://vedas.sac.gov.in/SDIS_2.0/ - +#server.servlet.context-path=/Vedas spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true \ No newline at end of file --- 'a/src/main/webapp/views/satelliteform.jsp' +++ b/src/main/webapp/views/satelliteform.jsp @@ -1,387 +1,416 @@ <%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> - <%@page isELIgnored="false" %> - + pageEncoding="ISO-8859-1"%> +<%@page isELIgnored="false"%> + - Satellite Form - - +Satellite Form + + - + - + - + - + - + - + - + - - + + - + - + - - + + - - + +
- -
- - - Satellite Form - - -
- - Satellite : -
+ + + + + +
+ + Satellite Image :
+
+
+
+
+
+ +
+
+ +
+ +
+ + Satellite Form + +
+ + + + + Satellite : +
+ +
Sensor : - -
-
- Date : - -
- -
- Time : - -
- -
- Path : - + + + +
-
- Row : - + Date :
- - - - - - - -
- Band : - + +
+ Time :
- -
- Gain No : - + +
+ Path :
-
- -
- I/P Pixel : - + +
+ Row :
- -
- I/P Line : - + + + + + + + +
+ Band :
- -
- Pixel size x : - + +
+ Gain No :
- -
- Pixel size y : - +
+ +
+ I/P Pixel :
- - - - - - - - - - - - - - - - - - - + +
+ I/P Line : +
+ +
+ Pixel size x : +
+ +
+ Pixel size y : +
+ + + + + + + + + + + + + + + + + + +
-
- Center latitude : - +
+ Center latitude :
- -
- Center longitude : - + +
+ Center longitude :
- - -
- Upper Left Latitude : - + + +
+ Upper Left Latitude :
- -
- Upper Left Longitude : - + +
+ Upper Left Longitude :
- -
-
- Upper Right Latitude : - + +
+
+ Upper Right Latitude :
- -
- Upper Right Longitude : - + +
+ Upper Right Longitude :
- -
- Lower Left Latitude : - + +
+ Lower Left Latitude :
- -
- Lower Left Longitude : - + +
+ Lower Left Longitude :
- -
+ +
- Lower Right Latitude : - + Lower Right Latitude :
- +
- Lower Right Longitude : - + Lower Right Longitude :
- -
- Sun Angle(Azi) : - + +
+ Sun Angle(Azi) :
- +
- Sun Angle(Ele) : - + Sun Angle(Ele) :
- - - - - - -
- Layer Name : - + + + + + + +
+ Layer Name :
- - - -
- - Satellite - Image :

- -
- - - - - +
+ + +
-
- - - - - + + +
- + - + - + - + - - - + + gtag('config', 'UA-23581568-13'); + - - - - - + + + +