Ignore:
Timestamp:
2014-10-18T04:52:35+02:00 (10 years ago)
Author:
donvip
Message:

[josm_opendata] fix some sonar issues in MIF support

Location:
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/MifDatum.java

    r30723 r30730  
    22package org.openstreetmap.josm.plugins.opendata.core.io.geographic;
    33
    4 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.*;
     4import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.AIRY;
     5import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.AUSTRALIAN_NATIONAL;
     6import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.BESSEL;
     7import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.BESSEL_1841;
     8import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.CLARKE_1866;
     9import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.CLARKE_1880;
     10import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.EVEREST;
     11import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.GRS_67;
     12import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.GRS_80;
     13import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.HELMERT_1906;
     14import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.HOUGH;
     15import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.INTERNATIONAL;
     16import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.KRASSOVSKY;
     17import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.MODIFIED_AIRY;
     18import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.MODIFIED_CLARKE_1866;
     19import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.MODIFIED_EVEREST;
     20import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.MODIFIED_FISCHER_1960;
     21import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.WGS_60;
     22import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.WGS_66;
     23import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.WGS_72;
     24import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.WGS_84;
    525
    626/**
     
    1131 */
    1232public enum MifDatum {
    13     Adindan(1, "Ethiopia, Mali, Senegal, Sudan", Clarke_1880),
    14     Afgooye(2, "Somalia", Krassovsky),
    15     Ain_el_Abd_1970(3, "Bahrain Island", International),
    16     Anna_1_Astro_1965(4, "Cocos Islands", Australian_National),
    17     Arc_1950(5, "Botswana, Lesotho, Malawi, Swaziland, Zaire, Zambia, Zimbabwe", Clarke_1880),
    18     Arc_1960(6, "Kenya, Tanzania", Clarke_1880),
    19     Ascension_Island_1958(7, "Ascension Island", International),
    20     Astro_Beacon_E(8, "Iwo Jima Island", International),
    21     Astro_B4_Sorol_Atoll(9, "Tern Island", International),
    22     Astro_DOS_71_4(10, "St. Helena Island", International),
    23     Astronomic_Station_1952(11, "Marcus Island", International),
    24     Australian_Geodetic_1966_AGD_66(12, "Australia and Tasmania Island", Australian_National),
    25     Australian_Geodetic_1984_AGD_84(13, "Australia and Tasmania Island", Australian_National),
    26     Belgium(110, "Belgium", International),
    27     Bellevue_IGN(14, "Efate and Erromango Islands", International),
    28     Bermuda_1957(15, "Bermuda Islands", Clarke_1866),
    29     Bogota_Observatory(16, "Colombia", International),
    30     Campo_Inchauspe(17, "Argentina", International),
    31     Canton_Astro_1966(18, "Phoenix Islands", International),
    32     Cape(19, "South Africa", Clarke_1880),
    33     Cape_Canaveral(20, "Florida and Bahama Islands", Clarke_1866),
    34     Carthage(21, "Tunisia", Clarke_1880),
    35     Chatham_1971(22, "Chatham Island (New Zealand)", International),
    36     Chua_Astro(23, "Paraguay", International),
    37     Corrego_Alegre(24, "Brazil", International),
    38     Deutsches_Hauptdreicksnetz_DHDN(1000, "Germany", Bessel),
    39     Djakarta_Batavia(25, "Sumatra Island (Indonesia)", Bessel_1841),
    40     DOS_1968(26, "Gizo Island (New Georgia Islands)", International),
    41     Easter_Island_1967(27, "Easter Island", International),
    42     European_1950_ED_50(28, "Austria, Belgium, Denmark, Finland, France, Germany, Gibraltar, Greece, Italy, Luxembourg, Netherlands, Norway, Portugal, Spain, Sweden, Switzerland", International),
    43     European_1979_ED_79(29, "Austria, Finland, Netherlands, Norway, Spain, Sweden, Switzerland", International),
    44     European_1987_ED_87(108, "Europe", International),
    45     Gandajika_Base(30, "Republic of Maldives", International),
    46     Geodetic_Datum_1949(31, "New Zealand", International),
    47     Geodetic_Reference_System_1967_GRS_67(32, "Worldwide", GRS_67),
    48     Geodetic_Reference_System_1980_GRS_80(33, "Worldwide", GRS_80),
    49     Guam_1963(34, "Guam Island", Clarke_1866),
    50     GUX_1_Astro(35, "Guadalcanal Island", International),
    51     Hito_XVIII_1963(36, "South Chile (near 53°S)", International),
    52     Hjorsey_1955(37, "Iceland", International),
    53     Hong_Kong_1963(38, "Hong Kong", International),
    54     Hu_Tzu_Shan(39, "Taiwan", International),
    55     Indian_40(40, "Thailand and Vietnam", Everest),
    56     Indian_41(41, "Bangladesh, India, Nepal", Everest),
    57     Ireland_1965(42, "Ireland", Modified_Airy),
    58     ISTS_073_Astro_1969(43, "Diego Garcia", International),
    59     Johnston_Island_1961(44, "Johnston Island", International),
    60     Kandawala(45, "Sri Lanka", Everest),
    61     Kerguelen_Island(46, "Kerguelen Island", International),
    62     Kertau_1948(47, "West Malaysia and Singapore", Modified_Everest),
    63     LC_5_Astro(48, "Cayman Brac Island", Clarke_1866),
    64     Liberia_1964(49, "Liberia", Clarke_1880),
    65     Lisboa_DLx(113, "Portugal", International),
    66     Luzon_50(50, "Philippines (excluding Mindanao Island)", Clarke_1866),
    67     Luzon_51(51, "Mindanao Island", Clarke_1866),
    68     Mahe_1971(52, "Mahe Island", Clarke_1880),
    69     Marco_Astro(53, "Salvage Islands", International),
    70     Massawa(54, "Eritrea (Ethiopia)", Bessel_1841),
    71     Melrica_1973_D73(114, "Portugal", International),
    72     Merchich(55, "Morocco", Clarke_1880),
    73     Midway_Astro_1961(56, "Midway Island", International),
    74     Minna(57, "Nigeria", Clarke_1880),
    75     Nahrwan_58(58, "Masirah Island (Oman)", Clarke_1880),
    76     Nahrwan_59(59, "United Arab Emirates", Clarke_1880),
    77     Nahrwan_60(60, "Saudi Arabia", Clarke_1880),
    78     Naparima_BWI(61, "Trinidad and Tobago", International),
    79     Netherlands(109, "Netherlands", Bessel),
    80     North_American_1927_NAD_27_CONTINENTAL(62, "Continental US", Clarke_1866),
    81     North_American_1927_NAD_27_ALASKA(63, "Alaska", Clarke_1866),
    82     North_American_1927_NAD_27_BAHAMAS(64, "Bahamas (excluding San Salvador Island)", Clarke_1866),
    83     North_American_1927_NAD_27_SAN_SALVADOR(65, "San Salvador Island", Clarke_1866),
    84     North_American_1927_NAD_27_CANADA(66, "Canada (including Newfoundland Island)", Clarke_1866),
    85     North_American_1927_NAD_27_CANAL_ZONE(67, "Canal Zone", Clarke_1866),
    86     North_American_1927_NAD_27_CARIBBEAN(68, "Caribbean (Turks and Caicos Islands)", Clarke_1866),
    87     North_American_1927_NAD_27_CENTRAL_AMERICA(69, "Central America (Belize, Costa Rica, El Salvador, Guatemala, Honduras, Nicaragua)", Clarke_1866),
    88     North_American_1927_NAD_27_CUBA(70, "Cuba", Clarke_1866),
    89     North_American_1927_NAD_27_GREENLAND(71, "Greenland (Hayes Peninsula)", Clarke_1866),
    90     North_American_1927_NAD_27_MEXICO(72, "Mexico", Clarke_1866),
    91     North_American_1927_NAD_27_MICHIGAN(73, "Michigan (used only for State Plane Coordinate System 1927)", Modified_Clarke_1866),
    92     North_American_1983_NAD_83(74, "Alaska, Canada, Central America, Continental US, Mexico", GRS_80),
    93     Nouvelle_Triangulation_Francaise_NTF(107, "France", Clarke_1880),
    94     Nouvelle_Triangulation_Francaise_NTF_Greenwich_Prime_Meridian(1002, "France", Clarke_1880),
     33    ADINDAN(1, "Ethiopia, Mali, Senegal, Sudan", CLARKE_1880),
     34    AFGOOYE(2, "Somalia", KRASSOVSKY),
     35    AIN_EL_ABD_1970(3, "Bahrain Island", INTERNATIONAL),
     36    ANNA_1_ASTRO_1965(4, "Cocos Islands", AUSTRALIAN_NATIONAL),
     37    ARC_1950(5, "Botswana, Lesotho, Malawi, Swaziland, Zaire, Zambia, Zimbabwe", CLARKE_1880),
     38    ARC_1960(6, "Kenya, Tanzania", CLARKE_1880),
     39    ASCENSION_ISLAND_1958(7, "Ascension Island", INTERNATIONAL),
     40    ASTRO_BEACON_E(8, "Iwo Jima Island", INTERNATIONAL),
     41    ASTRO_B4_SOROL_ATOLL(9, "Tern Island", INTERNATIONAL),
     42    ASTRO_DOS_71_4(10, "St. Helena Island", INTERNATIONAL),
     43    ASTRONOMIC_STATION_1952(11, "Marcus Island", INTERNATIONAL),
     44    AUSTRALIAN_GEODETIC_1966_AGD_66(12, "Australia and Tasmania Island", AUSTRALIAN_NATIONAL),
     45    AUSTRALIAN_GEODETIC_1984_AGD_84(13, "Australia and Tasmania Island", AUSTRALIAN_NATIONAL),
     46    BELGIUM(110, "Belgium", INTERNATIONAL),
     47    BELLEVUE_IGN(14, "Efate and Erromango Islands", INTERNATIONAL),
     48    BERMUDA_1957(15, "Bermuda Islands", CLARKE_1866),
     49    BOGOTA_OBSERVATORY(16, "Colombia", INTERNATIONAL),
     50    CAMPO_INCHAUSPE(17, "Argentina", INTERNATIONAL),
     51    CANTON_ASTRO_1966(18, "Phoenix Islands", INTERNATIONAL),
     52    CAPE(19, "South Africa", CLARKE_1880),
     53    CAPE_CANAVERAL(20, "Florida and Bahama Islands", CLARKE_1866),
     54    CARTHAGE(21, "Tunisia", CLARKE_1880),
     55    CHATHAM_1971(22, "Chatham Island (New Zealand)", INTERNATIONAL),
     56    CHUA_ASTRO(23, "Paraguay", INTERNATIONAL),
     57    CORREGO_ALEGRE(24, "Brazil", INTERNATIONAL),
     58    DEUTSCHES_HAUPTDREICKSNETZ_DHDN(1000, "Germany", BESSEL),
     59    DJAKARTA_BATAVIA(25, "Sumatra Island (Indonesia)", BESSEL_1841),
     60    DOS_1968(26, "Gizo Island (New Georgia Islands)", INTERNATIONAL),
     61    EASTER_ISLAND_1967(27, "Easter Island", INTERNATIONAL),
     62    EUROPEAN_1950_ED_50(28, "Austria, Belgium, Denmark, Finland, France, Germany, Gibraltar, Greece, Italy, Luxembourg, Netherlands, Norway, Portugal, Spain, Sweden, Switzerland", INTERNATIONAL),
     63    EUROPEAN_1979_ED_79(29, "Austria, Finland, Netherlands, Norway, Spain, Sweden, Switzerland", INTERNATIONAL),
     64    EUROPEAN_1987_ED_87(108, "Europe", INTERNATIONAL),
     65    GANDAJIKA_BASE(30, "Republic of Maldives", INTERNATIONAL),
     66    GEODETIC_DATUM_1949(31, "New Zealand", INTERNATIONAL),
     67    GEODETIC_REFERENCE_SYSTEM_1967_GRS_67(32, "Worldwide", GRS_67),
     68    GEODETIC_REFERENCE_SYSTEM_1980_GRS_80(33, "Worldwide", GRS_80),
     69    GUAM_1963(34, "Guam Island", CLARKE_1866),
     70    GUX_1_ASTRO(35, "Guadalcanal Island", INTERNATIONAL),
     71    HITO_XVIII_1963(36, "South Chile (near 53°S)", INTERNATIONAL),
     72    HJORSEY_1955(37, "Iceland", INTERNATIONAL),
     73    HONG_KONG_1963(38, "Hong Kong", INTERNATIONAL),
     74    HU_TZU_SHAN(39, "Taiwan", INTERNATIONAL),
     75    INDIAN_40(40, "Thailand and Vietnam", EVEREST),
     76    INDIAN_41(41, "Bangladesh, India, Nepal", EVEREST),
     77    IRELAND_1965(42, "Ireland", MODIFIED_AIRY),
     78    ISTS_073_ASTRO_1969(43, "Diego Garcia", INTERNATIONAL),
     79    JOHNSTON_ISLAND_1961(44, "Johnston Island", INTERNATIONAL),
     80    KANDAWALA(45, "Sri Lanka", EVEREST),
     81    KERGUELEN_ISLAND(46, "Kerguelen Island", INTERNATIONAL),
     82    KERTAU_1948(47, "West Malaysia and Singapore", MODIFIED_EVEREST),
     83    LC_5_ASTRO(48, "Cayman Brac Island", CLARKE_1866),
     84    LIBERIA_1964(49, "Liberia", CLARKE_1880),
     85    LISBOA_DLX(113, "Portugal", INTERNATIONAL),
     86    LUZON_50(50, "Philippines (excluding Mindanao Island)", CLARKE_1866),
     87    LUZON_51(51, "Mindanao Island", CLARKE_1866),
     88    MAHE_1971(52, "Mahe Island", CLARKE_1880),
     89    MARCO_ASTRO(53, "Salvage Islands", INTERNATIONAL),
     90    MASSAWA(54, "Eritrea (Ethiopia)", BESSEL_1841),
     91    MELRICA_1973_D73(114, "Portugal", INTERNATIONAL),
     92    MERCHICH(55, "Morocco", CLARKE_1880),
     93    MIDWAY_ASTRO_1961(56, "Midway Island", INTERNATIONAL),
     94    MINNA(57, "Nigeria", CLARKE_1880),
     95    NAHRWAN_58(58, "Masirah Island (Oman)", CLARKE_1880),
     96    NAHRWAN_59(59, "United Arab Emirates", CLARKE_1880),
     97    NAHRWAN_60(60, "Saudi Arabia", CLARKE_1880),
     98    NAPARIMA_BWI(61, "Trinidad and Tobago", INTERNATIONAL),
     99    NETHERLANDS(109, "Netherlands", BESSEL),
     100    NORTH_AMERICAN_1927_NAD_27_CONTINENTAL(62, "Continental US", CLARKE_1866),
     101    NORTH_AMERICAN_1927_NAD_27_ALASKA(63, "Alaska", CLARKE_1866),
     102    NORTH_AMERICAN_1927_NAD_27_BAHAMAS(64, "Bahamas (excluding San Salvador Island)", CLARKE_1866),
     103    NORTH_AMERICAN_1927_NAD_27_SAN_SALVADOR(65, "San Salvador Island", CLARKE_1866),
     104    NORTH_AMERICAN_1927_NAD_27_CANADA(66, "Canada (including Newfoundland Island)", CLARKE_1866),
     105    NORTH_AMERICAN_1927_NAD_27_CANAL_ZONE(67, "Canal Zone", CLARKE_1866),
     106    NORTH_AMERICAN_1927_NAD_27_CARIBBEAN(68, "Caribbean (Turks and Caicos Islands)", CLARKE_1866),
     107    NORTH_AMERICAN_1927_NAD_27_CENTRAL_AMERICA(69, "Central America (Belize, Costa Rica, El Salvador, Guatemala, Honduras, Nicaragua)", CLARKE_1866),
     108    NORTH_AMERICAN_1927_NAD_27_CUBA(70, "Cuba", CLARKE_1866),
     109    NORTH_AMERICAN_1927_NAD_27_GREENLAND(71, "Greenland (Hayes Peninsula)", CLARKE_1866),
     110    NORTH_AMERICAN_1927_NAD_27_MEXICO(72, "Mexico", CLARKE_1866),
     111    NORTH_AMERICAN_1927_NAD_27_MICHIGAN(73, "Michigan (used only for State Plane Coordinate System 1927)", MODIFIED_CLARKE_1866),
     112    NORTH_AMERICAN_1983_NAD_83(74, "Alaska, Canada, Central America, Continental US, Mexico", GRS_80),
     113    NOUVELLE_TRIANGULATION_FRANCAISE_NTF(107, "France", CLARKE_1880),
     114    NOUVELLE_TRIANGULATION_FRANCAISE_NTF_GREENWICH_PRIME_MERIDIAN(1002, "France", CLARKE_1880),
    95115    NWGL_10(111, "Worldwide", WGS_72),
    96     Observatorio_1966(75, "Corvo and Flores Islands (Azores)", International),
    97     Old_Egyptian(76, "Egypt", Helmert_1906),
    98     Old_Hawaiian(77, "Hawaii", Clarke_1866),
    99     Oman(78, "Oman", Clarke_1880),
    100     Ordnance_Survey_of_Great_Britain_1936(79, "England, Isle of Man, Scotland, Shetland Islands, Wales", Airy),
    101     Pico_de_las_Nieves(80, "Canary Islands", International),
    102     Pitcairn_Astro_1967(81, "Pitcairn Island", International),
    103     Potsdam(1000, "Germany", Bessel),
    104     Provisional_South_Chilean_1963(36, "South Chile (near 53°S)", International),
    105     Provisional_South_American_1956(82, "Bolivia, Chile, Colombia, Ecuador, Guyana, Peru, Venezuela", International),
    106     Puerto_Rico(83, "Puerto Rico and Virgin Islands", Clarke_1866),
    107     Pulkovo_1942(1001, "Germany", Krassovsky),
    108     Qatar_National(84, "Qatar", International),
    109     Qornoq(85, "South Greenland", International),
    110     Rauenberg(1000, "Germany", Bessel),
    111     Reunion(86, "Mascarene Island", International),
    112     Rikets_Triangulering_1990_RT_90(112, "Sweden", Bessel),
    113     Rome_1940(87, "Sardinia Island", International),
    114     Santo_DOS(88, "Espirito Santo Island", International),
    115     Sao_Braz(89, "São Miguel, Santa Maria Islands (Azores)", International),
    116     Sapper_Hill_1943(90, "East Falkland Island", International),
    117     Schwarzeck(91, "Namibia Modified", Bessel_1841),
    118     South_American_1969(92, "Argentina, Bolivia, Brazil, Chile, Colombia, Ecuador, Guyana, Paraguay, Peru, Venezuela, Trinidad, and Tobago", MifEllipsoid.South_American_1969),
    119     South_Asia(93, "Singapore", Modified_Fischer_1960),
    120     Southeast_Base(94, "Porto Santo and Madeira Islands", International),
    121     Southwest_Base(95, "Faial, Graciosa, Pico, Sao Jorge, Terceira Islands (Azores)", International),
    122     Switzerland_CH_1903(1003, "Switzerland", Bessel),
    123     Timbalai_1948(96, "Brunei and East Malaysia (Sarawak and Sabah)", Everest),
    124     Tokyo(97, "Japan, Korea, Okinawa", Bessel_1841),
    125     Tristan_Astro_1968(98, "Tristan da Cunha", International),
    126     Viti_Levu_1916(99, "Viti Levu Island (Fiji Islands)", Clarke_1880),
    127     Wake_Eniwetok_1960(100, "", Hough),
    128     World_Geodetic_System_1960_WGS_60(101, "", WGS_60),
    129     World_Geodetic_System_1966_WGS_66(102, "", WGS_66),
    130     World_Geodetic_System_1972_WGS_72(103, "", WGS_72),
    131     World_Geodetic_System_1984_WGS_84(104, "", WGS_84),
    132     Yacare(105, "", International),
    133     Zanderij(106, "", International),
    134     Custom(999, null, null);
    135    
     116    OBSERVATORIO_1966(75, "Corvo and Flores Islands (Azores)", INTERNATIONAL),
     117    OLD_EGYPTIAN(76, "Egypt", HELMERT_1906),
     118    OLD_HAWAIIAN(77, "Hawaii", CLARKE_1866),
     119    OMAN(78, "Oman", CLARKE_1880),
     120    ORDNANCE_SURVEY_OF_GREAT_BRITAIN_1936(79, "England, Isle of Man, Scotland, Shetland Islands, Wales", AIRY),
     121    PICO_DE_LAS_NIEVES(80, "Canary Islands", INTERNATIONAL),
     122    PITCAIRN_ASTRO_1967(81, "Pitcairn Island", INTERNATIONAL),
     123    POTSDAM(1000, "Germany", BESSEL),
     124    PROVISIONAL_SOUTH_CHILEAN_1963(36, "South Chile (near 53°S)", INTERNATIONAL),
     125    PROVISIONAL_SOUTH_AMERICAN_1956(82, "Bolivia, Chile, Colombia, Ecuador, Guyana, Peru, Venezuela", INTERNATIONAL),
     126    PUERTO_RICO(83, "Puerto Rico and Virgin Islands", CLARKE_1866),
     127    PULKOVO_1942(1001, "Germany", KRASSOVSKY),
     128    QATAR_NATIONAL(84, "Qatar", INTERNATIONAL),
     129    QORNOQ(85, "South Greenland", INTERNATIONAL),
     130    RAUENBERG(1000, "Germany", BESSEL),
     131    REUNION(86, "Mascarene Island", INTERNATIONAL),
     132    RIKETS_TRIANGULERING_1990_RT_90(112, "Sweden", BESSEL),
     133    ROME_1940(87, "Sardinia Island", INTERNATIONAL),
     134    SANTO_DOS(88, "Espirito Santo Island", INTERNATIONAL),
     135    SAO_BRAZ(89, "São Miguel, Santa Maria Islands (Azores)", INTERNATIONAL),
     136    SAPPER_HILL_1943(90, "East Falkland Island", INTERNATIONAL),
     137    SCHWARZECK(91, "Namibia Modified", BESSEL_1841),
     138    SOUTH_AMERICAN_1969(92, "Argentina, Bolivia, Brazil, Chile, Colombia, Ecuador, Guyana, Paraguay, Peru, Venezuela, Trinidad, and Tobago", MifEllipsoid.SOUTH_AMERICAN_1969),
     139    SOUTH_ASIA(93, "Singapore", MODIFIED_FISCHER_1960),
     140    SOUTHEAST_BASE(94, "Porto Santo and Madeira Islands", INTERNATIONAL),
     141    SOUTHWEST_BASE(95, "Faial, Graciosa, Pico, Sao Jorge, Terceira Islands (Azores)", INTERNATIONAL),
     142    SWITZERLAND_CH_1903(1003, "Switzerland", BESSEL),
     143    TIMBALAI_1948(96, "Brunei and East Malaysia (Sarawak and Sabah)", EVEREST),
     144    TOKYO(97, "Japan, Korea, Okinawa", BESSEL_1841),
     145    TRISTAN_ASTRO_1968(98, "Tristan da Cunha", INTERNATIONAL),
     146    VITI_LEVU_1916(99, "Viti Levu Island (Fiji Islands)", CLARKE_1880),
     147    WAKE_ENIWETOK_1960(100, "", HOUGH),
     148    WORLD_GEODETIC_SYSTEM_1960_WGS_60(101, "", WGS_60),
     149    WORLD_GEODETIC_SYSTEM_1966_WGS_66(102, "", WGS_66),
     150    WORLD_GEODETIC_System_1972_WGS_72(103, "", WGS_72),
     151    WORLD_GEODETIC_System_1984_WGS_84(104, "", WGS_84),
     152    YACARE(105, "", INTERNATIONAL),
     153    ZANDERIJ(106, "", INTERNATIONAL),
     154    CUSTOM(999, null, null);
     155
    136156    private final Integer code;
    137157    private final String area;
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/MifEllipsoid.java

    r30723 r30730  
    99 */
    1010public enum MifEllipsoid {
    11     Airy,
    12     Modified_Airy,
    13     Australian_National,
    14     Bessel,
    15     Bessel_1841,
    16     Clarke_1866,
    17     Modified_Clarke_1866,
    18     Clarke_1880,
    19     Modified_Clarke_1880,
    20     Everest,
    21     Modified_Fischer_1960,
    22     Helmert_1906,
    23     Hough,
    24     Modified_Everest,
     11    AIRY,
     12    MODIFIED_AIRY,
     13    AUSTRALIAN_NATIONAL,
     14    BESSEL,
     15    BESSEL_1841,
     16    CLARKE_1866,
     17    MODIFIED_CLARKE_1866,
     18    CLARKE_1880,
     19    MODIFIED_CLARKE_1880,
     20    EVEREST,
     21    MODIFIED_FISCHER_1960,
     22    HELMERT_1906,
     23    HOUGH,
     24    MODIFIED_EVEREST,
    2525    GRS_67,
    2626    GRS_80,
    27     International,
    28     Krassovsky,
    29     South_American_1969,
     27    INTERNATIONAL,
     28    KRASSOVSKY,
     29    SOUTH_AMERICAN_1969,
    3030    WGS_60,
    3131    WGS_66,
  • applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/MifReader.java

    r30583 r30730  
    22package org.openstreetmap.josm.plugins.opendata.core.io.geographic;
    33
    4 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifDatum.Custom;
    5 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifDatum.Geodetic_Reference_System_1980_GRS_80;
     4import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifDatum.CUSTOM;
     5import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifDatum.GEODETIC_REFERENCE_SYSTEM_1980_GRS_80;
    66import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifProjection.Hotine_Oblique_Mercator;
    77import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifProjection.Longitude_Latitude;
     
    5555        END_POLYLINE
    5656    }
    57    
     57
    5858    private final AbstractDataSetHandler handler;
    59    
     59
    6060    private File file;
    6161    private InputStream stream;
     
    6464
    6565    private Character delimiter = '\t';
    66    
     66
    6767    private State state = State.UNKNOWN;
    68    
     68
    6969    private Projection josmProj;
    7070    private DataSet ds;
     
    8787    private Double maxx;
    8888    private Double maxy;
    89    
     89
    9090    // Region clause
    9191    private int numpolygons = -1;
    9292    private int numpts = -1;
    93    
     93
    9494    // PLine clause
    9595    private int numsections = -1;
    96    
     96
    9797    private MifReader(AbstractDataSetHandler handler) {
    9898        this.handler = handler;
    9999    }
    100    
     100
    101101    public static DataSet parseDataSet(InputStream in, File file,
    102102            AbstractDataSetHandler handler, ProgressMonitor instance) throws IOException {
     
    117117        Main.warn("TODO Index: "+line);
    118118    }
    119    
     119
    120120    private static String param(Param p, Object value) {
    121121        return " +"+p.key+"="+value;
     
    127127
    128128        // Custom datum: TODO: use custom decalage values
    129         int offset = datum == Custom ? 4 : 0;
     129        int offset = datum == CUSTOM ? 4 : 0;
    130130
    131131        if (proj == Longitude_Latitude) {
     
    133133            return;
    134134        }
    135        
     135
    136136        // Initialize proj4-like parameters
    137137        String params = param(Param.proj, proj.getProj4Id());
    138        
     138
    139139        // Units
    140140        units = words[5+offset];
    141141        params += param(Param.units, units);
    142        
     142
    143143        // Origin, longitude
    144144        originLon = Double.parseDouble(words[6+offset]);
    145145        params += param(Param.lon_0, originLon);
    146        
     146
    147147        // Origin, latitude
    148148        switch(proj) {
     
    167167            break;
    168168        }
    169        
     169
    170170        // Standard Parallel 1
    171171        switch (proj) {
     
    194194            break;
    195195        }
    196        
     196
    197197        // Azimuth
    198198        if (proj == Hotine_Oblique_Mercator) {
     
    217217            break;
    218218        }
    219        
     219
    220220        // False Easting/Northing
    221221        switch (proj) {
     
    250250            break;
    251251        }
    252                                    
     252
    253253        // Range
    254254        switch (proj) {
     
    261261        switch (proj) {
    262262        case Lambert_Conformal_Conic:
    263             if ((datum == Geodetic_Reference_System_1980_GRS_80 || datum == Custom) && equals(originLon, 3.0)) {
     263            if ((datum == GEODETIC_REFERENCE_SYSTEM_1980_GRS_80 || datum == CUSTOM) && equals(originLon, 3.0)) {
    264264                // This sounds good for Lambert 93 or Lambert CC 9
    265265                if (equals(originLat, 46.5) && equals(stdP1, 44.0) && equals(stdP2, 49.0) && equals(falseEasting, 700000.0) && equals(falseNorthing, 6600000.0)) {
     
    275275            break;
    276276        }
    277        
     277
    278278        // TODO: handle cases with Affine declaration
    279279        int index = parseAffineUnits(words);
     
    281281        // handle cases with Bounds declaration
    282282        parseBounds(words, index);
    283        
     283
    284284        if (josmProj == null) {
    285285            Main.info(line);
     
    292292        // handle cases with Affine declaration
    293293        int index = parseAffineUnits(words);
    294        
     294
    295295        units = words[index+1];
    296        
     296
    297297        parseBounds(words, index+2);
    298298    }
    299    
     299
    300300    private int parseAffineUnits(String[] words) {
    301301        // TODO: handle affine units
     
    326326        case "nonearth":
    327327            parseCoordSysSyntax2(words);
    328            
     328
    329329            // Syntax2 is not meant to be used for maps, and still... # 9592 happened
    330330            // From MapInfo documentation:
    331331            // http://testdrive.mapinfo.com/TDC/mxtreme4java.nsf/22fbc128f401ad818525666a00646bda/50100fdbe3e0a85085256a770053be1a/$FILE/coordsys.txt
    332             // Use syntax 1 (above) to explicitly define a coordinate system for an Earth map (a map having coordinates which are specified with respect to a 
    333             // location on the surface of the Earth). The optional Projection parameters dictate what map projection, if any, should be used in conjunction with 
    334             // the coordinate system. If the Projection clause is omitted, MapBasic uses a longitude, latitude coordinate system using the North American Datum of 1927 (NAD-27). 
    335             // Use syntax 2 to explicitly define a non-Earth coordinate system, such as the coordinate system used in a floor plan or other CAD drawing. 
    336            
     332            // Use syntax 1 (above) to explicitly define a coordinate system for an Earth map (a map having coordinates which are specified with respect to a
     333            // location on the surface of the Earth). The optional Projection parameters dictate what map projection, if any, should be used in conjunction with
     334            // the coordinate system. If the Projection clause is omitted, MapBasic uses a longitude, latitude coordinate system using the North American Datum of 1927 (NAD-27).
     335            // Use syntax 2 to explicitly define a non-Earth coordinate system, such as the coordinate system used in a floor plan or other CAD drawing.
     336
    337337            if (handler != null && handler.getMifHandler() != null && handler.getMifHandler().getCoordSysNonEarthProjection() != null) {
    338338                josmProj = handler.getMifHandler().getCoordSysNonEarthProjection();
     
    367367        }
    368368    }
    369    
     369
    370370    private void parsePoint(String[] words) throws IOException {
    371371        readAttributes(createNode(words[1], words[2]));
     
    379379        line.addNode(createNode(words[3], words[4]));
    380380    }
    381    
     381
    382382    private void startPolyLineSegment(boolean initial) throws IOException {
    383383        Way previousPolyline = polyline;
     
    392392        state = State.READING_POINTS;
    393393    }
    394    
     394
    395395    private void parsePLine(String[] words) throws IOException {
    396396        numsections = 1;
     
    463463        midReader = getDataReader(file, ".mid", charset);
    464464    }
    465    
     465
    466466    private DataSet parse(InputStream in, File file, ProgressMonitor instance, Charset cs) throws IOException {
    467467        try {
     
    513513                }
    514514                state = State.READING_POINTS;
    515                
     515
    516516            } else if (state == State.START_POLYLINE_SEGMENT) {
    517517                numpts = Integer.parseInt(words[0]);
    518518                startPolyLineSegment(polyline != null);
    519                
     519
    520520            } else if (state == State.READING_POINTS && numpts > 0) {
    521521                if (josmProj != null) {
     
    587587        }
    588588    }
    589    
     589
    590590    protected void readAttributes(OsmPrimitive p) throws IOException {
    591         if (midReader != null) { 
     591        if (midReader != null) {
    592592            String midLine = midReader.readLine();
    593593            if (midLine != null) {
     
    608608        }
    609609    }
    610    
     610
    611611    protected final Node createNode(String x, String y) {
    612612        Node node = new Node(josmProj.eastNorth2latlon(new EastNorth(Double.parseDouble(x), Double.parseDouble(y))));
     
    614614        return node;
    615615    }
    616    
     616
    617617    /** Compare two doubles within a default epsilon */
    618618    public static boolean equals(Double a, Double b) {
Note: See TracChangeset for help on using the changeset viewer.