Index: /applications/editors/josm/plugins/opendata/.classpath
===================================================================
--- /applications/editors/josm/plugins/opendata/.classpath	(revision 28190)
+++ /applications/editors/josm/plugins/opendata/.classpath	(revision 28191)
@@ -15,5 +15,5 @@
 	<classpathentry kind="src" path="modules/fr.toulouse/resources"/>
 	<classpathentry kind="src" path="util"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/JOSM"/>
 	<classpathentry kind="output" path="bin"/>
Index: /applications/editors/josm/plugins/opendata/build.xml
===================================================================
--- /applications/editors/josm/plugins/opendata/build.xml	(revision 28190)
+++ /applications/editors/josm/plugins/opendata/build.xml	(revision 28191)
@@ -177,5 +177,5 @@
                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/OpenData"/>
                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
-                <attribute name="Plugin-Requires" value="jts"/>
+                <!--<attribute name="Plugin-Requires" value="jts"/>-->
                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
             </manifest>
Index: /applications/editors/josm/plugins/opendata/resources/org/geotools/referencing/crs/epsg.properties
===================================================================
--- /applications/editors/josm/plugins/opendata/resources/org/geotools/referencing/crs/epsg.properties	(revision 28190)
+++ /applications/editors/josm/plugins/opendata/resources/org/geotools/referencing/crs/epsg.properties	(revision 28191)
@@ -34,4 +34,5 @@
 4258=GEOGCS["ETRS89", DATUM["European Terrestrial Reference System 1989", SPHEROID["GRS 1980", 6378137.0, 298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], AUTHORITY["EPSG","6258"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4258"]]
 4275=GEOGCS["NTF", DATUM["Nouvelle Triangulation Francaise", SPHEROID["Clarke 1880 (IGN)", 6378249.2, 293.4660212936269, AUTHORITY["EPSG","7011"]], TOWGS84[-168.0, -60.0, 320.0, 0.0, 0.0, 0.0, 0.0], AUTHORITY["EPSG","6275"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4275"]]
+4312=GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]]
 4313=GEOGCS["Belge 1972", DATUM["Reseau National Belge 1972", SPHEROID["International 1924", 6378388.0, 297.0, AUTHORITY["EPSG","7022"]], TOWGS84[-106.8686, 52.2978, -103.7239, 0.3366, 0.457, -1.8422, -1.2747], AUTHORITY["EPSG","6313"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4313"]]
 4326=GEOGCS["WGS 84", DATUM["World Geodetic System 1984", SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4326"]]
@@ -63,4 +64,5 @@
 4632=GEOGCS["Combani 1950", DATUM["Combani 1950", SPHEROID["International 1924", 6378388.0, 297.0, AUTHORITY["EPSG","7022"]], TOWGS84[-382.0, -59.0, -262.0, 0.0, 0.0, 0.0, 0.0], AUTHORITY["EPSG","6632"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4632"]]
 4638=GEOGCS["Saint Pierre et Miquelon 1950", DATUM["Saint Pierre et Miquelon 1950", SPHEROID["Clarke 1866", 6378206.4, 294.9786982138982, AUTHORITY["EPSG","7008"]], TOWGS84[30.0, 430.0, 368.0, 0.0, 0.0, 0.0, 0.0], AUTHORITY["EPSG","6638"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4638"]]
+4805=GEOGCS["MGI (Ferro)", DATUM["Militar-Geographische Institut (Ferro)", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], AUTHORITY["EPSG","6805"]], PRIMEM["Ferro", -17.666666666666668, AUTHORITY["EPSG","8909"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4805"]]
 4807=GEOGCS["NTF (Paris)", DATUM["Nouvelle Triangulation Francaise (Paris)", SPHEROID["Clarke 1880 (IGN)", 6378249.2, 293.4660212936269, AUTHORITY["EPSG","7011"]], AUTHORITY["EPSG","6807"]], PRIMEM["Paris", 2.5969213, AUTHORITY["EPSG","8903"]], UNIT["grade", 0.015707963267948967], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4807"]]
 4936=GEOCCS["ETRS89", DATUM["European Terrestrial Reference System 1989", SPHEROID["GRS 1980", 6378137.0, 298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], AUTHORITY["EPSG","6258"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["m", 1.0], AXIS["Geocentric X", GEOCENTRIC_X], AXIS["Geocentric Y", GEOCENTRIC_Y], AXIS["Geocentric Z", GEOCENTRIC_Z], AUTHORITY["EPSG","4936"]]
@@ -98,4 +100,41 @@
 
 27700=PROJCS["OSGB 1936 / British National Grid", GEOGCS["OSGB 1936", DATUM["OSGB 1936", SPHEROID["Airy 1830", 6377563.396, 299.3249646, AUTHORITY["EPSG","7001"]], TOWGS84[446.448, -125.157, 542.06, 0.15, 0.247, 0.842, -20.489], AUTHORITY["EPSG","6277"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4277"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", -2.0], PARAMETER["latitude_of_origin", 49.0], PARAMETER["scale_factor", 0.9996012717], PARAMETER["false_easting", 400000.0], PARAMETER["false_northing", -100000.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","27700"]]
+
+#TOWGS84 clause of EPSG:31251 to 31253 taken from http://www.mail-archive.com/geotools-gt2-users@lists.sourceforge.net/msg07674.html
+31251=PROJCS["MGI (Ferro) / Austria GK West Zone", GEOGCS["MGI (Ferro)", DATUM["Militar-Geographische Institut (Ferro)", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232], AUTHORITY["EPSG","6805"]], PRIMEM["Ferro", -17.666666666666668, AUTHORITY["EPSG","8909"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4805"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 28.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", -5000000.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31251"]]
+31252=PROJCS["MGI (Ferro) / Austria GK Central Zone", GEOGCS["MGI (Ferro)", DATUM["Militar-Geographische Institut (Ferro)", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232], AUTHORITY["EPSG","6805"]], PRIMEM["Ferro", -17.666666666666668, AUTHORITY["EPSG","8909"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4805"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 31.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", -5000000.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31252"]]
+31253=PROJCS["MGI (Ferro) / Austria GK East Zone", GEOGCS["MGI (Ferro)", DATUM["Militar-Geographische Institut (Ferro)", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[577.326,90.129,463.919,5.137,1.474,5.297,2.4232], AUTHORITY["EPSG","6805"]], PRIMEM["Ferro", -17.666666666666668, AUTHORITY["EPSG","8909"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4805"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 34.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", -5000000.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31253"]]
+31254=PROJCS["MGI / Austria GK West", GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 10.333333333333334], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", -5000000.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31254"]]
+31255=PROJCS["MGI / Austria GK Central", GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 13.333333333333334], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", -5000000.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31255"]]
+31256=PROJCS["MGI / Austria GK East", GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 16.333333333333332], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", -5000000.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31256"]]
+31257=PROJCS["MGI / Austria GK M28", GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 10.333333333333334], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 150000.0], PARAMETER["false_northing", -5000000.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31257"]]
+31258=PROJCS["MGI / Austria GK M31", GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 13.333333333333334], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 450000.0], PARAMETER["false_northing", -5000000.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31258"]]
+31259=PROJCS["MGI / Austria GK M34", GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 16.333333333333332], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 750000.0], PARAMETER["false_northing", -5000000.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31259"]]
+31265=PROJCS["MGI / 3-degree Gauss zone 5", GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 15.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 5500000.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31265"]]
+31266=PROJCS["MGI / 3-degree Gauss zone 6", GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 18.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 6500000.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31266"]]
+31267=PROJCS["MGI / 3-degree Gauss zone 7", GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 21.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 7500000.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31267"]]
+31268=PROJCS["MGI / 3-degree Gauss zone 8", GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 24.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 8500000.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31268"]]
+31275=PROJCS["MGI / Balkans zone 5", GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 15.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 0.9999], PARAMETER["false_easting", 5500000.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31275"]]
+31276=PROJCS["MGI / Balkans zone 6", GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 18.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 0.9999], PARAMETER["false_easting", 6500000.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31276"]]
+31277=PROJCS["MGI / Balkans zone 7", GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 21.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 0.9999], PARAMETER["false_easting", 7500000.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31277"]]
+31278=PROJCS["MGI / Balkans zone 8", GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 21.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 0.9999], PARAMETER["false_easting", 7500000.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31278"]]
+31279=PROJCS["MGI / Balkans zone 8", GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 24.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 0.9999], PARAMETER["false_easting", 8500000.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31279"]]
+31281=PROJCS["MGI (Ferro) / Austria West Zone", GEOGCS["MGI (Ferro)", DATUM["Militar-Geographische Institut (Ferro)", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], AUTHORITY["EPSG","6805"]], PRIMEM["Ferro", -17.666666666666668, AUTHORITY["EPSG","8909"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4805"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 28.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31281"]]
+31282=PROJCS["MGI (Ferro) / Austria Central Zone", GEOGCS["MGI (Ferro)", DATUM["Militar-Geographische Institut (Ferro)", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], AUTHORITY["EPSG","6805"]], PRIMEM["Ferro", -17.666666666666668, AUTHORITY["EPSG","8909"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4805"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 31.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31282"]]
+31283=PROJCS["MGI (Ferro) / Austria East Zone", GEOGCS["MGI (Ferro)", DATUM["Militar-Geographische Institut (Ferro)", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], AUTHORITY["EPSG","6805"]], PRIMEM["Ferro", -17.666666666666668, AUTHORITY["EPSG","8909"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4805"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 34.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31283"]]
+31284=PROJCS["MGI / Austria M28", GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 10.333333333333334], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 150000.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31284"]]
+31285=PROJCS["MGI / Austria M31", GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 13.333333333333334], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 450000.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31285"]]
+31286=PROJCS["MGI / Austria M34", GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 16.333333333333332], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 750000.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31286"]]
+31287=PROJCS["MGI / Austria Lambert", GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]], PROJECTION["Lambert_Conformal_Conic_2SP", AUTHORITY["EPSG","9802"]], PARAMETER["central_meridian", 13.333333333333334], PARAMETER["latitude_of_origin", 47.5], PARAMETER["standard_parallel_1", 49.0], PARAMETER["false_easting", 400000.0], PARAMETER["false_northing", 400000.0], PARAMETER["scale_factor", 1.0], PARAMETER["standard_parallel_2", 46.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31287"]]
+31288=PROJCS["MGI (Ferro) / M28", GEOGCS["MGI (Ferro)", DATUM["Militar-Geographische Institut (Ferro)", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], AUTHORITY["EPSG","6805"]], PRIMEM["Ferro", -17.666666666666668, AUTHORITY["EPSG","8909"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4805"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 28.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 150000.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31288"]]
+31289=PROJCS["MGI (Ferro) / M31", GEOGCS["MGI (Ferro)", DATUM["Militar-Geographische Institut (Ferro)", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], AUTHORITY["EPSG","6805"]], PRIMEM["Ferro", -17.666666666666668, AUTHORITY["EPSG","8909"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4805"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 31.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 450000.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31289"]]
+31290=PROJCS["MGI (Ferro) / M34", GEOGCS["MGI (Ferro)", DATUM["Militar-Geographische Institut (Ferro)", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], AUTHORITY["EPSG","6805"]], PRIMEM["Ferro", -17.666666666666668, AUTHORITY["EPSG","8909"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4805"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 34.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 750000.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31290"]]
+31291=PROJCS["MGI (Ferro) / Austria West Zone", GEOGCS["MGI (Ferro)", DATUM["Militar-Geographische Institut (Ferro)", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], AUTHORITY["EPSG","6805"]], PRIMEM["Ferro", -17.666666666666668, AUTHORITY["EPSG","8909"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4805"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 28.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31291"]]
+31292=PROJCS["MGI (Ferro) / Austria Central Zone", GEOGCS["MGI (Ferro)", DATUM["Militar-Geographische Institut (Ferro)", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], AUTHORITY["EPSG","6805"]], PRIMEM["Ferro", -17.666666666666668, AUTHORITY["EPSG","8909"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4805"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 31.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31292"]]
+31293=PROJCS["MGI (Ferro) / Austria East Zone", GEOGCS["MGI (Ferro)", DATUM["Militar-Geographische Institut (Ferro)", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], AUTHORITY["EPSG","6805"]], PRIMEM["Ferro", -17.666666666666668, AUTHORITY["EPSG","8909"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4805"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 34.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31293"]]
+31294=PROJCS["MGI / M28", GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 10.333333333333334], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 150000.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31294"]]
+31295=PROJCS["MGI / M31", GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 13.333333333333334], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 450000.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31295"]]
+31296=PROJCS["MGI / M34", GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]], PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", 16.333333333333332], PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 750000.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31296"]]
+31297=PROJCS["MGI / Austria Lambert", GEOGCS["MGI", DATUM["Militar-Geographische Institut", SPHEROID["Bessel 1841", 6377397.155, 299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[601.705, 84.263, 485.227, 4.7354, -1.3145, -5.393, -2.3887], AUTHORITY["EPSG","6312"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4312"]], PROJECTION["Lambert_Conformal_Conic_2SP", AUTHORITY["EPSG","9802"]], PARAMETER["central_meridian", 13.333333333333334], PARAMETER["latitude_of_origin", 47.5], PARAMETER["standard_parallel_1", 49.0], PARAMETER["false_easting", 400000.0], PARAMETER["false_northing", 400000.0], PARAMETER["scale_factor", 1.0], PARAMETER["standard_parallel_2", 46.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31297"]]
 
 31300=PROJCS["Belge 1972 / Belge Lambert 72", GEOGCS["Belge 1972", DATUM["Reseau National Belge 1972", SPHEROID["International 1924", 6378388.0, 297.0, AUTHORITY["EPSG","7022"]], TOWGS84[-106.8686, 52.2978, -103.7239, 0.3366, 0.457, -1.8422, -1.2747], AUTHORITY["EPSG","6313"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4313"]], PROJECTION["Lambert_Conformal_Conic_2SP_Belgium", AUTHORITY["EPSG","9803"]], PARAMETER["central_meridian", 4.356939722222222], PARAMETER["latitude_of_origin", 90.0], PARAMETER["standard_parallel_1", 49.833333333333336], PARAMETER["false_easting", 150000.01256], PARAMETER["false_northing", 5400088.4378], PARAMETER["standard_parallel_2", 51.16666666666667], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","31300"]]
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/OdPlugin.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/OdPlugin.java	(revision 28190)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/OdPlugin.java	(revision 28191)
@@ -50,4 +50,5 @@
 import org.openstreetmap.josm.plugins.opendata.core.io.XmlImporter;
 import org.openstreetmap.josm.plugins.opendata.core.io.archive.ZipImporter;
+import org.openstreetmap.josm.plugins.opendata.core.io.geographic.GmlImporter;
 import org.openstreetmap.josm.plugins.opendata.core.io.geographic.KmlKmzImporter;
 import org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifTabImporter;
@@ -79,5 +80,5 @@
 		for (AbstractImporter importer : Arrays.asList(new AbstractImporter[]{
 				new CsvImporter(), new OdsImporter(), new XlsImporter(), // Tabular file formats
-				new KmlKmzImporter(), new ShpImporter(), new MifTabImporter(), // Geographic file formats
+				new KmlKmzImporter(), new ShpImporter(), new MifTabImporter(), new GmlImporter(), // Geographic file formats
 				new ZipImporter(), // Archive containing any of the others
 				xmlImporter = new XmlImporter() // Generic importer for XML files (currently used for Neptune files)
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/OdConstants.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/OdConstants.java	(revision 28190)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/OdConstants.java	(revision 28191)
@@ -96,4 +96,5 @@
     public static final String KML_EXT = "kml";
     public static final String KMZ_EXT = "kmz";
+    public static final String GML_EXT = "gml";
     public static final String XLS_EXT = "xls";
     public static final String ODS_EXT = "ods";
@@ -121,4 +122,5 @@
     public static final ExtensionFileFilter MIF_TAB_FILE_FILTER = new ExtensionFileFilter(MIF_EXT+","+TAB_EXT, MIF_EXT, tr("MapInfo files") + " (*."+MIF_EXT+",*."+TAB_EXT+")");
     public static final ExtensionFileFilter KML_KMZ_FILE_FILTER = new ExtensionFileFilter(KML_EXT+","+KMZ_EXT, KMZ_EXT, tr("KML/KMZ files") + " (*."+KML_EXT+",*."+KMZ_EXT+")");
+    public static final ExtensionFileFilter GML_FILE_FILTER = new ExtensionFileFilter(GML_EXT, GML_EXT, tr("GML files") + " (*."+GML_EXT+")");
     public static final ExtensionFileFilter ZIP_FILE_FILTER = new ExtensionFileFilter(ZIP_EXT, ZIP_EXT, tr("Zip Files") + " (*."+ZIP_EXT+")");
     public static final ExtensionFileFilter XML_FILE_FILTER = new ExtensionFileFilter(XML_EXT, XML_EXT, tr("OpenData XML files") + " (*."+XML_EXT+")");
@@ -142,19 +144,4 @@
 
     /**
-     * KML tags
-     */
-    public static final String KML_PLACEMARK   = "Placemark";
-    public static final String KML_NAME	       = "name";
-    public static final String KML_COLOR       = "color";
-    public static final String KML_SIMPLE_DATA = "SimpleData";
-    public static final String KML_LINE_STRING = "LineString";
-    public static final String KML_POINT       = "Point";
-    public static final String KML_POLYGON     = "Polygon";
-    public static final String KML_OUTER_BOUND = "outerBoundaryIs";
-    public static final String KML_INNER_BOUND = "innerBoundaryIs";
-    public static final String KML_LINEAR_RING = "LinearRing";
-    public static final String KML_COORDINATES = "coordinates";
-    
-    /**
      * Resources
      */
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/datasets/AbstractDataSetHandler.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/datasets/AbstractDataSetHandler.java	(revision 28190)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/datasets/AbstractDataSetHandler.java	(revision 28191)
@@ -34,5 +34,7 @@
 import org.openstreetmap.josm.plugins.opendata.core.io.archive.DefaultZipHandler;
 import org.openstreetmap.josm.plugins.opendata.core.io.archive.ZipHandler;
+import org.openstreetmap.josm.plugins.opendata.core.io.geographic.DefaultGmlHandler;
 import org.openstreetmap.josm.plugins.opendata.core.io.geographic.DefaultShpHandler;
+import org.openstreetmap.josm.plugins.opendata.core.io.geographic.GmlHandler;
 import org.openstreetmap.josm.plugins.opendata.core.io.geographic.ShpHandler;
 import org.openstreetmap.josm.plugins.opendata.core.io.tabular.CsvHandler;
@@ -87,4 +89,5 @@
 		setZipHandler(new DefaultZipHandler());
 		setCsvHandler(new DefaultCsvHandler());
+		setGmlHandler(new DefaultGmlHandler());
 	}
 	
@@ -428,4 +431,16 @@
 	}
 
+	// --------- GML handling ---------
+	
+	private GmlHandler gmlHandler;
+
+	public final void setGmlHandler(GmlHandler handler) {
+		gmlHandler = handler;
+	}
+	
+	public final GmlHandler getGmlHandler() {
+		return gmlHandler;
+	}
+
 	// ------------ Zip handling ------------
 	
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/datasets/NationalHandlers.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/datasets/NationalHandlers.java	(revision 28191)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/datasets/NationalHandlers.java	(revision 28191)
@@ -0,0 +1,32 @@
+//    JOSM opendata plugin.
+//    Copyright (C) 2011-2012 Don-vip
+//
+//    This program is free software: you can redistribute it and/or modify
+//    it under the terms of the GNU General Public License as published by
+//    the Free Software Foundation, either version 3 of the License, or
+//    (at your option) any later version.
+//
+//    This program is distributed in the hope that it will be useful,
+//    but WITHOUT ANY WARRANTY; without even the implied warranty of
+//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//    GNU General Public License for more details.
+//
+//    You should have received a copy of the GNU General Public License
+//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+package org.openstreetmap.josm.plugins.opendata.core.datasets;
+
+import org.openstreetmap.josm.plugins.opendata.core.datasets.at.AustrianGmlHandler;
+import org.openstreetmap.josm.plugins.opendata.core.datasets.fr.FrenchShpHandler;
+import org.openstreetmap.josm.plugins.opendata.core.io.geographic.GmlHandler;
+import org.openstreetmap.josm.plugins.opendata.core.io.geographic.ShpHandler;
+
+public abstract class NationalHandlers {
+
+	public static final GmlHandler[] DEFAULT_GML_HANDLERS = new GmlHandler[]{
+		new AustrianGmlHandler()
+	};
+
+	public static final ShpHandler[] DEFAULT_SHP_HANDLERS = new ShpHandler[]{
+		new FrenchShpHandler()
+	};
+}
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/datasets/at/AustrianConstants.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/datasets/at/AustrianConstants.java	(revision 28191)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/datasets/at/AustrianConstants.java	(revision 28191)
@@ -0,0 +1,26 @@
+//    JOSM opendata plugin.
+//    Copyright (C) 2011-2012 Don-vip
+//
+//    This program is free software: you can redistribute it and/or modify
+//    it under the terms of the GNU General Public License as published by
+//    the Free Software Foundation, either version 3 of the License, or
+//    (at your option) any later version.
+//
+//    This program is distributed in the hope that it will be useful,
+//    but WITHOUT ANY WARRANTY; without even the implied warranty of
+//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//    GNU General Public License for more details.
+//
+//    You should have received a copy of the GNU General Public License
+//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+package org.openstreetmap.josm.plugins.opendata.core.datasets.at;
+
+import org.openstreetmap.josm.plugins.opendata.core.OdConstants;
+
+public interface AustrianConstants extends OdConstants {
+
+	/**
+	 * Icon
+	 */
+	public static final String ICON_AT_24 = "at24.png";
+}
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/datasets/at/AustrianGmlHandler.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/datasets/at/AustrianGmlHandler.java	(revision 28191)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/datasets/at/AustrianGmlHandler.java	(revision 28191)
@@ -0,0 +1,70 @@
+//    JOSM opendata plugin.
+//    Copyright (C) 2011-2012 Don-vip
+//
+//    This program is free software: you can redistribute it and/or modify
+//    it under the terms of the GNU General Public License as published by
+//    the Free Software Foundation, either version 3 of the License, or
+//    (at your option) any later version.
+//
+//    This program is distributed in the hope that it will be useful,
+//    but WITHOUT ANY WARRANTY; without even the implied warranty of
+//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//    GNU General Public License for more details.
+//
+//    You should have received a copy of the GNU General Public License
+//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+package org.openstreetmap.josm.plugins.opendata.core.datasets.at;
+
+import org.geotools.referencing.CRS;
+import org.opengis.referencing.FactoryException;
+import org.opengis.referencing.NoSuchAuthorityCodeException;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.openstreetmap.josm.plugins.opendata.core.io.geographic.DefaultGmlHandler;
+
+public class AustrianGmlHandler extends DefaultGmlHandler {
+
+	@Override
+	public CoordinateReferenceSystem getCrsFor(String crsName)
+			throws NoSuchAuthorityCodeException, FactoryException {
+		
+		// See http://www.esri-austria.at/downloads/coords_at.html
+		
+		if (crsName != null && crsName.startsWith("AUT")) {
+			if (crsName.equalsIgnoreCase("AUT-GK28")) {             // Gauß-Krüger, Meridianstreifen M28
+				return CRS.decode("EPSG:31281");
+			
+			} else if (crsName.equalsIgnoreCase("AUT-GK31")) {      // Gauß-Krüger, Meridianstreifen M31
+				return CRS.decode("EPSG:31282");
+				
+			} else if (crsName.equalsIgnoreCase("AUT-GK34")) {      // Gauß-Krüger, Meridianstreifen M34
+				return CRS.decode("EPSG:31283");
+				
+			} else if (crsName.equalsIgnoreCase("AUT-GK28-5")) {    // Gauß-Krüger, Meridianstreifen M28, ohne 5 Mio. im Hochwert
+				return CRS.decode("EPSG:31251");
+				
+			} else if (crsName.equalsIgnoreCase("AUT-GK31-5")) {    // Gauß-Krüger, Meridianstreifen M31, ohne 5 Mio. im Hochwert
+				return CRS.decode("EPSG:31252");
+				
+			} else if (crsName.equalsIgnoreCase("AUT-GK34-5")) {    // Gauß-Krüger, Meridianstreifen M34, ohne 5 Mio. im Hochwert
+				return CRS.decode("EPSG:31253");
+				
+			} else if (crsName.equalsIgnoreCase("AUT-BM28")) {      // Bundesmeldenetz, Meridianstreifen M28
+				return CRS.decode("EPSG:31288");
+				
+			} else if (crsName.equalsIgnoreCase("AUT-BM31")) {      // Bundesmeldenetz, Meridianstreifen M31
+				return CRS.decode("EPSG:31289");
+				
+			} else if (crsName.equalsIgnoreCase("AUT-BM34")) {      // Bundesmeldenetz, Meridianstreifen M34
+				return CRS.decode("EPSG:31290");
+				
+			} else if (crsName.equalsIgnoreCase("AUT-LM")) {        // Lambertsche Kegelprojektion (geogr. Breite des Koo.Ursprungs = 47°30')
+				return CRS.decode("EPSG:31287");
+				
+			} else if (crsName.equalsIgnoreCase("AUT-LL-BESSEL")) { // Geographische Koordinaten auf dem Bessel-Ellipsoid, Längenzählung nach Greenwich
+				// See http://josebatiz.com/granvision/Almap/Install/Data1/_B5694C166D6A4B5390B1E547C6A1FAF6
+				// FIXME
+			}
+		}
+		return super.getCrsFor(crsName);
+	}
+}
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/datasets/fr/FrenchShpHandler.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/datasets/fr/FrenchShpHandler.java	(revision 28190)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/datasets/fr/FrenchShpHandler.java	(revision 28191)
@@ -20,4 +20,5 @@
 import org.geotools.referencing.operation.projection.MapProjection.AbstractProvider;
 import org.opengis.referencing.FactoryException;
+import org.opengis.referencing.NoSuchAuthorityCodeException;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
 import org.opengis.referencing.crs.ProjectedCRS;
@@ -28,4 +29,15 @@
 public class FrenchShpHandler extends DefaultShpHandler {
 
+	@Override
+	public CoordinateReferenceSystem getCrsFor(String crsName) throws NoSuchAuthorityCodeException, FactoryException {
+		if (crsName.equalsIgnoreCase("RGM04")) {
+			return CRS.decode("EPSG:4471");
+		} else if (crsName.equalsIgnoreCase("RGFG95_UTM_Zone_22N")) {
+			return CRS.decode("EPSG:2972");
+		} else {
+			return super.getCrsFor(crsName);
+		}
+	}
+
 	/* (non-Javadoc)
 	 * @see org.openstreetmap.josm.plugins.opendata.core.datasets.AbstractDataSetHandler#findMathTransform(org.opengis.referencing.crs.CoordinateReferenceSystem, org.opengis.referencing.crs.CoordinateReferenceSystem, boolean)
@@ -34,9 +46,5 @@
 	public MathTransform findMathTransform(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, boolean lenient)
 			throws FactoryException {
-		if (sourceCRS.getName().getCode().equalsIgnoreCase("RGM04")) {
-			return CRS.findMathTransform(CRS.decode("EPSG:4471"), targetCRS, lenient);
-		} else if (sourceCRS.getName().getCode().equalsIgnoreCase("RGFG95_UTM_Zone_22N")) {
-			return CRS.findMathTransform(CRS.decode("EPSG:2972"), targetCRS, lenient);
-		} else if (sourceCRS.getName().getCode().equalsIgnoreCase("Lambert I Nord")) {
+		if (sourceCRS.getName().getCode().equalsIgnoreCase("Lambert I Nord")) {
 			if (sourceCRS instanceof ProjectedCRS) {
 				GeodeticDatum datum = ((ProjectedCRS) sourceCRS).getDatum();
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/gui/AskLicenseAgreementDialog.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/gui/AskLicenseAgreementDialog.java	(revision 28190)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/gui/AskLicenseAgreementDialog.java	(revision 28191)
@@ -1,2 +1,17 @@
+//    JOSM opendata plugin.
+//    Copyright (C) 2011-2012 Don-vip
+//
+//    This program is free software: you can redistribute it and/or modify
+//    it under the terms of the GNU General Public License as published by
+//    the Free Software Foundation, either version 3 of the License, or
+//    (at your option) any later version.
+//
+//    This program is distributed in the hope that it will be useful,
+//    but WITHOUT ANY WARRANTY; without even the implied warranty of
+//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//    GNU General Public License for more details.
+//
+//    You should have received a copy of the GNU General Public License
+//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 package org.openstreetmap.josm.plugins.opendata.core.gui;
 
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/gui/DialogPrompter.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/gui/DialogPrompter.java	(revision 28191)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/gui/DialogPrompter.java	(revision 28191)
@@ -0,0 +1,56 @@
+//    JOSM opendata plugin.
+//    Copyright (C) 2011-2012 Don-vip
+//
+//    This program is free software: you can redistribute it and/or modify
+//    it under the terms of the GNU General Public License as published by
+//    the Free Software Foundation, either version 3 of the License, or
+//    (at your option) any later version.
+//
+//    This program is distributed in the hope that it will be useful,
+//    but WITHOUT ANY WARRANTY; without even the implied warranty of
+//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//    GNU General Public License for more details.
+//
+//    You should have received a copy of the GNU General Public License
+//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+package org.openstreetmap.josm.plugins.opendata.core.gui;
+
+import java.lang.reflect.InvocationTargetException;
+
+import javax.swing.SwingUtilities;
+
+import org.openstreetmap.josm.gui.ExtendedDialog;
+
+public abstract class DialogPrompter implements Runnable {
+	
+	private int value = -1;
+
+	protected abstract ExtendedDialog buildDialog();
+	
+	@Override
+	public final void run() {
+		ExtendedDialog dlg = buildDialog();
+		if (dlg != null) {
+			value = dlg.showDialog().getValue();
+		}
+	}
+	
+	public final DialogPrompter promptInEdt() {
+		if (SwingUtilities.isEventDispatchThread()) {
+			run();
+		} else {
+			try {
+				SwingUtilities.invokeAndWait(this);
+			} catch (InterruptedException e) {
+				e.printStackTrace();
+			} catch (InvocationTargetException e) {
+				e.printStackTrace();
+			}
+		}
+		return this;
+	}
+
+	public final int getValue() {
+		return value;
+	}
+}
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/NetworkReader.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/NetworkReader.java	(revision 28190)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/NetworkReader.java	(revision 28191)
@@ -31,4 +31,5 @@
 import org.openstreetmap.josm.plugins.opendata.core.datasets.AbstractDataSetHandler;
 import org.openstreetmap.josm.plugins.opendata.core.io.archive.ZipReader;
+import org.openstreetmap.josm.plugins.opendata.core.io.geographic.GmlReader;
 import org.openstreetmap.josm.plugins.opendata.core.io.geographic.KmlReader;
 import org.openstreetmap.josm.plugins.opendata.core.io.geographic.KmzReader;
@@ -115,4 +116,6 @@
     	} else if (filename.endsWith("."+TAB_EXT)) {
     		return TabReader.class;
+    	} else if (filename.endsWith("."+GML_EXT)) {
+    		return GmlReader.class;
     	} else if (filename.endsWith("."+ZIP_EXT)) {
     		return ZipReader.class;
@@ -167,4 +170,6 @@
             } else if (readerClass.equals(XlsReader.class)) {
             	return XlsReader.parseDataSet(in, handler, instance);
+            } else if (readerClass.equals(GmlReader.class)) {
+            	return GmlReader.parseDataSet(in, handler, instance);
             } else {
             	throw new IllegalArgumentException("Unsupported reader class: "+readerClass.getName());
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/archive/ZipReader.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/archive/ZipReader.java	(revision 28190)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/archive/ZipReader.java	(revision 28191)
@@ -39,4 +39,5 @@
 import org.openstreetmap.josm.plugins.opendata.core.datasets.AbstractDataSetHandler;
 import org.openstreetmap.josm.plugins.opendata.core.io.NeptuneReader;
+import org.openstreetmap.josm.plugins.opendata.core.io.geographic.GmlReader;
 import org.openstreetmap.josm.plugins.opendata.core.io.geographic.KmlReader;
 import org.openstreetmap.josm.plugins.opendata.core.io.geographic.KmzReader;
@@ -133,5 +134,5 @@
 					// Test file name to see if it may contain useful data
 					for (String ext : new String[] {
-							CSV_EXT, KML_EXT, KMZ_EXT, XLS_EXT, ODS_EXT, SHP_EXT, MIF_EXT, TAB_EXT
+							CSV_EXT, KML_EXT, KMZ_EXT, XLS_EXT, ODS_EXT, SHP_EXT, MIF_EXT, TAB_EXT, GML_EXT
 					}) {
 						if (entry.getName().toLowerCase().endsWith("."+ext)) {
@@ -187,4 +188,6 @@
 				} else if (file.getName().toLowerCase().endsWith(TAB_EXT)) {
 					from = TabReader.parseDataSet(in, file, handler, instance);
+				} else if (file.getName().toLowerCase().endsWith(GML_EXT)) {
+					from = GmlReader.parseDataSet(in, handler, instance);
 				} else if (file.getName().toLowerCase().endsWith(XML_EXT)) {
 					if (OdPlugin.getInstance().xmlImporter.acceptFile(file)) {
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/AbstractMapInfoReader.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/AbstractMapInfoReader.java	(revision 28190)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/AbstractMapInfoReader.java	(revision 28191)
@@ -1,2 +1,17 @@
+//    JOSM opendata plugin.
+//    Copyright (C) 2011-2012 Don-vip
+//
+//    This program is free software: you can redistribute it and/or modify
+//    it under the terms of the GNU General Public License as published by
+//    the Free Software Foundation, either version 3 of the License, or
+//    (at your option) any later version.
+//
+//    This program is distributed in the hope that it will be useful,
+//    but WITHOUT ANY WARRANTY; without even the implied warranty of
+//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//    GNU General Public License for more details.
+//
+//    You should have received a copy of the GNU General Public License
+//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 package org.openstreetmap.josm.plugins.opendata.core.io.geographic;
 
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/DefaultGeographicHandler.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/DefaultGeographicHandler.java	(revision 28191)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/DefaultGeographicHandler.java	(revision 28191)
@@ -0,0 +1,66 @@
+//    JOSM opendata plugin.
+//    Copyright (C) 2011-2012 Don-vip
+//
+//    This program is free software: you can redistribute it and/or modify
+//    it under the terms of the GNU General Public License as published by
+//    the Free Software Foundation, either version 3 of the License, or
+//    (at your option) any later version.
+//
+//    This program is distributed in the hope that it will be useful,
+//    but WITHOUT ANY WARRANTY; without even the implied warranty of
+//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//    GNU General Public License for more details.
+//
+//    You should have received a copy of the GNU General Public License
+//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+package org.openstreetmap.josm.plugins.opendata.core.io.geographic;
+
+import org.geotools.referencing.CRS;
+import org.opengis.referencing.FactoryException;
+import org.opengis.referencing.NoSuchAuthorityCodeException;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+
+public abstract class DefaultGeographicHandler implements GeographicHandler {
+
+	private boolean useNodeMap = true;
+	private boolean checkNodeProximity = false;
+	private boolean preferMultipolygonToSimpleWay = false;
+
+	@Override
+	public boolean preferMultipolygonToSimpleWay() {
+		return preferMultipolygonToSimpleWay;
+	}
+
+	@Override
+	public void setPreferMultipolygonToSimpleWay(boolean prefer) {
+		preferMultipolygonToSimpleWay = prefer;
+	}
+
+	@Override
+	public boolean checkNodeProximity() {
+		return checkNodeProximity;
+	}
+
+	@Override
+	public void setCheckNodeProximity(boolean check) {
+		checkNodeProximity = check;
+	}
+
+	@Override
+	public void setUseNodeMap(boolean use) {
+		useNodeMap = use;
+	}
+
+	@Override
+	public boolean useNodeMap() {
+		return useNodeMap;
+	}
+
+	@Override
+	public CoordinateReferenceSystem getCrsFor(String crsName) throws NoSuchAuthorityCodeException, FactoryException {
+		if (crsName.equalsIgnoreCase("GCS_ETRS_1989")) {
+			return CRS.decode("EPSG:4258");
+		}
+		return null;
+	}
+}
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/DefaultGmlHandler.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/DefaultGmlHandler.java	(revision 28191)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/DefaultGmlHandler.java	(revision 28191)
@@ -0,0 +1,30 @@
+//    JOSM opendata plugin.
+//    Copyright (C) 2011-2012 Don-vip
+//
+//    This program is free software: you can redistribute it and/or modify
+//    it under the terms of the GNU General Public License as published by
+//    the Free Software Foundation, either version 3 of the License, or
+//    (at your option) any later version.
+//
+//    This program is distributed in the hope that it will be useful,
+//    but WITHOUT ANY WARRANTY; without even the implied warranty of
+//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//    GNU General Public License for more details.
+//
+//    You should have received a copy of the GNU General Public License
+//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+package org.openstreetmap.josm.plugins.opendata.core.io.geographic;
+
+import org.geotools.referencing.CRS;
+import org.opengis.referencing.FactoryException;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.opengis.referencing.operation.MathTransform;
+
+public class DefaultGmlHandler extends DefaultGeographicHandler implements GmlHandler {
+
+	@Override
+	public MathTransform findMathTransform(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, boolean lenient)
+			throws FactoryException {
+		return CRS.findMathTransform(sourceCRS, targetCRS, lenient);
+	}
+}
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/DefaultShpHandler.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/DefaultShpHandler.java	(revision 28190)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/DefaultShpHandler.java	(revision 28191)
@@ -32,5 +32,4 @@
 import org.opengis.referencing.FactoryException;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
-import org.opengis.referencing.crs.GeographicCRS;
 import org.opengis.referencing.datum.GeodeticDatum;
 import org.opengis.referencing.operation.MathTransform;
@@ -49,5 +48,5 @@
 import org.openstreetmap.josm.tools.Pair;
 
-public class DefaultShpHandler implements ShpHandler, OdConstants {
+public class DefaultShpHandler extends DefaultGeographicHandler implements ShpHandler, OdConstants {
 
 	private static final List<Pair<org.opengis.referencing.datum.Ellipsoid, Ellipsoid>> 
@@ -70,15 +69,11 @@
 	}
 	
-	private boolean useNodeMap = true;
-	private boolean checkNodeProximity = false;
-	private boolean preferMultipolygonToSimpleWay = false;
 	private Charset dbfCharset = null;
 
 	@Override
-	public MathTransform findMathTransform(CoordinateReferenceSystem sourceCRS,
-			CoordinateReferenceSystem targetCRS, boolean lenient)
+	public MathTransform findMathTransform(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, boolean lenient)
 			throws FactoryException {
-		if (sourceCRS instanceof GeographicCRS && sourceCRS.getName().getCode().equalsIgnoreCase("GCS_ETRS_1989")) {
-			return CRS.findMathTransform(CRS.decode("EPSG:4258"), targetCRS, lenient);
+		if (getCrsFor(sourceCRS.getName().getCode()) != null) {
+			return CRS.findMathTransform(getCrsFor(sourceCRS.getName().getCode()), targetCRS, lenient);
 		} else if (sourceCRS instanceof AbstractDerivedCRS && sourceCRS.getName().getCode().equalsIgnoreCase("Lambert_Conformal_Conic")) {
 			List<MathTransform> result = new ArrayList<MathTransform>();
@@ -139,34 +134,4 @@
 
 	@Override
-	public boolean preferMultipolygonToSimpleWay() {
-		return preferMultipolygonToSimpleWay;
-	}
-
-	@Override
-	public void setPreferMultipolygonToSimpleWay(boolean prefer) {
-		preferMultipolygonToSimpleWay = prefer;
-	}
-
-	@Override
-	public boolean checkNodeProximity() {
-		return checkNodeProximity;
-	}
-
-	@Override
-	public void setCheckNodeProximity(boolean check) {
-		checkNodeProximity = check;
-	}
-
-	@Override
-	public void setUseNodeMap(boolean use) {
-		useNodeMap = use;
-	}
-
-	@Override
-	public boolean useNodeMap() {
-		return useNodeMap;
-	}
-
-	@Override
 	public void notifyFeatureParsed(Object feature, DataSet result, Set<OsmPrimitive> featurePrimitives) {
 		// To be overriden by modules handlers
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GeoCrsException.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GeoCrsException.java	(revision 28191)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GeoCrsException.java	(revision 28191)
@@ -0,0 +1,35 @@
+//    JOSM opendata plugin.
+//    Copyright (C) 2011-2012 Don-vip
+//
+//    This program is free software: you can redistribute it and/or modify
+//    it under the terms of the GNU General Public License as published by
+//    the Free Software Foundation, either version 3 of the License, or
+//    (at your option) any later version.
+//
+//    This program is distributed in the hope that it will be useful,
+//    but WITHOUT ANY WARRANTY; without even the implied warranty of
+//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//    GNU General Public License for more details.
+//
+//    You should have received a copy of the GNU General Public License
+//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+package org.openstreetmap.josm.plugins.opendata.core.io.geographic;
+
+public class GeoCrsException extends Exception {
+
+	public GeoCrsException() {
+		super();
+	}
+
+	public GeoCrsException(String message, Throwable cause) {
+		super(message, cause);
+	}
+
+	public GeoCrsException(String message) {
+		super(message);
+	}
+
+	public GeoCrsException(Throwable cause) {
+		super(cause);
+	}
+}
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GeoMathTransformException.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GeoMathTransformException.java	(revision 28191)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GeoMathTransformException.java	(revision 28191)
@@ -0,0 +1,35 @@
+//    JOSM opendata plugin.
+//    Copyright (C) 2011-2012 Don-vip
+//
+//    This program is free software: you can redistribute it and/or modify
+//    it under the terms of the GNU General Public License as published by
+//    the Free Software Foundation, either version 3 of the License, or
+//    (at your option) any later version.
+//
+//    This program is distributed in the hope that it will be useful,
+//    but WITHOUT ANY WARRANTY; without even the implied warranty of
+//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//    GNU General Public License for more details.
+//
+//    You should have received a copy of the GNU General Public License
+//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+package org.openstreetmap.josm.plugins.opendata.core.io.geographic;
+
+public class GeoMathTransformException extends Exception {
+
+	public GeoMathTransformException() {
+		super();
+	}
+
+	public GeoMathTransformException(String message, Throwable cause) {
+		super(message, cause);
+	}
+
+	public GeoMathTransformException(String message) {
+		super(message);
+	}
+
+	public GeoMathTransformException(Throwable cause) {
+		super(cause);
+	}
+}
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GeographicHandler.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GeographicHandler.java	(revision 28191)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GeographicHandler.java	(revision 28191)
@@ -0,0 +1,40 @@
+//    JOSM opendata plugin.
+//    Copyright (C) 2011-2012 Don-vip
+//
+//    This program is free software: you can redistribute it and/or modify
+//    it under the terms of the GNU General Public License as published by
+//    the Free Software Foundation, either version 3 of the License, or
+//    (at your option) any later version.
+//
+//    This program is distributed in the hope that it will be useful,
+//    but WITHOUT ANY WARRANTY; without even the implied warranty of
+//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//    GNU General Public License for more details.
+//
+//    You should have received a copy of the GNU General Public License
+//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+package org.openstreetmap.josm.plugins.opendata.core.io.geographic;
+
+import org.opengis.referencing.FactoryException;
+import org.opengis.referencing.NoSuchAuthorityCodeException;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.opengis.referencing.operation.MathTransform;
+
+public interface GeographicHandler {
+	
+	public void setPreferMultipolygonToSimpleWay(boolean prefer);
+
+	public boolean preferMultipolygonToSimpleWay();
+
+	public void setCheckNodeProximity(boolean check);
+	
+	public boolean checkNodeProximity();
+	
+	public void setUseNodeMap(boolean use);
+	
+	public boolean useNodeMap();
+	
+	public CoordinateReferenceSystem getCrsFor(String crsName) throws NoSuchAuthorityCodeException, FactoryException;
+
+	public MathTransform findMathTransform(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, boolean lenient) throws FactoryException;
+}
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GeographicReader.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GeographicReader.java	(revision 28191)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GeographicReader.java	(revision 28191)
@@ -0,0 +1,320 @@
+//    JOSM opendata plugin.
+//    Copyright (C) 2011-2012 Don-vip
+//
+//    This program is free software: you can redistribute it and/or modify
+//    it under the terms of the GNU General Public License as published by
+//    the Free Software Foundation, either version 3 of the License, or
+//    (at your option) any later version.
+//
+//    This program is distributed in the hope that it will be useful,
+//    but WITHOUT ANY WARRANTY; without even the implied warranty of
+//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//    GNU General Public License for more details.
+//
+//    You should have received a copy of the GNU General Public License
+//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+package org.openstreetmap.josm.plugins.opendata.core.io.geographic;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.Component;
+import java.awt.Image;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+import javax.swing.JOptionPane;
+
+import org.geotools.factory.Hints;
+import org.geotools.geometry.jts.JTS;
+import org.geotools.referencing.AbstractIdentifiedObject;
+import org.geotools.referencing.CRS;
+import org.geotools.referencing.crs.AbstractCRS;
+import org.geotools.referencing.crs.AbstractDerivedCRS;
+import org.geotools.referencing.crs.AbstractSingleCRS;
+import org.opengis.geometry.MismatchedDimensionException;
+import org.opengis.referencing.FactoryException;
+import org.opengis.referencing.IdentifiedObject;
+import org.opengis.referencing.NoSuchAuthorityCodeException;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.opengis.referencing.crs.ProjectedCRS;
+import org.opengis.referencing.cs.CoordinateSystem;
+import org.opengis.referencing.datum.Datum;
+import org.opengis.referencing.operation.MathTransform;
+import org.opengis.referencing.operation.OperationNotFoundException;
+import org.opengis.referencing.operation.TransformException;
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.corrector.UserCancelException;
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.osm.Node;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.data.osm.Relation;
+import org.openstreetmap.josm.data.osm.RelationMember;
+import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.gui.ExtendedDialog;
+import org.openstreetmap.josm.io.AbstractReader;
+import org.openstreetmap.josm.plugins.opendata.core.OdConstants;
+import org.openstreetmap.josm.plugins.opendata.core.gui.DialogPrompter;
+import org.openstreetmap.josm.tools.ImageProvider;
+
+import com.vividsolutions.jts.geom.LineString;
+import com.vividsolutions.jts.geom.Point;
+
+public abstract class GeographicReader extends AbstractReader implements OdConstants {
+
+	protected static CoordinateReferenceSystem wgs84;
+	static {
+		try {
+			wgs84 = CRS.decode("EPSG:4326");
+		} catch (NoSuchAuthorityCodeException e) {
+			e.printStackTrace();
+		} catch (FactoryException e) {
+			e.printStackTrace();
+		}
+	}
+	
+	private final GeographicHandler handler;
+	private final GeographicHandler[] defaultHandlers;
+	
+	protected final Map<LatLon, Node> nodes;
+
+	protected CoordinateReferenceSystem crs;
+	protected MathTransform transform;
+
+	public GeographicReader(GeographicHandler handler, GeographicHandler[] defaultHandlers) {
+		this.nodes = new HashMap<LatLon, Node>();
+		this.handler = handler;
+		this.defaultHandlers = defaultHandlers;
+	}
+	
+	protected Node getNode(Point p, LatLon key) {
+		Node n = nodes.get(key);
+		if (n == null && handler != null && handler.checkNodeProximity()) {
+			LatLon ll = new LatLon(p.getY(), p.getX());
+			for (Node node : nodes.values()) {
+				if (node.getCoor().equalsEpsilon(ll)) {
+					return node;
+				}
+			}
+		}
+		return n;
+	}
+
+	protected Node createOrGetNode(Point p) throws MismatchedDimensionException, TransformException {
+		return createOrGetNode(p, null);
+	}
+
+	protected Node createOrGetNode(Point p, String ele) throws MismatchedDimensionException, TransformException {
+		Point p2 = (Point) JTS.transform(p, transform);
+		LatLon key = new LatLon(p2.getY(), p2.getX());
+		Node n = getNode(p2, key);
+		if (n == null) {
+			n = new Node(key);
+			if (ele != null) {
+				n.put("ele", ele);
+			}
+			if (handler == null || handler.useNodeMap()) {
+				nodes.put(key, n);
+			}
+			ds.addPrimitive(n);
+		} else if (n.getDataSet() == null) {
+		    // handler may have removed the node from DataSet (see Paris public light handler for example)
+		    ds.addPrimitive(n);
+		}
+		return n;
+	}
+	
+	protected <T extends OsmPrimitive> T addOsmPrimitive(T p) {
+		ds.addPrimitive(p);
+		return p;
+	}
+
+	protected final Way createWay() {
+		return addOsmPrimitive(new Way());
+	}
+
+	protected final Way createWay(LineString ls) {
+		Way w = createWay();
+		if (ls != null) {
+			for (int i=0; i<ls.getNumPoints(); i++) {
+				try {
+					w.addNode(createOrGetNode(ls.getPointN(i)));
+				} catch (Exception e) {
+					System.err.println(e.getMessage());
+				}
+			}
+		}
+		return w;
+	}
+
+	protected final Relation createMultipolygon() {
+		Relation r = new Relation();
+		r.put("type", "multipolygon");
+		return addOsmPrimitive(r);
+	}
+
+	protected final void addWayToMp(Relation r, String role, Way w) {
+		r.addMember(new RelationMember(role, w));
+	}
+	
+    /**
+     * returns true if the user wants to cancel, false if they
+     * want to continue
+     */
+    protected static final boolean warnLenientMethod(final Component parent, final CoordinateReferenceSystem crs) {
+    	return new DialogPrompter() {
+			@Override
+			protected ExtendedDialog buildDialog() {
+		        final ExtendedDialog dlg = new ExtendedDialog(parent,
+		                tr("Cannot transform to WGS84"),
+		                new String[] {tr("Cancel"), tr("Continue")});
+		        dlg.setContent("<html>" +
+		                tr("JOSM was unable to find a strict mathematical transformation between ''{0}'' and WGS84.<br /><br />"+
+		                        "Do you want to try a <i>lenient</i> method, which will perform a non-precise transformation (<b>with location errors up to 1 km</b>) ?<br/><br/>"+
+		                        "If so, <b>do NOT upload</b> such data to OSM !", crs.getName())+
+		                "</html>");
+		        dlg.setButtonIcons(new Icon[] {
+		                ImageProvider.get("cancel"),
+		                ImageProvider.overlay(
+		                        ImageProvider.get("ok"),
+		                        new ImageIcon(ImageProvider.get("warning-small").getImage().getScaledInstance(10 , 10, Image.SCALE_SMOOTH)),
+		                        ImageProvider.OverlayPosition.SOUTHEAST)});
+		        dlg.setToolTipTexts(new String[] {
+		                tr("Cancel"),
+		                tr("Try lenient method")});
+		        dlg.setIcon(JOptionPane.WARNING_MESSAGE);
+		        dlg.setCancelButton(1);
+		        return dlg;
+			}
+		}.promptInEdt().getValue() != 2;
+    }
+    
+	private static final void compareDebug(CoordinateReferenceSystem crs1, CoordinateReferenceSystem crs2) {
+		System.out.println("-- COMPARING "+crs1.getName()+" WITH "+crs2.getName()+" --");
+		compareDebug("class", crs1.getClass(), crs2.getClass());
+		CoordinateSystem cs1 = crs1.getCoordinateSystem();
+		CoordinateSystem cs2 = crs2.getCoordinateSystem();
+		if (!compareDebug("cs", cs1, cs2)) {
+			Integer dim1 = cs1.getDimension();
+			Integer dim2 = cs2.getDimension();
+			if (compareDebug("cs.dim", dim1, dim2)) {
+				for (int i = 0; i<dim1; i++) {
+					compareDebug("cs.axis"+i, cs1.getAxis(i), cs1.getAxis(i));
+				}
+			}
+		}
+		if (crs1 instanceof AbstractSingleCRS) {
+			Datum datum1 = ((AbstractSingleCRS) crs1).getDatum();
+			Datum datum2 = ((AbstractSingleCRS) crs2).getDatum();
+			if (!compareDebug("datum", datum1, datum2)) {
+				AbstractIdentifiedObject adatum1 = (AbstractIdentifiedObject) datum1;
+				AbstractIdentifiedObject adatum2 = (AbstractIdentifiedObject) datum2;
+				compareDebug("datum.name1", adatum1.nameMatches(adatum2.getName().getCode()), adatum1.getName(), adatum2.getName());
+				compareDebug("datum.name2", adatum2.nameMatches(adatum1.getName().getCode()), adatum2.getName(), adatum1.getName());
+			}
+			if (crs1 instanceof AbstractDerivedCRS) {
+				AbstractDerivedCRS adcrs1 = (AbstractDerivedCRS) crs1;
+				AbstractDerivedCRS adcrs2 = (AbstractDerivedCRS) crs2;
+				compareDebug("baseCRS", adcrs1.getBaseCRS(), adcrs2.getBaseCRS());
+				compareDebug("conversionFromBase", adcrs1.getConversionFromBase(), adcrs2.getConversionFromBase());
+			}
+		}
+		System.out.println("-- COMPARING FINISHED --");
+	}
+	
+	private static final boolean compareDebug(String text, Object o1, Object o2) {
+		return compareDebug(text, o1.equals(o2), o1, o2);
+	}
+	
+	private static final boolean compareDebug(String text, IdentifiedObject o1, IdentifiedObject o2) {
+		return compareDebug(text, (AbstractIdentifiedObject)o1, (AbstractIdentifiedObject)o2);
+	}
+	
+	private static final boolean compareDebug(String text, AbstractIdentifiedObject o1, AbstractIdentifiedObject o2) {
+		return compareDebug(text, o1.equals(o2, false), o1, o2);
+	}
+
+	private static final boolean compareDebug(String text, boolean result, Object o1, Object o2) {
+		System.out.println(text + ": " + result + "("+o1+", "+o2+")");
+		return result;
+	}
+	
+	protected void findMathTransform(Component parent, boolean findSimiliarCrs) throws FactoryException, UserCancelException, GeoMathTransformException {
+		try {
+			transform = CRS.findMathTransform(crs, wgs84);
+		} catch (OperationNotFoundException e) {
+			System.out.println(crs.getName()+": "+e.getMessage()); // Bursa wolf parameters required.
+			
+			if (findSimiliarCrs) { 
+				List<CoordinateReferenceSystem> candidates = new ArrayList<CoordinateReferenceSystem>();
+				
+				// Find matching CRS with Bursa Wolf parameters in EPSG database
+				for (String code : CRS.getAuthorityFactory(false).getAuthorityCodes(ProjectedCRS.class)) {
+					CoordinateReferenceSystem candidate = CRS.decode(code);
+					if (candidate instanceof AbstractCRS && crs instanceof AbstractIdentifiedObject) {
+						
+						Hints.putSystemDefault(Hints.COMPARISON_TOLERANCE, 
+								Main.pref.getDouble(PREF_CRS_COMPARISON_TOLERANCE, DEFAULT_CRS_COMPARISON_TOLERANCE));
+						if (((AbstractCRS)candidate).equals((AbstractIdentifiedObject)crs, false)) {
+							System.out.println("Found a potential CRS: "+candidate.getName());
+							candidates.add(candidate);
+						} else if (Main.pref.getBoolean(PREF_CRS_COMPARISON_DEBUG, false)) {
+							compareDebug(crs, candidate);
+						}
+						Hints.removeSystemDefault(Hints.COMPARISON_TOLERANCE);
+					}
+				}
+				
+				if (candidates.size() > 1) {
+					System.err.println("Found several potential CRS.");//TODO: ask user which one to use
+				}
+				
+				if (candidates.size() > 0) {
+					CoordinateReferenceSystem newCRS = candidates.get(0);
+					try {
+						transform = CRS.findMathTransform(newCRS, wgs84, false);
+					} catch (OperationNotFoundException ex) {
+						System.err.println(newCRS.getName()+": "+e.getMessage());
+					}
+				}
+			}
+			
+			if (transform == null) {
+				if (handler != null) {
+					// ask handler if it can provide a math transform
+					try {
+						transform = handler.findMathTransform(crs, wgs84, false);
+					} catch (OperationNotFoundException ex) {
+						System.out.println(crs.getName()+": "+ex.getMessage()); // Bursa wolf parameters required.
+					}
+				} else {
+					// ask default known handlers
+					for (GeographicHandler geoHandler : defaultHandlers) {
+						try {
+							if ((transform = geoHandler.findMathTransform(crs, wgs84, false)) != null) {
+								break;
+							}
+						} catch (OperationNotFoundException ex) {
+							System.out.println(crs.getName()+": "+ex.getMessage()); // Bursa wolf parameters required.
+						}
+					}
+				}
+				if (transform == null) {
+					// ask user before trying lenient method
+					if (warnLenientMethod(parent, crs)) {
+						// User canceled
+						throw new UserCancelException();
+					}
+					System.out.println("Searching for a lenient math transform.");
+					transform = CRS.findMathTransform(crs, wgs84, true);
+				}
+			}
+		}
+		if (transform == null) {
+			throw new GeoMathTransformException("Unable to find math transform !");
+		}
+	}
+}
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GmlHandler.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GmlHandler.java	(revision 28191)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GmlHandler.java	(revision 28191)
@@ -0,0 +1,20 @@
+//    JOSM opendata plugin.
+//    Copyright (C) 2011-2012 Don-vip
+//
+//    This program is free software: you can redistribute it and/or modify
+//    it under the terms of the GNU General Public License as published by
+//    the Free Software Foundation, either version 3 of the License, or
+//    (at your option) any later version.
+//
+//    This program is distributed in the hope that it will be useful,
+//    but WITHOUT ANY WARRANTY; without even the implied warranty of
+//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//    GNU General Public License for more details.
+//
+//    You should have received a copy of the GNU General Public License
+//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+package org.openstreetmap.josm.plugins.opendata.core.io.geographic;
+
+public interface GmlHandler extends GeographicHandler {
+
+}
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GmlImporter.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GmlImporter.java	(revision 28191)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GmlImporter.java	(revision 28191)
@@ -0,0 +1,40 @@
+//    JOSM opendata plugin.
+//    Copyright (C) 2011-2012 Don-vip
+//
+//    This program is free software: you can redistribute it and/or modify
+//    it under the terms of the GNU General Public License as published by
+//    the Free Software Foundation, either version 3 of the License, or
+//    (at your option) any later version.
+//
+//    This program is distributed in the hope that it will be useful,
+//    but WITHOUT ANY WARRANTY; without even the implied warranty of
+//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//    GNU General Public License for more details.
+//
+//    You should have received a copy of the GNU General Public License
+//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+package org.openstreetmap.josm.plugins.opendata.core.io.geographic;
+
+import java.io.InputStream;
+
+import org.openstreetmap.josm.data.osm.DataSet;
+import org.openstreetmap.josm.gui.progress.ProgressMonitor;
+import org.openstreetmap.josm.io.IllegalDataException;
+import org.openstreetmap.josm.plugins.opendata.core.io.AbstractImporter;
+
+public class GmlImporter extends AbstractImporter {
+	
+    public GmlImporter() {
+        super(GML_FILE_FILTER);
+    }
+
+	@Override
+	protected DataSet parseDataSet(InputStream in, ProgressMonitor instance)
+			throws IllegalDataException {
+		try {
+			return GmlReader.parseDataSet(in, handler, instance);
+		} catch (Exception e) {
+			throw new IllegalDataException(e);
+		}
+	}
+}
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GmlReader.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GmlReader.java	(revision 28191)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GmlReader.java	(revision 28191)
@@ -0,0 +1,196 @@
+//    JOSM opendata plugin.
+//    Copyright (C) 2011-2012 Don-vip
+//
+//    This program is free software: you can redistribute it and/or modify
+//    it under the terms of the GNU General Public License as published by
+//    the Free Software Foundation, either version 3 of the License, or
+//    (at your option) any later version.
+//
+//    This program is distributed in the hope that it will be useful,
+//    but WITHOUT ANY WARRANTY; without even the implied warranty of
+//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//    GNU General Public License for more details.
+//
+//    You should have received a copy of the GNU General Public License
+//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+package org.openstreetmap.josm.plugins.opendata.core.io.geographic;
+
+import java.awt.Component;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import org.opengis.geometry.MismatchedDimensionException;
+import org.opengis.referencing.FactoryException;
+import org.opengis.referencing.NoSuchAuthorityCodeException;
+import org.opengis.referencing.crs.CoordinateReferenceSystem;
+import org.opengis.referencing.operation.MathTransform;
+import org.opengis.referencing.operation.TransformException;
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.corrector.UserCancelException;
+import org.openstreetmap.josm.data.osm.DataSet;
+import org.openstreetmap.josm.data.osm.Node;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.gui.progress.ProgressMonitor;
+import org.openstreetmap.josm.io.UTFInputStreamReader;
+import org.openstreetmap.josm.plugins.opendata.core.datasets.AbstractDataSetHandler;
+import org.openstreetmap.josm.plugins.opendata.core.datasets.NationalHandlers;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.GeometryFactory;
+import com.vividsolutions.jts.geom.Point;
+
+public class GmlReader extends GeographicReader {
+
+    public static final String GML_FEATURE_MEMBER = "featureMember";
+    public static final String GML_LINE_STRING = "LineString";
+    public static final String GML_LINEAR_RING = "LinearRing";
+    public static final String GML_SURFACE = "Surface";
+    public static final String GML_SRS_NAME = "srsName";
+    public static final String GML_SRS_DIMENSION = "srsDimension";
+    public static final String GML_POS_LIST = "posList";
+
+	private final GeometryFactory geometryFactory = new GeometryFactory();
+    
+    private final GmlHandler gmlHandler;
+	
+    private XMLStreamReader parser;
+    
+    private int dim;
+    
+    private final class CrsData {
+    	public CoordinateReferenceSystem crs;
+    	public MathTransform transform;
+    	public int dim;
+		public CrsData(CoordinateReferenceSystem crs, MathTransform transform, int dim) {
+			this.crs = crs;
+			this.transform = transform;
+			this.dim = dim;
+		}
+    }
+
+    private final Map<String, CrsData> crsDataMap = new HashMap<String, GmlReader.CrsData>();
+    
+    public GmlReader(XMLStreamReader parser, GmlHandler handler) {
+		super(handler, NationalHandlers.DEFAULT_GML_HANDLERS);
+        this.parser = parser;
+        this.gmlHandler = handler;
+    }
+
+	public static DataSet parseDataSet(InputStream in, AbstractDataSetHandler handler, ProgressMonitor instance) throws IOException, XMLStreamException {
+        InputStreamReader ir = UTFInputStreamReader.create(in, UTF8);
+        XMLStreamReader parser = XMLInputFactory.newInstance().createXMLStreamReader(ir);
+        try {
+        	return new GmlReader(parser, handler != null ? handler.getGmlHandler() : null).parseDoc(instance);
+        } catch (Exception e) {
+        	throw new IOException(e);
+        }
+	}
+	
+	private final boolean isElement(String element) {
+		return parser.getLocalName().matches("(gml:)?"+element);
+	}
+
+	private DataSet parseDoc(ProgressMonitor instance) throws XMLStreamException, GeoCrsException, FactoryException, GeoMathTransformException, MismatchedDimensionException, TransformException {
+		Component parent = instance != null ? instance.getWindowParent() : Main.parent;
+		while (parser.hasNext()) {
+            int event = parser.next();
+            if (event == XMLStreamConstants.START_ELEMENT) {
+                if (isElement(GML_FEATURE_MEMBER)) {
+                	try {
+						parseFeatureMember(parent);
+					} catch (UserCancelException e) {
+						return ds;
+					}
+                }
+            }
+		}
+		return ds;
+	}
+	
+	private void findCRS(String srs) throws NoSuchAuthorityCodeException, FactoryException {
+		System.out.println("Finding CRS for "+srs);
+		if (gmlHandler != null) {
+			crs = gmlHandler.getCrsFor(srs);
+		} else {
+			for (GmlHandler h : NationalHandlers.DEFAULT_GML_HANDLERS) {
+				if ((crs = h.getCrsFor(srs)) != null) {
+					return;
+				}
+			}
+		}
+	}
+	
+	private void parseSrs(Component parent) throws GeoCrsException, FactoryException, UserCancelException, GeoMathTransformException {
+		String srs = parser.getAttributeValue(null, GML_SRS_NAME);
+		dim = Integer.parseInt(parser.getAttributeValue(null, GML_SRS_DIMENSION));
+		CrsData crsData = crsDataMap.get(srs);
+		if (crsData == null) {
+			try {
+        		findCRS(srs);
+			} catch (NoSuchAuthorityCodeException e) {
+				e.printStackTrace();
+			} catch (FactoryException e) {
+				e.printStackTrace();
+			}
+			if (crs == null) {
+				throw new GeoCrsException("Unable to detect CRS for srs '"+srs+"' !");
+			} else {
+				findMathTransform(parent, false);
+			}
+			crsDataMap.put(srs, new CrsData(crs, transform, dim));
+		} else {
+			crs = crsData.crs;
+			transform = crsData.transform;
+			dim = crsData.dim;
+		}
+	}
+	
+	private void parseFeatureMember(Component parent) throws XMLStreamException, GeoCrsException, FactoryException, UserCancelException, GeoMathTransformException, MismatchedDimensionException, TransformException {
+		List<OsmPrimitive> list = new ArrayList<OsmPrimitive>();
+		Way way = null;
+		Node node = null;
+		Map<String, String> tags = new HashMap<String, String>();
+		while (parser.hasNext()) {
+            int event = parser.next();
+            if (event == XMLStreamConstants.START_ELEMENT) {
+            	if (isElement(GML_LINE_STRING)) {
+            		list.add(way = createWay());
+            		parseSrs(parent);
+            	} else if (isElement(GML_LINEAR_RING)) {
+            		list.add(way = createWay());
+            	} else if (isElement(GML_SURFACE)) {
+            		parseSrs(parent);
+            	} else if (isElement(GML_POS_LIST)) {
+            		String[] tab = parser.getElementText().split(" ");
+            		for (int i = 0; i < tab.length; i += dim) {
+            			Point p = geometryFactory.createPoint(new Coordinate(Double.valueOf(tab[i]), Double.valueOf(tab[i+1])));
+            			node = createOrGetNode(p, dim > 2 && !tab[i+2].equals("0") ? tab[i+2] : null);
+            			if (way != null) {
+            				way.addNode(node);
+            			}
+            		}
+            	}
+            } else if (event == XMLStreamConstants.END_ELEMENT) {
+                if (isElement(GML_FEATURE_MEMBER)) {
+                	break;
+                }
+            }
+		}
+		for (OsmPrimitive p : list) {
+			for (String key : tags.keySet()) {
+				p.put(key, tags.get(key));
+			}
+		}
+	}
+}
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/KmlReader.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/KmlReader.java	(revision 28190)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/KmlReader.java	(revision 28191)
@@ -44,4 +44,17 @@
 
 public class KmlReader extends AbstractReader implements OdConstants {
+
+    public static final String KML_PLACEMARK   = "Placemark";
+    public static final String KML_NAME	       = "name";
+    public static final String KML_COLOR       = "color";
+    public static final String KML_SIMPLE_DATA = "SimpleData";
+    public static final String KML_LINE_STRING = "LineString";
+    public static final String KML_POINT       = "Point";
+    public static final String KML_POLYGON     = "Polygon";
+    public static final String KML_OUTER_BOUND = "outerBoundaryIs";
+    public static final String KML_INNER_BOUND = "innerBoundaryIs";
+    public static final String KML_LINEAR_RING = "LinearRing";
+    public static final String KML_COORDINATES = "coordinates";
+    
 
     private XMLStreamReader parser;
Index: plications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/ShpCrsException.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/ShpCrsException.java	(revision 28190)
+++ 	(revision )
@@ -1,35 +1,0 @@
-//    JOSM opendata plugin.
-//    Copyright (C) 2011-2012 Don-vip
-//
-//    This program is free software: you can redistribute it and/or modify
-//    it under the terms of the GNU General Public License as published by
-//    the Free Software Foundation, either version 3 of the License, or
-//    (at your option) any later version.
-//
-//    This program is distributed in the hope that it will be useful,
-//    but WITHOUT ANY WARRANTY; without even the implied warranty of
-//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//    GNU General Public License for more details.
-//
-//    You should have received a copy of the GNU General Public License
-//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-package org.openstreetmap.josm.plugins.opendata.core.io.geographic;
-
-public class ShpCrsException extends Exception {
-
-	public ShpCrsException() {
-		super();
-	}
-
-	public ShpCrsException(String message, Throwable cause) {
-		super(message, cause);
-	}
-
-	public ShpCrsException(String message) {
-		super(message);
-	}
-
-	public ShpCrsException(Throwable cause) {
-		super(cause);
-	}
-}
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/ShpHandler.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/ShpHandler.java	(revision 28190)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/ShpHandler.java	(revision 28191)
@@ -19,25 +19,8 @@
 import java.util.Set;
 
-import org.opengis.referencing.FactoryException;
-import org.opengis.referencing.crs.CoordinateReferenceSystem;
-import org.opengis.referencing.operation.MathTransform;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 
-public interface ShpHandler {
-
-	public MathTransform findMathTransform(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, boolean lenient) throws FactoryException;
-
-	public void setPreferMultipolygonToSimpleWay(boolean prefer);
-
-	public boolean preferMultipolygonToSimpleWay();
-
-	public void setCheckNodeProximity(boolean check);
-	
-	public boolean checkNodeProximity();
-	
-	public void setUseNodeMap(boolean use);
-	
-	public boolean useNodeMap();
+public interface ShpHandler extends GeographicHandler {
 
 	public void notifyFeatureParsed(Object feature, DataSet result, Set<OsmPrimitive> featurePrimitives);
Index: plications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/ShpMathTransformException.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/ShpMathTransformException.java	(revision 28190)
+++ 	(revision )
@@ -1,35 +1,0 @@
-//    JOSM opendata plugin.
-//    Copyright (C) 2011-2012 Don-vip
-//
-//    This program is free software: you can redistribute it and/or modify
-//    it under the terms of the GNU General Public License as published by
-//    the Free Software Foundation, either version 3 of the License, or
-//    (at your option) any later version.
-//
-//    This program is distributed in the hope that it will be useful,
-//    but WITHOUT ANY WARRANTY; without even the implied warranty of
-//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//    GNU General Public License for more details.
-//
-//    You should have received a copy of the GNU General Public License
-//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-package org.openstreetmap.josm.plugins.opendata.core.io.geographic;
-
-public class ShpMathTransformException extends Exception {
-
-	public ShpMathTransformException() {
-		super();
-	}
-
-	public ShpMathTransformException(String message, Throwable cause) {
-		super(message, cause);
-	}
-
-	public ShpMathTransformException(String message) {
-		super(message);
-	}
-
-	public ShpMathTransformException(Throwable cause) {
-		super(cause);
-	}
-}
Index: /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/ShpReader.java
===================================================================
--- /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/ShpReader.java	(revision 28190)
+++ /applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/ShpReader.java	(revision 28191)
@@ -19,31 +19,17 @@
 
 import java.awt.Component;
-import java.awt.Image;
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
-import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.List;
 import java.util.Map;
 import java.util.Set;
-
-import javax.swing.Icon;
-import javax.swing.ImageIcon;
-import javax.swing.JOptionPane;
 
 import org.geotools.data.DataStore;
 import org.geotools.data.FeatureSource;
 import org.geotools.data.shapefile.ShapefileDataStoreFactory;
-import org.geotools.factory.Hints;
 import org.geotools.feature.FeatureCollection;
 import org.geotools.feature.FeatureIterator;
-import org.geotools.geometry.jts.JTS;
-import org.geotools.referencing.AbstractIdentifiedObject;
-import org.geotools.referencing.CRS;
-import org.geotools.referencing.crs.AbstractCRS;
-import org.geotools.referencing.crs.AbstractDerivedCRS;
-import org.geotools.referencing.crs.AbstractSingleCRS;
 import org.opengis.feature.Feature;
 import org.opengis.feature.GeometryAttribute;
@@ -53,28 +39,15 @@
 import org.opengis.geometry.MismatchedDimensionException;
 import org.opengis.referencing.FactoryException;
-import org.opengis.referencing.IdentifiedObject;
-import org.opengis.referencing.NoSuchAuthorityCodeException;
-import org.opengis.referencing.crs.CoordinateReferenceSystem;
-import org.opengis.referencing.crs.ProjectedCRS;
-import org.opengis.referencing.cs.CoordinateSystem;
-import org.opengis.referencing.datum.Datum;
-import org.opengis.referencing.operation.MathTransform;
-import org.opengis.referencing.operation.OperationNotFoundException;
 import org.opengis.referencing.operation.TransformException;
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.corrector.UserCancelException;
-import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Relation;
-import org.openstreetmap.josm.data.osm.RelationMember;
 import org.openstreetmap.josm.data.osm.Way;
-import org.openstreetmap.josm.gui.ExtendedDialog;
 import org.openstreetmap.josm.gui.progress.ProgressMonitor;
-import org.openstreetmap.josm.io.AbstractReader;
-import org.openstreetmap.josm.plugins.opendata.core.OdConstants;
 import org.openstreetmap.josm.plugins.opendata.core.datasets.AbstractDataSetHandler;
-import org.openstreetmap.josm.tools.ImageProvider;
+import org.openstreetmap.josm.plugins.opendata.core.datasets.NationalHandlers;
 
 import com.vividsolutions.jts.geom.Geometry;
@@ -84,20 +57,12 @@
 import com.vividsolutions.jts.geom.Polygon;
 
-public class ShpReader extends AbstractReader implements OdConstants {
+public class ShpReader extends GeographicReader {
 
 	private final ShpHandler handler;
-	
-	private final CoordinateReferenceSystem wgs84;
-	private final Map<String, Node> nodes;
-
-	private CoordinateReferenceSystem crs;
-	private MathTransform transform;
-	
 	private final Set<OsmPrimitive> featurePrimitives = new HashSet<OsmPrimitive>();
 	
-	public ShpReader(ShpHandler handler) throws NoSuchAuthorityCodeException, FactoryException {
+	public ShpReader(ShpHandler handler) {
+		super(handler, NationalHandlers.DEFAULT_SHP_HANDLERS);
 		this.handler = handler;
-		this.wgs84 = CRS.decode("EPSG:4326");
-		this.nodes = new HashMap<String, Node>();
 	}
 
@@ -116,116 +81,6 @@
 	}
 	
-	private static final void compareDebug(CoordinateReferenceSystem crs1, CoordinateReferenceSystem crs2) {
-		System.out.println("-- COMPARING "+crs1.getName()+" WITH "+crs2.getName()+" --");
-		compareDebug("class", crs1.getClass(), crs2.getClass());
-		CoordinateSystem cs1 = crs1.getCoordinateSystem();
-		CoordinateSystem cs2 = crs2.getCoordinateSystem();
-		if (!compareDebug("cs", cs1, cs2)) {
-			Integer dim1 = cs1.getDimension();
-			Integer dim2 = cs2.getDimension();
-			if (compareDebug("cs.dim", dim1, dim2)) {
-				for (int i = 0; i<dim1; i++) {
-					compareDebug("cs.axis"+i, cs1.getAxis(i), cs1.getAxis(i));
-				}
-			}
-		}
-		if (crs1 instanceof AbstractSingleCRS) {
-			Datum datum1 = ((AbstractSingleCRS) crs1).getDatum();
-			Datum datum2 = ((AbstractSingleCRS) crs2).getDatum();
-			if (!compareDebug("datum", datum1, datum2)) {
-				AbstractIdentifiedObject adatum1 = (AbstractIdentifiedObject) datum1;
-				AbstractIdentifiedObject adatum2 = (AbstractIdentifiedObject) datum2;
-				compareDebug("datum.name1", adatum1.nameMatches(adatum2.getName().getCode()), adatum1.getName(), adatum2.getName());
-				compareDebug("datum.name2", adatum2.nameMatches(adatum1.getName().getCode()), adatum2.getName(), adatum1.getName());
-			}
-			if (crs1 instanceof AbstractDerivedCRS) {
-				AbstractDerivedCRS adcrs1 = (AbstractDerivedCRS) crs1;
-				AbstractDerivedCRS adcrs2 = (AbstractDerivedCRS) crs2;
-				compareDebug("baseCRS", adcrs1.getBaseCRS(), adcrs2.getBaseCRS());
-				compareDebug("conversionFromBase", adcrs1.getConversionFromBase(), adcrs2.getConversionFromBase());
-			}
-		}
-		System.out.println("-- COMPARING FINISHED --");
-	}
-	
-	private static final boolean compareDebug(String text, Object o1, Object o2) {
-		return compareDebug(text, o1.equals(o2), o1, o2);
-	}
-	
-	private static final boolean compareDebug(String text, IdentifiedObject o1, IdentifiedObject o2) {
-		return compareDebug(text, (AbstractIdentifiedObject)o1, (AbstractIdentifiedObject)o2);
-	}
-	
-	private static final boolean compareDebug(String text, AbstractIdentifiedObject o1, AbstractIdentifiedObject o2) {
-		return compareDebug(text, o1.equals(o2, false), o1, o2);
-	}
-
-	private static final boolean compareDebug(String text, boolean result, Object o1, Object o2) {
-		System.out.println(text + ": " + result + "("+o1+", "+o2+")");
-		return result;
-	}
-	
-	private void findCrsAndMathTransform(CoordinateReferenceSystem coordinateReferenceSystem, Component parent) throws FactoryException, UserCancelException, ShpMathTransformException {
-		crs = coordinateReferenceSystem;
-		try {
-			transform = CRS.findMathTransform(crs, wgs84);
-		} catch (OperationNotFoundException e) {
-			System.out.println(crs.getName()+": "+e.getMessage()); // Bursa wolf parameters required.
-			
-			List<CoordinateReferenceSystem> candidates = new ArrayList<CoordinateReferenceSystem>();
-			
-			// Find matching CRS with Bursa Wolf parameters in EPSG database
-			for (String code : CRS.getAuthorityFactory(false).getAuthorityCodes(ProjectedCRS.class)) {
-				CoordinateReferenceSystem candidate = CRS.decode(code);
-				if (candidate instanceof AbstractCRS && crs instanceof AbstractIdentifiedObject) {
-					
-					Hints.putSystemDefault(Hints.COMPARISON_TOLERANCE, 
-							Main.pref.getDouble(PREF_CRS_COMPARISON_TOLERANCE, DEFAULT_CRS_COMPARISON_TOLERANCE));
-					if (((AbstractCRS)candidate).equals((AbstractIdentifiedObject)crs, false)) {
-						System.out.println("Found a potential CRS: "+candidate.getName());
-						candidates.add(candidate);
-					} else if (Main.pref.getBoolean(PREF_CRS_COMPARISON_DEBUG, false)) {
-						compareDebug(crs, candidate);
-					}
-					Hints.removeSystemDefault(Hints.COMPARISON_TOLERANCE);
-				}
-			}
-			
-			if (candidates.size() > 1) {
-				System.err.println("Found several potential CRS.");//TODO: ask user which one to use
-			}
-			
-			if (candidates.size() > 0) {
-				CoordinateReferenceSystem newCRS = candidates.get(0);
-				try {
-					transform = CRS.findMathTransform(newCRS, wgs84, false);
-				} catch (OperationNotFoundException ex) {
-					System.err.println(newCRS.getName()+": "+e.getMessage());
-				}
-			}
-			
-			if (transform == null) {
-				if (handler != null) {
-					// ask handler if it can provide a math transform
-					transform = handler.findMathTransform(crs, wgs84, false);
-				}
-				if (transform == null) {
-					// ask user before trying lenient method
-					if (warnLenientMethod(parent, crs)) {
-						// User canceled
-						throw new UserCancelException();
-					}
-					System.out.println("Searching for a lenient math transform.");
-					transform = CRS.findMathTransform(crs, wgs84, true);
-				}
-			}
-		}
-		if (transform == null) {
-			throw new ShpMathTransformException("Unable to find math transform !");
-		}
-	}
-	
 	private void parseFeature(Feature feature, Component parent) 
-			throws UserCancelException, ShpMathTransformException, FactoryException, ShpCrsException, MismatchedDimensionException, TransformException {
+			throws UserCancelException, GeoMathTransformException, FactoryException, GeoCrsException, MismatchedDimensionException, TransformException {
 		featurePrimitives.clear();
 		GeometryAttribute geometry = feature.getDefaultGeometryProperty();
@@ -235,7 +90,8 @@
 			
 			if (crs == null && desc != null && desc.getCoordinateReferenceSystem() != null) {
-				findCrsAndMathTransform(desc.getCoordinateReferenceSystem(), parent);
+				crs = desc.getCoordinateReferenceSystem();
+				findMathTransform(parent, true);
 			} else if (crs == null) {
-				throw new ShpCrsException("Unable to detect CRS !");
+				throw new GeoCrsException("Unable to detect CRS !");
 			}
 			
@@ -362,31 +218,4 @@
 	}
 	
-    /**
-     * returns true if the user wants to cancel, false if they
-     * want to continue
-     */
-    private static final boolean warnLenientMethod(Component parent, CoordinateReferenceSystem crs) {
-        ExtendedDialog dlg = new ExtendedDialog(parent,
-                tr("Cannot transform to WGS84"),
-                new String[] {tr("Cancel"), tr("Continue")});
-        dlg.setContent("<html>" +
-                tr("JOSM was unable to find a strict mathematical transformation between ''{0}'' and WGS84.<br /><br />"+
-                        "Do you want to try a <i>lenient</i> method, which will perform a non-precise transformation (<b>with location errors up to 1 km</b>) ?<br/><br/>"+
-                        "If so, <b>do NOT upload</b> such data to OSM !", crs.getName())+
-                "</html>");
-        dlg.setButtonIcons(new Icon[] {
-                ImageProvider.get("cancel"),
-                ImageProvider.overlay(
-                        ImageProvider.get("ok"),
-                        new ImageIcon(ImageProvider.get("warning-small").getImage().getScaledInstance(10 , 10, Image.SCALE_SMOOTH)),
-                        ImageProvider.OverlayPosition.SOUTHEAST)});
-        dlg.setToolTipTexts(new String[] {
-                tr("Cancel"),
-                tr("Try lenient method")});
-        dlg.setIcon(JOptionPane.WARNING_MESSAGE);
-        dlg.setCancelButton(1);
-        return dlg.showDialog().getValue() != 2;
-    }
-	
 	private static final void readNonGeometricAttributes(Feature feature, OsmPrimitive primitive) {
 		for (Property prop : feature.getProperties()) {
@@ -404,66 +233,16 @@
 		}
 	}
-	
-	private Node getNode(Point p, String key) {
-		Node n = nodes.get(key);
-		if (n == null && handler != null && handler.checkNodeProximity()) {
-			LatLon ll = new LatLon(p.getY(), p.getX());
-			for (Node node : nodes.values()) {
-				if (node.getCoor().equalsEpsilon(ll)) {
-					return node;
-				}
-			}
-		}
-		return n;
-	}
-	
-	private Node createOrGetNode(Point p) throws MismatchedDimensionException, TransformException {
-		Point p2 = (Point) JTS.transform(p, transform);
-		String key = p2.getX()+"/"+p2.getY();
-		//String key = LatLon.roundToOsmPrecisionStrict(p2.getX())+"/"+LatLon.roundToOsmPrecisionStrict(p2.getY());
-		Node n = getNode(p2, key);
-		if (n == null) {
-			n = new Node(new LatLon(p2.getY(), p2.getX()));
-			if (handler == null || handler.useNodeMap()) {
-				nodes.put(key, n);
-			}
-			ds.addPrimitive(n);
-		} else if (n.getDataSet() == null) {
-		    // ShpHandler may have removed the node from DataSet (see Paris public light handler for example)
-		    ds.addPrimitive(n);
-		}
+
+	@Override
+	protected Node createOrGetNode(Point p) throws MismatchedDimensionException, TransformException {
+		Node n = super.createOrGetNode(p);
 		featurePrimitives.add(n);
 		return n;
 	}
 	
-	private Way createWay(LineString ls) {
-		Way w = new Way();
-		if (ls != null) {
-			for (int i=0; i<ls.getNumPoints(); i++) {
-				try {
-					w.addNode(createOrGetNode(ls.getPointN(i)));
-				} catch (Exception e) {
-					System.err.println(e.getMessage());
-				}
-			}
-		}
-		return addOsmPrimitive(w);
-	}
-
-	private Relation createMultipolygon() {
-		Relation r = new Relation();
-		r.put("type", "multipolygon");
-		return addOsmPrimitive(r);
-	}
-
-	private void addWayToMp(Relation r, String role, Way w) {
-		//result.addPrimitive(w);
-		r.addMember(new RelationMember(role, w));
-	}
-	
-	private <T extends OsmPrimitive> T addOsmPrimitive(T p) {
-		ds.addPrimitive(p);
+	@Override
+	protected <T extends OsmPrimitive> T addOsmPrimitive(T p) {
 		featurePrimitives.add(p);
-		return p;
+		return super.addOsmPrimitive(p);
 	}
 }
