Commit a0891b47 authored by duminil's avatar duminil
Browse files

RegionChooser:

* EPSG:28992 added
* Proj4.js V2.4.3
* Added Rotterdam hull
parent 35458517
......@@ -2336,6 +2336,26 @@
<LinearRing>
<tessellate>1</tessellate>
<coordinates>9.4273243,49.0824135,0 9.4273466,49.0824581,0 9.4273585,49.0824818,0 9.4471429,49.0988603,0 9.4472058,49.0988577,0 9.4472860,49.0988544,0 9.4679693,49.0972924,0 9.4793244,49.0956676,0 9.4793698,49.0956481,0 9.4813783,49.0933616,0 9.4952773,49.0748778,0 9.4952522,49.0748447,0 9.4952278,49.0748129,0 9.4545630,49.0766466,0 9.4308299,49.0805240,0 9.4307721,49.0805364,0 9.4282269,49.0811935,0 9.4278226,49.0814048,0 9.4273243,49.0824135,0
</coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</Placemark>
<Placemark>
<name>Bospolder.gml</name>
<ExtendedData>
<Data name="project">
<value>Rotterdam</value>
</Data>
<Data name="srsName">
<value>EPSG:28992</value>
</Data>
</ExtendedData>
<Polygon>
<outerBoundaryIs>
<LinearRing>
<tessellate>1</tessellate>
<coordinates>4.4320758,51.9115177,0 4.4369913,51.9130217,0 4.4404510,51.9140741,0 4.4429092,51.9147920,0 4.4431477,51.9148243,0 4.4437533,51.9148161,0 4.4442367,51.9144529,0 4.4491896,51.9090866,0 4.4504750,51.9075411,0 4.4504522,51.9072397,0 4.4503513,51.9070367,0 4.4476483,51.9037733,0 4.4464689,51.9034136,0 4.4451720,51.9034193,0 4.4427748,51.9035041,0 4.4412905,51.9044576,0 4.4321095,51.9109144,0 4.4320758,51.9115177,0
</coordinates>
</LinearRing>
</outerBoundaryIs>
......
......@@ -10,7 +10,10 @@ proj4.defs("EPSG:32632", "+proj=utm +zone=32 +ellps=WGS84 +datum=WGS84 +units=m
proj4.defs("EPSG:31463", "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0" + " +ellps=bessel +datum=potsdam +units=m +no_defs"); // http://spatialreference.org/ref/epsg/31463/proj4js/
proj4.defs("EPSG:31467", "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0" + " +ellps=bessel +datum=potsdam +units=m +no_defs"); // http://spatialreference.org/ref/epsg/31467/proj4js/
proj4.defs("EPSG:32118", "+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"); // http://spatialreference.org/ref/epsg/32118/proj4js/
proj4.defs("EPSG:2263", "+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs "); // http://spatialreference.org/ref/epsg/32118/proj4js/
proj4.defs("EPSG:2263", "+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs "); // http://www.spatialreference.org/ref/epsg/nad83-new-york-long-island-ftus/proj4/
//NOTE: Proj4 string for 28992 is wrong at http://spatialreference.org/ref/epsg/amersfoort-rd-new/
//NOTE: Corrected version from https://oegeo.wordpress.com/2008/05/20/note-to-self-the-one-and-only-rd-projection-string/
proj4.defs("EPSG:28992", "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.999908 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +towgs84=565.2369,50.0087,465.658,-0.406857330322398,0.350732676542563,-1.8703473836068,4.0812 +no_defs <>"); //
var osm_layer = new ol.layer.Tile({
source: new ol.source.OSM()
......
......@@ -71,6 +71,19 @@ public void testExtract0BuildingsWithWrongCoordinates() throws Throwable {
assertTrue(emptyGMLString.contains("</CityModel")); // Footer
}
@Test
public void testExtract0BuildingsFromEmptyGML() throws Throwable {
//NOTE: Small region, with too many spaces between coordinates
String wktPolygon = "POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))";
Path repo = Paths.get("../TestRepository");
Path citygmlPath = repo.resolve("NewYork.proj/empty_model.gml");
String emptyGMLString = RegionExtractor.selectRegionDirectlyFromCityGML(citygmlPath, wktPolygon, "EPSG:32118")
.toString();
assertEquals(countRegexMatches(emptyGMLString, "<(core:)?cityObjectMember"), 0);
assertTrue(emptyGMLString.contains("<core:CityModel")); // Header
assertTrue(emptyGMLString.contains("</core:CityModel")); // Footer
}
@Test
public void testExtract0BuildingsFromWeirdGML() throws Throwable {
//NOTE: Small region, with too many spaces between coordinates
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment