Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eric Duminil
RegionChooser
Commits
0e2b56e4
Commit
0e2b56e4
authored
Jun 01, 2015
by
duminil
Browse files
RegionChooser: Adding "EPSG:31467" to Citygml from NovaFactory if needed
parent
2eb7a48c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/eu/simstadt/nf4j/ExportJobFromJavaFXRegionChooser.java
View file @
0e2b56e4
...
...
@@ -40,8 +40,6 @@ public void processJob(Geometry poly, String productName, JSObject novaFactoryOp
description
.
setProduct
(
productName
);
description
.
setJobnumber
(
userName
);
//FIXME: Zipped GMLs coming from nF don't have any defined srsName
ArrayList
<
Coord
>
regionPolygon
=
new
ArrayList
<>();
for
(
Coordinate
point
:
poly
.
getCoordinates
())
{
...
...
src/eu/simstadt/regionchooser/RegionChooserFX.java
View file @
0e2b56e4
...
...
@@ -3,9 +3,9 @@
import
java.io.BufferedReader
;
import
java.io.BufferedWriter
;
import
java.io.File
;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.InputStreamReader
;
import
java.nio.charset.Charset
;
import
java.nio.file.Files
;
import
java.nio.file.Path
;
...
...
@@ -106,15 +106,15 @@ public void extractZIPtoGML(String zipFilename) throws IOException {
zeName
.
replace
(
"_GML."
,
"."
).
replace
(
userName
,
"novaFACTORY"
),
""
);
if
(
extractedCityGML
!=
null
)
{
InputStream
cityGMLInputStream
=
zipFile
.
getInputStream
(
ze
);
// System.out.println("Extract zipFile " + zipFilename + " to " + extractedCityGML);
FileOutputStream
fos
=
new
FileOutputStream
(
extractedCityGML
);
byte
[]
bytes
=
new
byte
[
1024
];
int
length
;
while
((
length
=
cityGMLInputStream
.
read
(
bytes
))
>=
0
)
{
fos
.
write
(
bytes
,
0
,
length
);
BufferedReader
cityGMLZipReader
=
new
BufferedReader
(
new
InputStreamReader
(
cityGMLInputStream
));
BufferedWriter
cityGMLOutput
=
Files
.
newBufferedWriter
(
extractedCityGML
.
toPath
());
String
buf
=
null
;
while
((
buf
=
cityGMLZipReader
.
readLine
())
!=
null
)
{
cityGMLOutput
.
write
(
buf
.
replace
(
"srsName=\"\""
,
"srsName=\"EPSG:31467\""
));
}
cityGMLZipReader
.
close
();
cityGMLInputStream
.
close
();
fos
.
close
();
cityGMLOutput
.
close
();
System
.
out
.
println
(
"Extracted"
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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