@@ -216,6 +216,82 @@ public void test3035() throws IOException {
216216
217217 }
218218
219+ /**
220+ * Test EPSG 3375
221+ *
222+ * @throws IOException
223+ * upon error
224+ */
225+ @ Test
226+ public void test3375 () throws IOException {
227+
228+ String text = "PROJCRS[\" GDM2000 / Peninsula RSO\" ,BASEGEOGCRS[\" GDM2000\" ,"
229+ + "DATUM[\" Geodetic Datum of Malaysia 2000\" ,"
230+ + "ELLIPSOID[\" GRS 1980\" ,6378137,298.2572221,LENGTHUNIT[\" metre\" ,1,ID[\" EPSG\" ,9001]],"
231+ + "ID[\" EPSG\" ,7019]],ID[\" EPSG\" ,6742]],ID[\" EPSG\" ,4742]],"
232+ + "CONVERSION[\" Peninsular RSO\" ,METHOD[\" Hotine Oblique Mercator (variant A)\" ,ID[\" EPSG\" ,9812]],"
233+ + "PARAMETER[\" Latitude of projection centre\" ,4,ANGLEUNIT[\" degree\" ,0.0174532925199433,ID[\" EPSG\" ,9102]]],"
234+ + "PARAMETER[\" Longitude of projection centre\" ,102.25,ANGLEUNIT[\" degree\" ,0.0174532925199433,ID[\" EPSG\" ,9102]]],"
235+ + "PARAMETER[\" Azimuth of initial line\" ,323.025796467,ANGLEUNIT[\" degree\" ,0.0174532925199433,ID[\" EPSG\" ,9102]]],"
236+ + "PARAMETER[\" Angle from Rectified to Skew Grid\" ,323.130102361,ANGLEUNIT[\" degree\" ,0.0174532925199433,ID[\" EPSG\" ,9102]]],"
237+ + "PARAMETER[\" Scale factor on initial line\" ,0.99984,SCALEUNIT[\" unity\" ,1,ID[\" EPSG\" ,9201]]],"
238+ + "PARAMETER[\" False easting\" ,804671,LENGTHUNIT[\" metre\" ,1,ID[\" EPSG\" ,9001]]],"
239+ + "PARAMETER[\" False northing\" ,0,LENGTHUNIT[\" metre\" ,1,ID[\" EPSG\" ,9001]]],ID[\" EPSG\" ,19895]],"
240+ + "CS[Cartesian,2,ID[\" EPSG\" ,4400]],AXIS[\" Easting (E)\" ,east],AXIS[\" Northing (N)\" ,north],"
241+ + "LENGTHUNIT[\" metre\" ,1,ID[\" EPSG\" ,9001]],"
242+ + "ID[\" EPSG\" ,3375]]" ;
243+
244+ CRS crs = CRSReader .read (text , true );
245+
246+ String expectedText = text .replace ("6378137" , "6378137.0" )
247+ .replace ("804671" , "804671.0" ).replace (",0," , ",0.0," )
248+ .replace (",1," , ",1.0," ).replace (",4," , ",4.0," );
249+
250+ assertEquals (expectedText , crs .toString ());
251+ assertEquals (expectedText , CRSWriter .write (crs ));
252+ assertEquals (WKTUtils .pretty (expectedText ), CRSWriter .writePretty (crs ));
253+
254+ text = "PROJCS[\" GDM2000 / Peninsula RSO\" ,GEOGCS[\" GDM2000\" ,"
255+ + "DATUM[\" Geodetic_Datum_of_Malaysia_2000\" ,"
256+ + "SPHEROID[\" GRS 1980\" ,6378137,298.257222101,AUTHORITY[\" EPSG\" ,\" 7019\" ]],"
257+ + "AUTHORITY[\" EPSG\" ,\" 6742\" ]],PRIMEM[\" Greenwich\" ,0,AUTHORITY[\" EPSG\" ,\" 8901\" ]],"
258+ + "UNIT[\" degree\" ,0.01745329251994328,AUTHORITY[\" EPSG\" ,\" 9122\" ]],"
259+ + "AUTHORITY[\" EPSG\" ,\" 4742\" ]],UNIT[\" metre\" ,1,AUTHORITY[\" EPSG\" ,\" 9001\" ]],"
260+ + "PROJECTION[\" Hotine_Oblique_Mercator\" ],"
261+ + "PARAMETER[\" latitude_of_center\" ,4],"
262+ + "PARAMETER[\" longitude_of_center\" ,102.25],"
263+ + "PARAMETER[\" azimuth\" ,323.0257964666666],"
264+ + "PARAMETER[\" rectified_grid_angle\" ,323.1301023611111],"
265+ + "PARAMETER[\" scale_factor\" ,0.99984],"
266+ + "PARAMETER[\" false_easting\" ,804671],"
267+ + "PARAMETER[\" false_northing\" ,0],"
268+ + "AUTHORITY[\" EPSG\" ,\" 3375\" ],AXIS[\" Easting\" ,EAST],AXIS[\" Northing\" ,NORTH]]" ;
269+
270+ crs = CRSReader .read (text , true );
271+
272+ expectedText = "PROJCRS[\" GDM2000 / Peninsula RSO\" ,BASEGEOGCRS[\" GDM2000\" ,"
273+ + "DATUM[\" Geodetic_Datum_of_Malaysia_2000\" ,"
274+ + "ELLIPSOID[\" GRS 1980\" ,6378137.0,298.257222101,ID[\" EPSG\" ,7019]],"
275+ + "ID[\" EPSG\" ,6742]],PRIMEM[\" Greenwich\" ,0.0,ID[\" EPSG\" ,8901]],"
276+ + "UNIT[\" degree\" ,0.01745329251994328,ID[\" EPSG\" ,9122]],ID[\" EPSG\" ,4742]],"
277+ + "CONVERSION[\" GDM2000 / Peninsula RSO / Hotine_Oblique_Mercator\" ,METHOD[\" Hotine_Oblique_Mercator\" ],"
278+ + "PARAMETER[\" latitude_of_center\" ,4.0],"
279+ + "PARAMETER[\" longitude_of_center\" ,102.25],"
280+ + "PARAMETER[\" azimuth\" ,323.0257964666666],"
281+ + "PARAMETER[\" rectified_grid_angle\" ,323.1301023611111],"
282+ + "PARAMETER[\" scale_factor\" ,0.99984],"
283+ + "PARAMETER[\" false_easting\" ,804671.0],"
284+ + "PARAMETER[\" false_northing\" ,0.0]],"
285+ + "CS[ellipsoidal,2],AXIS[\" Easting\" ,east],AXIS[\" Northing\" ,north],"
286+ + "UNIT[\" metre\" ,1.0,ID[\" EPSG\" ,9001]],"
287+ + "ID[\" EPSG\" ,3375]]" ;
288+
289+ assertEquals (expectedText , crs .toString ());
290+ assertEquals (expectedText , CRSWriter .write (crs ));
291+ assertEquals (WKTUtils .pretty (expectedText ), CRSWriter .writePretty (crs ));
292+
293+ }
294+
219295 /**
220296 * Test EPSG 3395
221297 *
0 commit comments