diff --git a/CityDoctorParent/Extensions/CityDoctorZipLoader/src/test/java/de/hft/stuttgart/citydoctor2/ziploader/ZipTest.java b/CityDoctorParent/Extensions/CityDoctorZipLoader/src/test/java/de/hft/stuttgart/citydoctor2/ziploader/ZipTest.java index b04095a5ab6da348ba153330d1da67382942074b..ac73522c5f4f6634bbf7d72e2daf4ec4984ed33f 100644 --- a/CityDoctorParent/Extensions/CityDoctorZipLoader/src/test/java/de/hft/stuttgart/citydoctor2/ziploader/ZipTest.java +++ b/CityDoctorParent/Extensions/CityDoctorZipLoader/src/test/java/de/hft/stuttgart/citydoctor2/ziploader/ZipTest.java @@ -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()); + } + } diff --git a/CityDoctorParent/Extensions/CityDoctorZipLoader/src/test/resources/epsg.zip b/CityDoctorParent/Extensions/CityDoctorZipLoader/src/test/resources/epsg.zip new file mode 100644 index 0000000000000000000000000000000000000000..34f56087e60dfdc9fcaa39e49ec0a52e7f7c73ea Binary files /dev/null and b/CityDoctorParent/Extensions/CityDoctorZipLoader/src/test/resources/epsg.zip differ diff --git a/CityDoctorParent/Extensions/CityDoctorZipLoader/src/test/resources/epsg/epsg1.gml b/CityDoctorParent/Extensions/CityDoctorZipLoader/src/test/resources/epsg/epsg1.gml new file mode 100644 index 0000000000000000000000000000000000000000..d3dfdf5f03aa2a42ada9c4a81840a8d18d046409 --- /dev/null +++ b/CityDoctorParent/Extensions/CityDoctorZipLoader/src/test/resources/epsg/epsg1.gml @@ -0,0 +1,9 @@ +<?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 diff --git a/CityDoctorParent/Extensions/CityDoctorZipLoader/src/test/resources/epsg/epsg2.gml b/CityDoctorParent/Extensions/CityDoctorZipLoader/src/test/resources/epsg/epsg2.gml new file mode 100644 index 0000000000000000000000000000000000000000..f4237079b29f358006ba1ff149047e7c1ca27453 --- /dev/null +++ b/CityDoctorParent/Extensions/CityDoctorZipLoader/src/test/resources/epsg/epsg2.gml @@ -0,0 +1,9 @@ +<?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