Changeset 28191 in osm for applications/editors


Ignore:
Timestamp:
2012-04-05T01:59:36+02:00 (12 years ago)
Author:
donvip
Message:

[josm_opendata] Add initial GML support for Linz, Austria (see #josm6921)

Location:
applications/editors/josm/plugins/opendata
Files:
12 added
15 edited
2 moved

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/opendata/.classpath

    r28087 r28191  
    1515        <classpathentry kind="src" path="modules/fr.toulouse/resources"/>
    1616        <classpathentry kind="src" path="util"/>
    17         <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
     17        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
    1818        <classpathentry combineaccessrules="false" kind="src" path="/JOSM"/>
    1919        <classpathentry kind="output" path="bin"/>
  • applications/editors/josm/plugins/opendata/build.xml

    r28172 r28191  
    177177                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/OpenData"/>
    178178                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    179                 <attribute name="Plugin-Requires" value="jts"/>
     179                <!--<attribute name="Plugin-Requires" value="jts"/>-->
    180180                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    181181            </manifest>
  • applications/editors/josm/plugins/opendata/resources/org/geotools/referencing/crs/epsg.properties

    r28055 r28191  
    34344258=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"]]
    35354275=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"]]
     364312=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"]]
    36374313=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"]]
    37384326=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"]]
     
    63644632=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"]]
    64654638=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"]]
     664805=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"]]
    65674807=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"]]
    66684936=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"]]
     
    98100
    9910127700=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"]]
     102
     103#TOWGS84 clause of EPSG:31251 to 31253 taken from http://www.mail-archive.com/geotools-gt2-users@lists.sourceforge.net/msg07674.html
     10431251=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"]]
     10531252=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"]]
     10631253=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"]]
     10731254=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"]]
     10831255=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"]]
     10931256=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"]]
     11031257=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"]]
     11131258=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"]]
     11231259=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"]]
     11331265=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"]]
     11431266=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"]]
     11531267=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"]]
     11631268=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"]]
     11731275=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"]]
     11831276=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"]]
     11931277=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"]]
     12031278=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"]]
     12131279=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"]]
     12231281=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"]]
     12331282=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"]]
     12431283=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"]]
     12531284=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"]]
     12631285=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"]]
     12731286=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"]]
     12831287=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"]]
     12931288=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"]]
     13031289=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"]]
     13131290=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"]]
     13231291=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"]]
     13331292=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"]]
     13431293=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"]]
     13531294=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"]]
     13631295=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"]]
     13731296=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"]]
     13831297=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"]]
    100139
    10114031300=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"]]
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/OdPlugin.java

    r28143 r28191  
    5050import org.openstreetmap.josm.plugins.opendata.core.io.XmlImporter;
    5151import org.openstreetmap.josm.plugins.opendata.core.io.archive.ZipImporter;
     52import org.openstreetmap.josm.plugins.opendata.core.io.geographic.GmlImporter;
    5253import org.openstreetmap.josm.plugins.opendata.core.io.geographic.KmlKmzImporter;
    5354import org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifTabImporter;
     
    7980                for (AbstractImporter importer : Arrays.asList(new AbstractImporter[]{
    8081                                new CsvImporter(), new OdsImporter(), new XlsImporter(), // Tabular file formats
    81                                 new KmlKmzImporter(), new ShpImporter(), new MifTabImporter(), // Geographic file formats
     82                                new KmlKmzImporter(), new ShpImporter(), new MifTabImporter(), new GmlImporter(), // Geographic file formats
    8283                                new ZipImporter(), // Archive containing any of the others
    8384                                xmlImporter = new XmlImporter() // Generic importer for XML files (currently used for Neptune files)
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/OdConstants.java

    r28152 r28191  
    9696    public static final String KML_EXT = "kml";
    9797    public static final String KMZ_EXT = "kmz";
     98    public static final String GML_EXT = "gml";
    9899    public static final String XLS_EXT = "xls";
    99100    public static final String ODS_EXT = "ods";
     
    121122    public static final ExtensionFileFilter MIF_TAB_FILE_FILTER = new ExtensionFileFilter(MIF_EXT+","+TAB_EXT, MIF_EXT, tr("MapInfo files") + " (*."+MIF_EXT+",*."+TAB_EXT+")");
    122123    public static final ExtensionFileFilter KML_KMZ_FILE_FILTER = new ExtensionFileFilter(KML_EXT+","+KMZ_EXT, KMZ_EXT, tr("KML/KMZ files") + " (*."+KML_EXT+",*."+KMZ_EXT+")");
     124    public static final ExtensionFileFilter GML_FILE_FILTER = new ExtensionFileFilter(GML_EXT, GML_EXT, tr("GML files") + " (*."+GML_EXT+")");
    123125    public static final ExtensionFileFilter ZIP_FILE_FILTER = new ExtensionFileFilter(ZIP_EXT, ZIP_EXT, tr("Zip Files") + " (*."+ZIP_EXT+")");
    124126    public static final ExtensionFileFilter XML_FILE_FILTER = new ExtensionFileFilter(XML_EXT, XML_EXT, tr("OpenData XML files") + " (*."+XML_EXT+")");
     
    142144
    143145    /**
    144      * KML tags
    145      */
    146     public static final String KML_PLACEMARK   = "Placemark";
    147     public static final String KML_NAME        = "name";
    148     public static final String KML_COLOR       = "color";
    149     public static final String KML_SIMPLE_DATA = "SimpleData";
    150     public static final String KML_LINE_STRING = "LineString";
    151     public static final String KML_POINT       = "Point";
    152     public static final String KML_POLYGON     = "Polygon";
    153     public static final String KML_OUTER_BOUND = "outerBoundaryIs";
    154     public static final String KML_INNER_BOUND = "innerBoundaryIs";
    155     public static final String KML_LINEAR_RING = "LinearRing";
    156     public static final String KML_COORDINATES = "coordinates";
    157    
    158     /**
    159146     * Resources
    160147     */
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/datasets/AbstractDataSetHandler.java

    r28113 r28191  
    3434import org.openstreetmap.josm.plugins.opendata.core.io.archive.DefaultZipHandler;
    3535import org.openstreetmap.josm.plugins.opendata.core.io.archive.ZipHandler;
     36import org.openstreetmap.josm.plugins.opendata.core.io.geographic.DefaultGmlHandler;
    3637import org.openstreetmap.josm.plugins.opendata.core.io.geographic.DefaultShpHandler;
     38import org.openstreetmap.josm.plugins.opendata.core.io.geographic.GmlHandler;
    3739import org.openstreetmap.josm.plugins.opendata.core.io.geographic.ShpHandler;
    3840import org.openstreetmap.josm.plugins.opendata.core.io.tabular.CsvHandler;
     
    8789                setZipHandler(new DefaultZipHandler());
    8890                setCsvHandler(new DefaultCsvHandler());
     91                setGmlHandler(new DefaultGmlHandler());
    8992        }
    9093       
     
    428431        }
    429432
     433        // --------- GML handling ---------
     434       
     435        private GmlHandler gmlHandler;
     436
     437        public final void setGmlHandler(GmlHandler handler) {
     438                gmlHandler = handler;
     439        }
     440       
     441        public final GmlHandler getGmlHandler() {
     442                return gmlHandler;
     443        }
     444
    430445        // ------------ Zip handling ------------
    431446       
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/datasets/fr/FrenchShpHandler.java

    r28152 r28191  
    2020import org.geotools.referencing.operation.projection.MapProjection.AbstractProvider;
    2121import org.opengis.referencing.FactoryException;
     22import org.opengis.referencing.NoSuchAuthorityCodeException;
    2223import org.opengis.referencing.crs.CoordinateReferenceSystem;
    2324import org.opengis.referencing.crs.ProjectedCRS;
     
    2829public class FrenchShpHandler extends DefaultShpHandler {
    2930
     31        @Override
     32        public CoordinateReferenceSystem getCrsFor(String crsName) throws NoSuchAuthorityCodeException, FactoryException {
     33                if (crsName.equalsIgnoreCase("RGM04")) {
     34                        return CRS.decode("EPSG:4471");
     35                } else if (crsName.equalsIgnoreCase("RGFG95_UTM_Zone_22N")) {
     36                        return CRS.decode("EPSG:2972");
     37                } else {
     38                        return super.getCrsFor(crsName);
     39                }
     40        }
     41
    3042        /* (non-Javadoc)
    3143         * @see org.openstreetmap.josm.plugins.opendata.core.datasets.AbstractDataSetHandler#findMathTransform(org.opengis.referencing.crs.CoordinateReferenceSystem, org.opengis.referencing.crs.CoordinateReferenceSystem, boolean)
     
    3446        public MathTransform findMathTransform(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, boolean lenient)
    3547                        throws FactoryException {
    36                 if (sourceCRS.getName().getCode().equalsIgnoreCase("RGM04")) {
    37                         return CRS.findMathTransform(CRS.decode("EPSG:4471"), targetCRS, lenient);
    38                 } else if (sourceCRS.getName().getCode().equalsIgnoreCase("RGFG95_UTM_Zone_22N")) {
    39                         return CRS.findMathTransform(CRS.decode("EPSG:2972"), targetCRS, lenient);
    40                 } else if (sourceCRS.getName().getCode().equalsIgnoreCase("Lambert I Nord")) {
     48                if (sourceCRS.getName().getCode().equalsIgnoreCase("Lambert I Nord")) {
    4149                        if (sourceCRS instanceof ProjectedCRS) {
    4250                                GeodeticDatum datum = ((ProjectedCRS) sourceCRS).getDatum();
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/gui/AskLicenseAgreementDialog.java

    r28114 r28191  
     1//    JOSM opendata plugin.
     2//    Copyright (C) 2011-2012 Don-vip
     3//
     4//    This program is free software: you can redistribute it and/or modify
     5//    it under the terms of the GNU General Public License as published by
     6//    the Free Software Foundation, either version 3 of the License, or
     7//    (at your option) any later version.
     8//
     9//    This program is distributed in the hope that it will be useful,
     10//    but WITHOUT ANY WARRANTY; without even the implied warranty of
     11//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     12//    GNU General Public License for more details.
     13//
     14//    You should have received a copy of the GNU General Public License
     15//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
    116package org.openstreetmap.josm.plugins.opendata.core.gui;
    217
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/NetworkReader.java

    r28154 r28191  
    3131import org.openstreetmap.josm.plugins.opendata.core.datasets.AbstractDataSetHandler;
    3232import org.openstreetmap.josm.plugins.opendata.core.io.archive.ZipReader;
     33import org.openstreetmap.josm.plugins.opendata.core.io.geographic.GmlReader;
    3334import org.openstreetmap.josm.plugins.opendata.core.io.geographic.KmlReader;
    3435import org.openstreetmap.josm.plugins.opendata.core.io.geographic.KmzReader;
     
    115116        } else if (filename.endsWith("."+TAB_EXT)) {
    116117                return TabReader.class;
     118        } else if (filename.endsWith("."+GML_EXT)) {
     119                return GmlReader.class;
    117120        } else if (filename.endsWith("."+ZIP_EXT)) {
    118121                return ZipReader.class;
     
    167170            } else if (readerClass.equals(XlsReader.class)) {
    168171                return XlsReader.parseDataSet(in, handler, instance);
     172            } else if (readerClass.equals(GmlReader.class)) {
     173                return GmlReader.parseDataSet(in, handler, instance);
    169174            } else {
    170175                throw new IllegalArgumentException("Unsupported reader class: "+readerClass.getName());
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/archive/ZipReader.java

    r28154 r28191  
    3939import org.openstreetmap.josm.plugins.opendata.core.datasets.AbstractDataSetHandler;
    4040import org.openstreetmap.josm.plugins.opendata.core.io.NeptuneReader;
     41import org.openstreetmap.josm.plugins.opendata.core.io.geographic.GmlReader;
    4142import org.openstreetmap.josm.plugins.opendata.core.io.geographic.KmlReader;
    4243import org.openstreetmap.josm.plugins.opendata.core.io.geographic.KmzReader;
     
    133134                                        // Test file name to see if it may contain useful data
    134135                                        for (String ext : new String[] {
    135                                                         CSV_EXT, KML_EXT, KMZ_EXT, XLS_EXT, ODS_EXT, SHP_EXT, MIF_EXT, TAB_EXT
     136                                                        CSV_EXT, KML_EXT, KMZ_EXT, XLS_EXT, ODS_EXT, SHP_EXT, MIF_EXT, TAB_EXT, GML_EXT
    136137                                        }) {
    137138                                                if (entry.getName().toLowerCase().endsWith("."+ext)) {
     
    187188                                } else if (file.getName().toLowerCase().endsWith(TAB_EXT)) {
    188189                                        from = TabReader.parseDataSet(in, file, handler, instance);
     190                                } else if (file.getName().toLowerCase().endsWith(GML_EXT)) {
     191                                        from = GmlReader.parseDataSet(in, handler, instance);
    189192                                } else if (file.getName().toLowerCase().endsWith(XML_EXT)) {
    190193                                        if (OdPlugin.getInstance().xmlImporter.acceptFile(file)) {
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/AbstractMapInfoReader.java

    r28000 r28191  
     1//    JOSM opendata plugin.
     2//    Copyright (C) 2011-2012 Don-vip
     3//
     4//    This program is free software: you can redistribute it and/or modify
     5//    it under the terms of the GNU General Public License as published by
     6//    the Free Software Foundation, either version 3 of the License, or
     7//    (at your option) any later version.
     8//
     9//    This program is distributed in the hope that it will be useful,
     10//    but WITHOUT ANY WARRANTY; without even the implied warranty of
     11//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     12//    GNU General Public License for more details.
     13//
     14//    You should have received a copy of the GNU General Public License
     15//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
    116package org.openstreetmap.josm.plugins.opendata.core.io.geographic;
    217
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/DefaultShpHandler.java

    r28152 r28191  
    3232import org.opengis.referencing.FactoryException;
    3333import org.opengis.referencing.crs.CoordinateReferenceSystem;
    34 import org.opengis.referencing.crs.GeographicCRS;
    3534import org.opengis.referencing.datum.GeodeticDatum;
    3635import org.opengis.referencing.operation.MathTransform;
     
    4948import org.openstreetmap.josm.tools.Pair;
    5049
    51 public class DefaultShpHandler implements ShpHandler, OdConstants {
     50public class DefaultShpHandler extends DefaultGeographicHandler implements ShpHandler, OdConstants {
    5251
    5352        private static final List<Pair<org.opengis.referencing.datum.Ellipsoid, Ellipsoid>>
     
    7069        }
    7170       
    72         private boolean useNodeMap = true;
    73         private boolean checkNodeProximity = false;
    74         private boolean preferMultipolygonToSimpleWay = false;
    7571        private Charset dbfCharset = null;
    7672
    7773        @Override
    78         public MathTransform findMathTransform(CoordinateReferenceSystem sourceCRS,
    79                         CoordinateReferenceSystem targetCRS, boolean lenient)
     74        public MathTransform findMathTransform(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, boolean lenient)
    8075                        throws FactoryException {
    81                 if (sourceCRS instanceof GeographicCRS && sourceCRS.getName().getCode().equalsIgnoreCase("GCS_ETRS_1989")) {
    82                         return CRS.findMathTransform(CRS.decode("EPSG:4258"), targetCRS, lenient);
     76                if (getCrsFor(sourceCRS.getName().getCode()) != null) {
     77                        return CRS.findMathTransform(getCrsFor(sourceCRS.getName().getCode()), targetCRS, lenient);
    8378                } else if (sourceCRS instanceof AbstractDerivedCRS && sourceCRS.getName().getCode().equalsIgnoreCase("Lambert_Conformal_Conic")) {
    8479                        List<MathTransform> result = new ArrayList<MathTransform>();
     
    139134
    140135        @Override
    141         public boolean preferMultipolygonToSimpleWay() {
    142                 return preferMultipolygonToSimpleWay;
    143         }
    144 
    145         @Override
    146         public void setPreferMultipolygonToSimpleWay(boolean prefer) {
    147                 preferMultipolygonToSimpleWay = prefer;
    148         }
    149 
    150         @Override
    151         public boolean checkNodeProximity() {
    152                 return checkNodeProximity;
    153         }
    154 
    155         @Override
    156         public void setCheckNodeProximity(boolean check) {
    157                 checkNodeProximity = check;
    158         }
    159 
    160         @Override
    161         public void setUseNodeMap(boolean use) {
    162                 useNodeMap = use;
    163         }
    164 
    165         @Override
    166         public boolean useNodeMap() {
    167                 return useNodeMap;
    168         }
    169 
    170         @Override
    171136        public void notifyFeatureParsed(Object feature, DataSet result, Set<OsmPrimitive> featurePrimitives) {
    172137                // To be overriden by modules handlers
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GeoCrsException.java

    r28184 r28191  
    1616package org.openstreetmap.josm.plugins.opendata.core.io.geographic;
    1717
    18 public class ShpCrsException extends Exception {
     18public class GeoCrsException extends Exception {
    1919
    20         public ShpCrsException() {
     20        public GeoCrsException() {
    2121                super();
    2222        }
    2323
    24         public ShpCrsException(String message, Throwable cause) {
     24        public GeoCrsException(String message, Throwable cause) {
    2525                super(message, cause);
    2626        }
    2727
    28         public ShpCrsException(String message) {
     28        public GeoCrsException(String message) {
    2929                super(message);
    3030        }
    3131
    32         public ShpCrsException(Throwable cause) {
     32        public GeoCrsException(Throwable cause) {
    3333                super(cause);
    3434        }
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GeoMathTransformException.java

    r28184 r28191  
    1616package org.openstreetmap.josm.plugins.opendata.core.io.geographic;
    1717
    18 public class ShpMathTransformException extends Exception {
     18public class GeoMathTransformException extends Exception {
    1919
    20         public ShpMathTransformException() {
     20        public GeoMathTransformException() {
    2121                super();
    2222        }
    2323
    24         public ShpMathTransformException(String message, Throwable cause) {
     24        public GeoMathTransformException(String message, Throwable cause) {
    2525                super(message, cause);
    2626        }
    2727
    28         public ShpMathTransformException(String message) {
     28        public GeoMathTransformException(String message) {
    2929                super(message);
    3030        }
    3131
    32         public ShpMathTransformException(Throwable cause) {
     32        public GeoMathTransformException(Throwable cause) {
    3333                super(cause);
    3434        }
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/KmlReader.java

    r28000 r28191  
    4444
    4545public class KmlReader extends AbstractReader implements OdConstants {
     46
     47    public static final String KML_PLACEMARK   = "Placemark";
     48    public static final String KML_NAME        = "name";
     49    public static final String KML_COLOR       = "color";
     50    public static final String KML_SIMPLE_DATA = "SimpleData";
     51    public static final String KML_LINE_STRING = "LineString";
     52    public static final String KML_POINT       = "Point";
     53    public static final String KML_POLYGON     = "Polygon";
     54    public static final String KML_OUTER_BOUND = "outerBoundaryIs";
     55    public static final String KML_INNER_BOUND = "innerBoundaryIs";
     56    public static final String KML_LINEAR_RING = "LinearRing";
     57    public static final String KML_COORDINATES = "coordinates";
     58   
    4659
    4760    private XMLStreamReader parser;
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/ShpHandler.java

    r28152 r28191  
    1919import java.util.Set;
    2020
    21 import org.opengis.referencing.FactoryException;
    22 import org.opengis.referencing.crs.CoordinateReferenceSystem;
    23 import org.opengis.referencing.operation.MathTransform;
    2421import org.openstreetmap.josm.data.osm.DataSet;
    2522import org.openstreetmap.josm.data.osm.OsmPrimitive;
    2623
    27 public interface ShpHandler {
    28 
    29         public MathTransform findMathTransform(CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS, boolean lenient) throws FactoryException;
    30 
    31         public void setPreferMultipolygonToSimpleWay(boolean prefer);
    32 
    33         public boolean preferMultipolygonToSimpleWay();
    34 
    35         public void setCheckNodeProximity(boolean check);
    36        
    37         public boolean checkNodeProximity();
    38        
    39         public void setUseNodeMap(boolean use);
    40        
    41         public boolean useNodeMap();
     24public interface ShpHandler extends GeographicHandler {
    4225
    4326        public void notifyFeatureParsed(Object feature, DataSet result, Set<OsmPrimitive> featurePrimitives);
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/ShpReader.java

    r28158 r28191  
    1919
    2020import java.awt.Component;
    21 import java.awt.Image;
    2221import java.io.File;
    2322import java.io.IOException;
    2423import java.io.InputStream;
    25 import java.util.ArrayList;
    2624import java.util.HashMap;
    2725import java.util.HashSet;
    28 import java.util.List;
    2926import java.util.Map;
    3027import java.util.Set;
    31 
    32 import javax.swing.Icon;
    33 import javax.swing.ImageIcon;
    34 import javax.swing.JOptionPane;
    3528
    3629import org.geotools.data.DataStore;
    3730import org.geotools.data.FeatureSource;
    3831import org.geotools.data.shapefile.ShapefileDataStoreFactory;
    39 import org.geotools.factory.Hints;
    4032import org.geotools.feature.FeatureCollection;
    4133import org.geotools.feature.FeatureIterator;
    42 import org.geotools.geometry.jts.JTS;
    43 import org.geotools.referencing.AbstractIdentifiedObject;
    44 import org.geotools.referencing.CRS;
    45 import org.geotools.referencing.crs.AbstractCRS;
    46 import org.geotools.referencing.crs.AbstractDerivedCRS;
    47 import org.geotools.referencing.crs.AbstractSingleCRS;
    4834import org.opengis.feature.Feature;
    4935import org.opengis.feature.GeometryAttribute;
     
    5339import org.opengis.geometry.MismatchedDimensionException;
    5440import org.opengis.referencing.FactoryException;
    55 import org.opengis.referencing.IdentifiedObject;
    56 import org.opengis.referencing.NoSuchAuthorityCodeException;
    57 import org.opengis.referencing.crs.CoordinateReferenceSystem;
    58 import org.opengis.referencing.crs.ProjectedCRS;
    59 import org.opengis.referencing.cs.CoordinateSystem;
    60 import org.opengis.referencing.datum.Datum;
    61 import org.opengis.referencing.operation.MathTransform;
    62 import org.opengis.referencing.operation.OperationNotFoundException;
    6341import org.opengis.referencing.operation.TransformException;
    6442import org.openstreetmap.josm.Main;
    6543import org.openstreetmap.josm.corrector.UserCancelException;
    66 import org.openstreetmap.josm.data.coor.LatLon;
    6744import org.openstreetmap.josm.data.osm.DataSet;
    6845import org.openstreetmap.josm.data.osm.Node;
    6946import org.openstreetmap.josm.data.osm.OsmPrimitive;
    7047import org.openstreetmap.josm.data.osm.Relation;
    71 import org.openstreetmap.josm.data.osm.RelationMember;
    7248import org.openstreetmap.josm.data.osm.Way;
    73 import org.openstreetmap.josm.gui.ExtendedDialog;
    7449import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    75 import org.openstreetmap.josm.io.AbstractReader;
    76 import org.openstreetmap.josm.plugins.opendata.core.OdConstants;
    7750import org.openstreetmap.josm.plugins.opendata.core.datasets.AbstractDataSetHandler;
    78 import org.openstreetmap.josm.tools.ImageProvider;
     51import org.openstreetmap.josm.plugins.opendata.core.datasets.NationalHandlers;
    7952
    8053import com.vividsolutions.jts.geom.Geometry;
     
    8457import com.vividsolutions.jts.geom.Polygon;
    8558
    86 public class ShpReader extends AbstractReader implements OdConstants {
     59public class ShpReader extends GeographicReader {
    8760
    8861        private final ShpHandler handler;
    89        
    90         private final CoordinateReferenceSystem wgs84;
    91         private final Map<String, Node> nodes;
    92 
    93         private CoordinateReferenceSystem crs;
    94         private MathTransform transform;
    95        
    9662        private final Set<OsmPrimitive> featurePrimitives = new HashSet<OsmPrimitive>();
    9763       
    98         public ShpReader(ShpHandler handler) throws NoSuchAuthorityCodeException, FactoryException {
     64        public ShpReader(ShpHandler handler) {
     65                super(handler, NationalHandlers.DEFAULT_SHP_HANDLERS);
    9966                this.handler = handler;
    100                 this.wgs84 = CRS.decode("EPSG:4326");
    101                 this.nodes = new HashMap<String, Node>();
    10267        }
    10368
     
    11681        }
    11782       
    118         private static final void compareDebug(CoordinateReferenceSystem crs1, CoordinateReferenceSystem crs2) {
    119                 System.out.println("-- COMPARING "+crs1.getName()+" WITH "+crs2.getName()+" --");
    120                 compareDebug("class", crs1.getClass(), crs2.getClass());
    121                 CoordinateSystem cs1 = crs1.getCoordinateSystem();
    122                 CoordinateSystem cs2 = crs2.getCoordinateSystem();
    123                 if (!compareDebug("cs", cs1, cs2)) {
    124                         Integer dim1 = cs1.getDimension();
    125                         Integer dim2 = cs2.getDimension();
    126                         if (compareDebug("cs.dim", dim1, dim2)) {
    127                                 for (int i = 0; i<dim1; i++) {
    128                                         compareDebug("cs.axis"+i, cs1.getAxis(i), cs1.getAxis(i));
    129                                 }
    130                         }
    131                 }
    132                 if (crs1 instanceof AbstractSingleCRS) {
    133                         Datum datum1 = ((AbstractSingleCRS) crs1).getDatum();
    134                         Datum datum2 = ((AbstractSingleCRS) crs2).getDatum();
    135                         if (!compareDebug("datum", datum1, datum2)) {
    136                                 AbstractIdentifiedObject adatum1 = (AbstractIdentifiedObject) datum1;
    137                                 AbstractIdentifiedObject adatum2 = (AbstractIdentifiedObject) datum2;
    138                                 compareDebug("datum.name1", adatum1.nameMatches(adatum2.getName().getCode()), adatum1.getName(), adatum2.getName());
    139                                 compareDebug("datum.name2", adatum2.nameMatches(adatum1.getName().getCode()), adatum2.getName(), adatum1.getName());
    140                         }
    141                         if (crs1 instanceof AbstractDerivedCRS) {
    142                                 AbstractDerivedCRS adcrs1 = (AbstractDerivedCRS) crs1;
    143                                 AbstractDerivedCRS adcrs2 = (AbstractDerivedCRS) crs2;
    144                                 compareDebug("baseCRS", adcrs1.getBaseCRS(), adcrs2.getBaseCRS());
    145                                 compareDebug("conversionFromBase", adcrs1.getConversionFromBase(), adcrs2.getConversionFromBase());
    146                         }
    147                 }
    148                 System.out.println("-- COMPARING FINISHED --");
    149         }
    150        
    151         private static final boolean compareDebug(String text, Object o1, Object o2) {
    152                 return compareDebug(text, o1.equals(o2), o1, o2);
    153         }
    154        
    155         private static final boolean compareDebug(String text, IdentifiedObject o1, IdentifiedObject o2) {
    156                 return compareDebug(text, (AbstractIdentifiedObject)o1, (AbstractIdentifiedObject)o2);
    157         }
    158        
    159         private static final boolean compareDebug(String text, AbstractIdentifiedObject o1, AbstractIdentifiedObject o2) {
    160                 return compareDebug(text, o1.equals(o2, false), o1, o2);
    161         }
    162 
    163         private static final boolean compareDebug(String text, boolean result, Object o1, Object o2) {
    164                 System.out.println(text + ": " + result + "("+o1+", "+o2+")");
    165                 return result;
    166         }
    167        
    168         private void findCrsAndMathTransform(CoordinateReferenceSystem coordinateReferenceSystem, Component parent) throws FactoryException, UserCancelException, ShpMathTransformException {
    169                 crs = coordinateReferenceSystem;
    170                 try {
    171                         transform = CRS.findMathTransform(crs, wgs84);
    172                 } catch (OperationNotFoundException e) {
    173                         System.out.println(crs.getName()+": "+e.getMessage()); // Bursa wolf parameters required.
    174                        
    175                         List<CoordinateReferenceSystem> candidates = new ArrayList<CoordinateReferenceSystem>();
    176                        
    177                         // Find matching CRS with Bursa Wolf parameters in EPSG database
    178                         for (String code : CRS.getAuthorityFactory(false).getAuthorityCodes(ProjectedCRS.class)) {
    179                                 CoordinateReferenceSystem candidate = CRS.decode(code);
    180                                 if (candidate instanceof AbstractCRS && crs instanceof AbstractIdentifiedObject) {
    181                                        
    182                                         Hints.putSystemDefault(Hints.COMPARISON_TOLERANCE,
    183                                                         Main.pref.getDouble(PREF_CRS_COMPARISON_TOLERANCE, DEFAULT_CRS_COMPARISON_TOLERANCE));
    184                                         if (((AbstractCRS)candidate).equals((AbstractIdentifiedObject)crs, false)) {
    185                                                 System.out.println("Found a potential CRS: "+candidate.getName());
    186                                                 candidates.add(candidate);
    187                                         } else if (Main.pref.getBoolean(PREF_CRS_COMPARISON_DEBUG, false)) {
    188                                                 compareDebug(crs, candidate);
    189                                         }
    190                                         Hints.removeSystemDefault(Hints.COMPARISON_TOLERANCE);
    191                                 }
    192                         }
    193                        
    194                         if (candidates.size() > 1) {
    195                                 System.err.println("Found several potential CRS.");//TODO: ask user which one to use
    196                         }
    197                        
    198                         if (candidates.size() > 0) {
    199                                 CoordinateReferenceSystem newCRS = candidates.get(0);
    200                                 try {
    201                                         transform = CRS.findMathTransform(newCRS, wgs84, false);
    202                                 } catch (OperationNotFoundException ex) {
    203                                         System.err.println(newCRS.getName()+": "+e.getMessage());
    204                                 }
    205                         }
    206                        
    207                         if (transform == null) {
    208                                 if (handler != null) {
    209                                         // ask handler if it can provide a math transform
    210                                         transform = handler.findMathTransform(crs, wgs84, false);
    211                                 }
    212                                 if (transform == null) {
    213                                         // ask user before trying lenient method
    214                                         if (warnLenientMethod(parent, crs)) {
    215                                                 // User canceled
    216                                                 throw new UserCancelException();
    217                                         }
    218                                         System.out.println("Searching for a lenient math transform.");
    219                                         transform = CRS.findMathTransform(crs, wgs84, true);
    220                                 }
    221                         }
    222                 }
    223                 if (transform == null) {
    224                         throw new ShpMathTransformException("Unable to find math transform !");
    225                 }
    226         }
    227        
    22883        private void parseFeature(Feature feature, Component parent)
    229                         throws UserCancelException, ShpMathTransformException, FactoryException, ShpCrsException, MismatchedDimensionException, TransformException {
     84                        throws UserCancelException, GeoMathTransformException, FactoryException, GeoCrsException, MismatchedDimensionException, TransformException {
    23085                featurePrimitives.clear();
    23186                GeometryAttribute geometry = feature.getDefaultGeometryProperty();
     
    23590                       
    23691                        if (crs == null && desc != null && desc.getCoordinateReferenceSystem() != null) {
    237                                 findCrsAndMathTransform(desc.getCoordinateReferenceSystem(), parent);
     92                                crs = desc.getCoordinateReferenceSystem();
     93                                findMathTransform(parent, true);
    23894                        } else if (crs == null) {
    239                                 throw new ShpCrsException("Unable to detect CRS !");
     95                                throw new GeoCrsException("Unable to detect CRS !");
    24096                        }
    24197                       
     
    362218        }
    363219       
    364     /**
    365      * returns true if the user wants to cancel, false if they
    366      * want to continue
    367      */
    368     private static final boolean warnLenientMethod(Component parent, CoordinateReferenceSystem crs) {
    369         ExtendedDialog dlg = new ExtendedDialog(parent,
    370                 tr("Cannot transform to WGS84"),
    371                 new String[] {tr("Cancel"), tr("Continue")});
    372         dlg.setContent("<html>" +
    373                 tr("JOSM was unable to find a strict mathematical transformation between ''{0}'' and WGS84.<br /><br />"+
    374                         "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/>"+
    375                         "If so, <b>do NOT upload</b> such data to OSM !", crs.getName())+
    376                 "</html>");
    377         dlg.setButtonIcons(new Icon[] {
    378                 ImageProvider.get("cancel"),
    379                 ImageProvider.overlay(
    380                         ImageProvider.get("ok"),
    381                         new ImageIcon(ImageProvider.get("warning-small").getImage().getScaledInstance(10 , 10, Image.SCALE_SMOOTH)),
    382                         ImageProvider.OverlayPosition.SOUTHEAST)});
    383         dlg.setToolTipTexts(new String[] {
    384                 tr("Cancel"),
    385                 tr("Try lenient method")});
    386         dlg.setIcon(JOptionPane.WARNING_MESSAGE);
    387         dlg.setCancelButton(1);
    388         return dlg.showDialog().getValue() != 2;
    389     }
    390        
    391220        private static final void readNonGeometricAttributes(Feature feature, OsmPrimitive primitive) {
    392221                for (Property prop : feature.getProperties()) {
     
    404233                }
    405234        }
    406        
    407         private Node getNode(Point p, String key) {
    408                 Node n = nodes.get(key);
    409                 if (n == null && handler != null && handler.checkNodeProximity()) {
    410                         LatLon ll = new LatLon(p.getY(), p.getX());
    411                         for (Node node : nodes.values()) {
    412                                 if (node.getCoor().equalsEpsilon(ll)) {
    413                                         return node;
    414                                 }
    415                         }
    416                 }
    417                 return n;
    418         }
    419        
    420         private Node createOrGetNode(Point p) throws MismatchedDimensionException, TransformException {
    421                 Point p2 = (Point) JTS.transform(p, transform);
    422                 String key = p2.getX()+"/"+p2.getY();
    423                 //String key = LatLon.roundToOsmPrecisionStrict(p2.getX())+"/"+LatLon.roundToOsmPrecisionStrict(p2.getY());
    424                 Node n = getNode(p2, key);
    425                 if (n == null) {
    426                         n = new Node(new LatLon(p2.getY(), p2.getX()));
    427                         if (handler == null || handler.useNodeMap()) {
    428                                 nodes.put(key, n);
    429                         }
    430                         ds.addPrimitive(n);
    431                 } else if (n.getDataSet() == null) {
    432                     // ShpHandler may have removed the node from DataSet (see Paris public light handler for example)
    433                     ds.addPrimitive(n);
    434                 }
     235
     236        @Override
     237        protected Node createOrGetNode(Point p) throws MismatchedDimensionException, TransformException {
     238                Node n = super.createOrGetNode(p);
    435239                featurePrimitives.add(n);
    436240                return n;
    437241        }
    438242       
    439         private Way createWay(LineString ls) {
    440                 Way w = new Way();
    441                 if (ls != null) {
    442                         for (int i=0; i<ls.getNumPoints(); i++) {
    443                                 try {
    444                                         w.addNode(createOrGetNode(ls.getPointN(i)));
    445                                 } catch (Exception e) {
    446                                         System.err.println(e.getMessage());
    447                                 }
    448                         }
    449                 }
    450                 return addOsmPrimitive(w);
    451         }
    452 
    453         private Relation createMultipolygon() {
    454                 Relation r = new Relation();
    455                 r.put("type", "multipolygon");
    456                 return addOsmPrimitive(r);
    457         }
    458 
    459         private void addWayToMp(Relation r, String role, Way w) {
    460                 //result.addPrimitive(w);
    461                 r.addMember(new RelationMember(role, w));
    462         }
    463        
    464         private <T extends OsmPrimitive> T addOsmPrimitive(T p) {
    465                 ds.addPrimitive(p);
     243        @Override
     244        protected <T extends OsmPrimitive> T addOsmPrimitive(T p) {
    466245                featurePrimitives.add(p);
    467                 return p;
     246                return super.addOsmPrimitive(p);
    468247        }
    469248}
Note: See TracChangeset for help on using the changeset viewer.