Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
62d82aba
Commit
62d82aba
authored
Dec 04, 2024
by
Riegel
Browse files
Test: Add test for EPSG-parsing from ZIP-file
parent
90ebc78e
Changes
4
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/Extensions/CityDoctorZipLoader/src/test/java/de/hft/stuttgart/citydoctor2/ziploader/ZipTest.java
View file @
62d82aba
...
...
@@ -60,4 +60,19 @@ public class ZipTest {
}
}
@Test
public
void
testEpsgParsing
()
{
CityGmlArchive
cgmlArch
=
CityGmlArchive
.
fromZipFile
(
"src/test/resources/epsg.zip"
,
config
);
assertNotNull
(
cgmlArch
);
List
<
String
>
epsgs
=
new
ArrayList
<>(
2
);
epsgs
.
add
(
"25832"
);
epsgs
.
add
(
"7415"
);
for
(
CityGmlZipEntry
entry
:
cgmlArch
.
getEntries
())
{
String
srsName
=
entry
.
getModel
().
getCityModel
().
getBoundedBy
().
getEnvelope
().
getSrsName
();
srsName
=
srsName
.
split
(
":"
)[
6
];
assertTrue
(
epsgs
.
remove
(
srsName
));
}
assertTrue
(
epsgs
.
isEmpty
());
}
}
CityDoctorParent/Extensions/CityDoctorZipLoader/src/test/resources/epsg.zip
0 → 100644
View file @
62d82aba
File added
CityDoctorParent/Extensions/CityDoctorZipLoader/src/test/resources/epsg/epsg1.gml
0 → 100644
View file @
62d82aba
<?xml version="1.0" encoding="utf-8"?>
<core:CityModel
xmlns:core=
"http://www.opengis.net/citygml/2.0"
xmlns:gen=
"http://www.opengis.net/citygml/generics/2.0"
xmlns:bldg=
"http://www.opengis.net/citygml/building/2.0"
xmlns:app=
"http://www.opengis.net/citygml/appearance/2.0"
xmlns:dem=
"http://www.opengis.net/citygml/relief/2.0"
xmlns:gml=
"http://www.opengis.net/gml"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/2.0 http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd"
>
<gml:boundedBy>
<gml:Envelope
srsDimension=
"3"
srsName=
"urn:ogc:def:crs:EPSG::25832"
>
<gml:lowerCorner>
357978.09 5654873.32 0.00
</gml:lowerCorner>
<gml:upperCorner>
359213.91 5656013.49 0.00
</gml:upperCorner>
</gml:Envelope>
</gml:boundedBy>
</core:CityModel>
\ No newline at end of file
CityDoctorParent/Extensions/CityDoctorZipLoader/src/test/resources/epsg/epsg2.gml
0 → 100644
View file @
62d82aba
<?xml version="1.0" encoding="utf-8"?>
<core:CityModel
xmlns:core=
"http://www.opengis.net/citygml/2.0"
xmlns:gen=
"http://www.opengis.net/citygml/generics/2.0"
xmlns:bldg=
"http://www.opengis.net/citygml/building/2.0"
xmlns:app=
"http://www.opengis.net/citygml/appearance/2.0"
xmlns:dem=
"http://www.opengis.net/citygml/relief/2.0"
xmlns:gml=
"http://www.opengis.net/gml"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.opengis.net/citygml/building/2.0 http://schemas.opengis.net/citygml/building/2.0/building.xsd http://www.opengis.net/citygml/appearance/2.0 http://schemas.opengis.net/citygml/appearance/2.0/appearance.xsd http://www.opengis.net/citygml/relief/2.0 http://schemas.opengis.net/citygml/relief/2.0/relief.xsd http://www.opengis.net/citygml/2.0 http://schemas.opengis.net/citygml/2.0/cityGMLBase.xsd http://www.opengis.net/citygml/generics/2.0 http://schemas.opengis.net/citygml/generics/2.0/generics.xsd"
>
<gml:boundedBy>
<gml:Envelope
srsDimension=
"3"
srsName=
"urn:ogc:def:crs:EPSG::7415"
>
<gml:lowerCorner>
84616.468 447422.999 0
</gml:lowerCorner>
<gml:upperCorner>
85140.839 447750.636 100
</gml:upperCorner>
</gml:Envelope>
</gml:boundedBy>
</core:CityModel>
\ No newline at end of file
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