Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
imagej-elphel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
imagej-elphel
Commits
695dfdbd
Commit
695dfdbd
authored
Jun 17, 2018
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing KML (was from teh first file in series)
parent
2eaa2039
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
12 deletions
+27
-12
QuadCLT.java
src/main/java/QuadCLT.java
+18
-10
TwoQuadCLT.java
src/main/java/TwoQuadCLT.java
+9
-2
No files found.
src/main/java/QuadCLT.java
View file @
695dfdbd
...
@@ -8839,7 +8839,7 @@ public class QuadCLT {
...
@@ -8839,7 +8839,7 @@ public class QuadCLT {
IJ
.
d2s
(
0.000000001
*(
System
.
nanoTime
()-
this
.
startTime
),
3
)+
" sec, --- Free memory="
+
Runtime
.
getRuntime
().
freeMemory
()+
" (of "
+
Runtime
.
getRuntime
().
totalMemory
()+
")"
);
IJ
.
d2s
(
0.000000001
*(
System
.
nanoTime
()-
this
.
startTime
),
3
)+
" sec, --- Free memory="
+
Runtime
.
getRuntime
().
freeMemory
()+
" (of "
+
Runtime
.
getRuntime
().
totalMemory
()+
")"
);
}
}
public
void
setGpsLla
(
public
boolean
setGpsLla
(
String
source_file
)
String
source_file
)
{
{
ImagePlus
imp
=(
new
JP46_Reader_camera
(
false
)).
open
(
ImagePlus
imp
=(
new
JP46_Reader_camera
(
false
)).
open
(
...
@@ -8857,7 +8857,9 @@ public class QuadCLT {
...
@@ -8857,7 +8857,9 @@ public class QuadCLT {
if
(
imp
.
getProperty
(
"LATITUDE"
)
!=
null
)
gps_lla
[
0
]
=
Double
.
parseDouble
((
String
)
imp
.
getProperty
(
"LATITUDE"
));
if
(
imp
.
getProperty
(
"LATITUDE"
)
!=
null
)
gps_lla
[
0
]
=
Double
.
parseDouble
((
String
)
imp
.
getProperty
(
"LATITUDE"
));
if
(
imp
.
getProperty
(
"LONGITUDE"
)
!=
null
)
gps_lla
[
1
]
=
Double
.
parseDouble
((
String
)
imp
.
getProperty
(
"LONGITUDE"
));
if
(
imp
.
getProperty
(
"LONGITUDE"
)
!=
null
)
gps_lla
[
1
]
=
Double
.
parseDouble
((
String
)
imp
.
getProperty
(
"LONGITUDE"
));
if
(
imp
.
getProperty
(
"ALTITUDE"
)
!=
null
)
gps_lla
[
2
]
=
Double
.
parseDouble
((
String
)
imp
.
getProperty
(
"ALTITUDE"
));
if
(
imp
.
getProperty
(
"ALTITUDE"
)
!=
null
)
gps_lla
[
2
]
=
Double
.
parseDouble
((
String
)
imp
.
getProperty
(
"ALTITUDE"
));
return
true
;
}
}
return
false
;
}
}
...
@@ -8865,22 +8867,28 @@ public class QuadCLT {
...
@@ -8865,22 +8867,28 @@ public class QuadCLT {
int
debugLevel
)
int
debugLevel
)
{
{
String
[]
sourceFiles_main
=
correctionsParameters
.
getSourcePaths
();
String
[]
sourceFiles_main
=
correctionsParameters
.
getSourcePaths
();
// String [] sourceFiles_aux=quadCLT_main.correctionsParameters.getSourcePaths();
SetChannels
[]
set_channels
=
setChannels
(
image_name
,
debugLevel
);
// only for specified image timestamp
setGpsLla
(
sourceFiles_main
[
0
]);
String
set_name
=
image_name
;
ArrayList
<
String
>
path_list
=
new
ArrayList
<
String
>();
if
(
set_name
==
null
)
{
for
(
int
i
=
0
;
i
<
set_channels
.
length
;
i
++)
{
QuadCLT
.
SetChannels
[]
set_channels
=
setChannels
(
debugLevel
);
for
(
int
fn:
set_channels
[
i
].
file_number
)
{
set_name
=
set_channels
[
0
].
set_name
;
path_list
.
add
(
sourceFiles_main
[
fn
]);
}
}
for
(
String
fname:
path_list
)
{
if
(
setGpsLla
(
fname
))
{
break
;
}
}
}
if
(
gps_lla
!=
null
)
{
if
(
gps_lla
!=
null
)
{
String
kml_copy_dir
=
correctionsParameters
.
selectX3dDirectory
(
String
kml_copy_dir
=
correctionsParameters
.
selectX3dDirectory
(
set
_name
,
// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
image
_name
,
// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
null
,
null
,
true
,
// smart,
true
,
// smart,
true
);
//newAllowed, // save
true
);
//newAllowed, // save
double
ts
=
Double
.
parseDouble
(
set
_name
.
replace
(
'_'
,
'.'
));
double
ts
=
Double
.
parseDouble
(
image
_name
.
replace
(
'_'
,
'.'
));
(
new
X3dOutput
()).
generateKML
(
(
new
X3dOutput
()).
generateKML
(
kml_copy_dir
+
Prefs
.
getFileSeparator
()+
set
_name
+
".kml"
,
// String path,
kml_copy_dir
+
Prefs
.
getFileSeparator
()+
image
_name
+
".kml"
,
// String path,
false
,
// boolean overwrite,
false
,
// boolean overwrite,
""
,
// String icon_path, //<href>x3d/1487451413_967079.x3d</href> ?
""
,
// String icon_path, //<href>x3d/1487451413_967079.x3d</href> ?
ts
,
// double timestamp,
ts
,
// double timestamp,
...
...
src/main/java/TwoQuadCLT.java
View file @
695dfdbd
...
@@ -1724,7 +1724,13 @@ if (debugLevel > -100) return true; // temporarily !
...
@@ -1724,7 +1724,13 @@ if (debugLevel > -100) return true; // temporarily !
}
}
}
}
/*
for (String fname:path_list) { // path is already fiiltered fro the current (not first) set
if (quadCLT_main.setGpsLla(fname)) {
break;
}
}
// setGpsLla(quadCLT_main, )
if (quadCLT_main.gps_lla != null) {
if (quadCLT_main.gps_lla != null) {
String kml_copy_dir= quadCLT_main.correctionsParameters.selectX3dDirectory(
String kml_copy_dir= quadCLT_main.correctionsParameters.selectX3dDirectory(
set_name, // quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
set_name, // quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
...
@@ -1739,7 +1745,8 @@ if (debugLevel > -100) return true; // temporarily !
...
@@ -1739,7 +1745,8 @@ if (debugLevel > -100) return true; // temporarily !
ts, // double timestamp,
ts, // double timestamp,
quadCLT_main.gps_lla); // double [] lla)
quadCLT_main.gps_lla); // double [] lla)
}
}
// setGpsLla(quadCLT_aux, sourceFiles_aux[0]);
*/
quadCLT_main
.
writeKml
(
debugLevel
);
// alos generated with x3d model
String
jp4_copy_path
=
quadCLT_main
.
correctionsParameters
.
selectX3dDirectory
(
String
jp4_copy_path
=
quadCLT_main
.
correctionsParameters
.
selectX3dDirectory
(
set_name
,
// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
set_name
,
// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment