Changeset 30730 in osm for applications/editors/josm/plugins/opendata
- Timestamp:
- 2014-10-18T04:52:35+02:00 (10 years ago)
- 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 2 2 package org.openstreetmap.josm.plugins.opendata.core.io.geographic; 3 3 4 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.*; 4 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.AIRY; 5 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.AUSTRALIAN_NATIONAL; 6 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.BESSEL; 7 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.BESSEL_1841; 8 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.CLARKE_1866; 9 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.CLARKE_1880; 10 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.EVEREST; 11 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.GRS_67; 12 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.GRS_80; 13 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.HELMERT_1906; 14 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.HOUGH; 15 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.INTERNATIONAL; 16 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.KRASSOVSKY; 17 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.MODIFIED_AIRY; 18 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.MODIFIED_CLARKE_1866; 19 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.MODIFIED_EVEREST; 20 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.MODIFIED_FISCHER_1960; 21 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.WGS_60; 22 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.WGS_66; 23 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.WGS_72; 24 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifEllipsoid.WGS_84; 5 25 6 26 /** … … 11 31 */ 12 32 public enum MifDatum { 13 A dindan(1, "Ethiopia, Mali, Senegal, Sudan", Clarke_1880),14 A fgooye(2, "Somalia", Krassovsky),15 A in_el_Abd_1970(3, "Bahrain Island", International),16 A nna_1_Astro_1965(4, "Cocos Islands", Australian_National),17 A rc_1950(5, "Botswana, Lesotho, Malawi, Swaziland, Zaire, Zambia, Zimbabwe", Clarke_1880),18 A rc_1960(6, "Kenya, Tanzania", Clarke_1880),19 A scension_Island_1958(7, "Ascension Island", International),20 A stro_Beacon_E(8, "Iwo Jima Island", International),21 A stro_B4_Sorol_Atoll(9, "Tern Island", International),22 A stro_DOS_71_4(10, "St. Helena Island", International),23 A stronomic_Station_1952(11, "Marcus Island", International),24 A ustralian_Geodetic_1966_AGD_66(12, "Australia and Tasmania Island", Australian_National),25 A ustralian_Geodetic_1984_AGD_84(13, "Australia and Tasmania Island", Australian_National),26 B elgium(110, "Belgium", International),27 B ellevue_IGN(14, "Efate and Erromango Islands", International),28 B ermuda_1957(15, "Bermuda Islands", Clarke_1866),29 B ogota_Observatory(16, "Colombia", International),30 C ampo_Inchauspe(17, "Argentina", International),31 C anton_Astro_1966(18, "Phoenix Islands", International),32 C ape(19, "South Africa", Clarke_1880),33 C ape_Canaveral(20, "Florida and Bahama Islands", Clarke_1866),34 C arthage(21, "Tunisia", Clarke_1880),35 C hatham_1971(22, "Chatham Island (New Zealand)", International),36 C hua_Astro(23, "Paraguay", International),37 C orrego_Alegre(24, "Brazil", International),38 D eutsches_Hauptdreicksnetz_DHDN(1000, "Germany", Bessel),39 D jakarta_Batavia(25, "Sumatra Island (Indonesia)", Bessel_1841),40 DOS_1968(26, "Gizo Island (New Georgia Islands)", I nternational),41 E aster_Island_1967(27, "Easter Island", International),42 E uropean_1950_ED_50(28, "Austria, Belgium, Denmark, Finland, France, Germany, Gibraltar, Greece, Italy, Luxembourg, Netherlands, Norway, Portugal, Spain, Sweden, Switzerland", International),43 E uropean_1979_ED_79(29, "Austria, Finland, Netherlands, Norway, Spain, Sweden, Switzerland", International),44 E uropean_1987_ED_87(108, "Europe", International),45 G andajika_Base(30, "Republic of Maldives", International),46 G eodetic_Datum_1949(31, "New Zealand", International),47 G eodetic_Reference_System_1967_GRS_67(32, "Worldwide", GRS_67),48 G eodetic_Reference_System_1980_GRS_80(33, "Worldwide", GRS_80),49 G uam_1963(34, "Guam Island", Clarke_1866),50 GUX_1_A stro(35, "Guadalcanal Island", International),51 H ito_XVIII_1963(36, "South Chile (near 53°S)", International),52 H jorsey_1955(37, "Iceland", International),53 H ong_Kong_1963(38, "Hong Kong", International),54 H u_Tzu_Shan(39, "Taiwan", International),55 I ndian_40(40, "Thailand and Vietnam", Everest),56 I ndian_41(41, "Bangladesh, India, Nepal", Everest),57 I reland_1965(42, "Ireland", Modified_Airy),58 ISTS_073_A stro_1969(43, "Diego Garcia", International),59 J ohnston_Island_1961(44, "Johnston Island", International),60 K andawala(45, "Sri Lanka", Everest),61 K erguelen_Island(46, "Kerguelen Island", International),62 K ertau_1948(47, "West Malaysia and Singapore", Modified_Everest),63 LC_5_A stro(48, "Cayman Brac Island", Clarke_1866),64 L iberia_1964(49, "Liberia", Clarke_1880),65 L isboa_DLx(113, "Portugal", International),66 L uzon_50(50, "Philippines (excluding Mindanao Island)", Clarke_1866),67 L uzon_51(51, "Mindanao Island", Clarke_1866),68 M ahe_1971(52, "Mahe Island", Clarke_1880),69 M arco_Astro(53, "Salvage Islands", International),70 M assawa(54, "Eritrea (Ethiopia)", Bessel_1841),71 M elrica_1973_D73(114, "Portugal", International),72 M erchich(55, "Morocco", Clarke_1880),73 M idway_Astro_1961(56, "Midway Island", International),74 M inna(57, "Nigeria", Clarke_1880),75 N ahrwan_58(58, "Masirah Island (Oman)", Clarke_1880),76 N ahrwan_59(59, "United Arab Emirates", Clarke_1880),77 N ahrwan_60(60, "Saudi Arabia", Clarke_1880),78 N aparima_BWI(61, "Trinidad and Tobago", International),79 N etherlands(109, "Netherlands", Bessel),80 N orth_American_1927_NAD_27_CONTINENTAL(62, "Continental US", Clarke_1866),81 N orth_American_1927_NAD_27_ALASKA(63, "Alaska", Clarke_1866),82 N orth_American_1927_NAD_27_BAHAMAS(64, "Bahamas (excluding San Salvador Island)", Clarke_1866),83 N orth_American_1927_NAD_27_SAN_SALVADOR(65, "San Salvador Island", Clarke_1866),84 N orth_American_1927_NAD_27_CANADA(66, "Canada (including Newfoundland Island)", Clarke_1866),85 N orth_American_1927_NAD_27_CANAL_ZONE(67, "Canal Zone", Clarke_1866),86 N orth_American_1927_NAD_27_CARIBBEAN(68, "Caribbean (Turks and Caicos Islands)", Clarke_1866),87 N orth_American_1927_NAD_27_CENTRAL_AMERICA(69, "Central America (Belize, Costa Rica, El Salvador, Guatemala, Honduras, Nicaragua)", Clarke_1866),88 N orth_American_1927_NAD_27_CUBA(70, "Cuba", Clarke_1866),89 N orth_American_1927_NAD_27_GREENLAND(71, "Greenland (Hayes Peninsula)", Clarke_1866),90 N orth_American_1927_NAD_27_MEXICO(72, "Mexico", Clarke_1866),91 N orth_American_1927_NAD_27_MICHIGAN(73, "Michigan (used only for State Plane Coordinate System 1927)", Modified_Clarke_1866),92 N orth_American_1983_NAD_83(74, "Alaska, Canada, Central America, Continental US, Mexico", GRS_80),93 N ouvelle_Triangulation_Francaise_NTF(107, "France", Clarke_1880),94 N ouvelle_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), 95 115 NWGL_10(111, "Worldwide", WGS_72), 96 O bservatorio_1966(75, "Corvo and Flores Islands (Azores)", International),97 O ld_Egyptian(76, "Egypt", Helmert_1906),98 O ld_Hawaiian(77, "Hawaii", Clarke_1866),99 O man(78, "Oman", Clarke_1880),100 O rdnance_Survey_of_Great_Britain_1936(79, "England, Isle of Man, Scotland, Shetland Islands, Wales", Airy),101 P ico_de_las_Nieves(80, "Canary Islands", International),102 P itcairn_Astro_1967(81, "Pitcairn Island", International),103 P otsdam(1000, "Germany", Bessel),104 P rovisional_South_Chilean_1963(36, "South Chile (near 53°S)", International),105 P rovisional_South_American_1956(82, "Bolivia, Chile, Colombia, Ecuador, Guyana, Peru, Venezuela", International),106 P uerto_Rico(83, "Puerto Rico and Virgin Islands", Clarke_1866),107 P ulkovo_1942(1001, "Germany", Krassovsky),108 Q atar_National(84, "Qatar", International),109 Q ornoq(85, "South Greenland", International),110 R auenberg(1000, "Germany", Bessel),111 R eunion(86, "Mascarene Island", International),112 R ikets_Triangulering_1990_RT_90(112, "Sweden", Bessel),113 R ome_1940(87, "Sardinia Island", International),114 S anto_DOS(88, "Espirito Santo Island", International),115 S ao_Braz(89, "São Miguel, Santa Maria Islands (Azores)", International),116 S apper_Hill_1943(90, "East Falkland Island", International),117 S chwarzeck(91, "Namibia Modified", Bessel_1841),118 S outh_American_1969(92, "Argentina, Bolivia, Brazil, Chile, Colombia, Ecuador, Guyana, Paraguay, Peru, Venezuela, Trinidad, and Tobago", MifEllipsoid.South_American_1969),119 S outh_Asia(93, "Singapore", Modified_Fischer_1960),120 S outheast_Base(94, "Porto Santo and Madeira Islands", International),121 S outhwest_Base(95, "Faial, Graciosa, Pico, Sao Jorge, Terceira Islands (Azores)", International),122 S witzerland_CH_1903(1003, "Switzerland", Bessel),123 T imbalai_1948(96, "Brunei and East Malaysia (Sarawak and Sabah)", Everest),124 T okyo(97, "Japan, Korea, Okinawa", Bessel_1841),125 T ristan_Astro_1968(98, "Tristan da Cunha", International),126 V iti_Levu_1916(99, "Viti Levu Island (Fiji Islands)", Clarke_1880),127 W ake_Eniwetok_1960(100, "", Hough),128 W orld_Geodetic_System_1960_WGS_60(101, "", WGS_60),129 W orld_Geodetic_System_1966_WGS_66(102, "", WGS_66),130 W orld_Geodetic_System_1972_WGS_72(103, "", WGS_72),131 W orld_Geodetic_System_1984_WGS_84(104, "", WGS_84),132 Y acare(105, "", International),133 Z anderij(106, "", International),134 C ustom(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 136 156 private final Integer code; 137 157 private final String area; -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/MifEllipsoid.java
r30723 r30730 9 9 */ 10 10 public enum MifEllipsoid { 11 A iry,12 M odified_Airy,13 A ustralian_National,14 B essel,15 B essel_1841,16 C larke_1866,17 M odified_Clarke_1866,18 C larke_1880,19 M odified_Clarke_1880,20 E verest,21 M odified_Fischer_1960,22 H elmert_1906,23 H ough,24 M odified_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, 25 25 GRS_67, 26 26 GRS_80, 27 I nternational,28 K rassovsky,29 S outh_American_1969,27 INTERNATIONAL, 28 KRASSOVSKY, 29 SOUTH_AMERICAN_1969, 30 30 WGS_60, 31 31 WGS_66, -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/MifReader.java
r30583 r30730 2 2 package org.openstreetmap.josm.plugins.opendata.core.io.geographic; 3 3 4 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifDatum.C ustom;5 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifDatum.G eodetic_Reference_System_1980_GRS_80;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; 6 6 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifProjection.Hotine_Oblique_Mercator; 7 7 import static org.openstreetmap.josm.plugins.opendata.core.io.geographic.MifProjection.Longitude_Latitude; … … 55 55 END_POLYLINE 56 56 } 57 57 58 58 private final AbstractDataSetHandler handler; 59 59 60 60 private File file; 61 61 private InputStream stream; … … 64 64 65 65 private Character delimiter = '\t'; 66 66 67 67 private State state = State.UNKNOWN; 68 68 69 69 private Projection josmProj; 70 70 private DataSet ds; … … 87 87 private Double maxx; 88 88 private Double maxy; 89 89 90 90 // Region clause 91 91 private int numpolygons = -1; 92 92 private int numpts = -1; 93 93 94 94 // PLine clause 95 95 private int numsections = -1; 96 96 97 97 private MifReader(AbstractDataSetHandler handler) { 98 98 this.handler = handler; 99 99 } 100 100 101 101 public static DataSet parseDataSet(InputStream in, File file, 102 102 AbstractDataSetHandler handler, ProgressMonitor instance) throws IOException { … … 117 117 Main.warn("TODO Index: "+line); 118 118 } 119 119 120 120 private static String param(Param p, Object value) { 121 121 return " +"+p.key+"="+value; … … 127 127 128 128 // Custom datum: TODO: use custom decalage values 129 int offset = datum == C ustom? 4 : 0;129 int offset = datum == CUSTOM ? 4 : 0; 130 130 131 131 if (proj == Longitude_Latitude) { … … 133 133 return; 134 134 } 135 135 136 136 // Initialize proj4-like parameters 137 137 String params = param(Param.proj, proj.getProj4Id()); 138 138 139 139 // Units 140 140 units = words[5+offset]; 141 141 params += param(Param.units, units); 142 142 143 143 // Origin, longitude 144 144 originLon = Double.parseDouble(words[6+offset]); 145 145 params += param(Param.lon_0, originLon); 146 146 147 147 // Origin, latitude 148 148 switch(proj) { … … 167 167 break; 168 168 } 169 169 170 170 // Standard Parallel 1 171 171 switch (proj) { … … 194 194 break; 195 195 } 196 196 197 197 // Azimuth 198 198 if (proj == Hotine_Oblique_Mercator) { … … 217 217 break; 218 218 } 219 219 220 220 // False Easting/Northing 221 221 switch (proj) { … … 250 250 break; 251 251 } 252 252 253 253 // Range 254 254 switch (proj) { … … 261 261 switch (proj) { 262 262 case Lambert_Conformal_Conic: 263 if ((datum == G eodetic_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)) { 264 264 // This sounds good for Lambert 93 or Lambert CC 9 265 265 if (equals(originLat, 46.5) && equals(stdP1, 44.0) && equals(stdP2, 49.0) && equals(falseEasting, 700000.0) && equals(falseNorthing, 6600000.0)) { … … 275 275 break; 276 276 } 277 277 278 278 // TODO: handle cases with Affine declaration 279 279 int index = parseAffineUnits(words); … … 281 281 // handle cases with Bounds declaration 282 282 parseBounds(words, index); 283 283 284 284 if (josmProj == null) { 285 285 Main.info(line); … … 292 292 // handle cases with Affine declaration 293 293 int index = parseAffineUnits(words); 294 294 295 295 units = words[index+1]; 296 296 297 297 parseBounds(words, index+2); 298 298 } 299 299 300 300 private int parseAffineUnits(String[] words) { 301 301 // TODO: handle affine units … … 326 326 case "nonearth": 327 327 parseCoordSysSyntax2(words); 328 328 329 329 // Syntax2 is not meant to be used for maps, and still... # 9592 happened 330 330 // From MapInfo documentation: 331 331 // 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 337 337 if (handler != null && handler.getMifHandler() != null && handler.getMifHandler().getCoordSysNonEarthProjection() != null) { 338 338 josmProj = handler.getMifHandler().getCoordSysNonEarthProjection(); … … 367 367 } 368 368 } 369 369 370 370 private void parsePoint(String[] words) throws IOException { 371 371 readAttributes(createNode(words[1], words[2])); … … 379 379 line.addNode(createNode(words[3], words[4])); 380 380 } 381 381 382 382 private void startPolyLineSegment(boolean initial) throws IOException { 383 383 Way previousPolyline = polyline; … … 392 392 state = State.READING_POINTS; 393 393 } 394 394 395 395 private void parsePLine(String[] words) throws IOException { 396 396 numsections = 1; … … 463 463 midReader = getDataReader(file, ".mid", charset); 464 464 } 465 465 466 466 private DataSet parse(InputStream in, File file, ProgressMonitor instance, Charset cs) throws IOException { 467 467 try { … … 513 513 } 514 514 state = State.READING_POINTS; 515 515 516 516 } else if (state == State.START_POLYLINE_SEGMENT) { 517 517 numpts = Integer.parseInt(words[0]); 518 518 startPolyLineSegment(polyline != null); 519 519 520 520 } else if (state == State.READING_POINTS && numpts > 0) { 521 521 if (josmProj != null) { … … 587 587 } 588 588 } 589 589 590 590 protected void readAttributes(OsmPrimitive p) throws IOException { 591 if (midReader != null) { 591 if (midReader != null) { 592 592 String midLine = midReader.readLine(); 593 593 if (midLine != null) { … … 608 608 } 609 609 } 610 610 611 611 protected final Node createNode(String x, String y) { 612 612 Node node = new Node(josmProj.eastNorth2latlon(new EastNorth(Double.parseDouble(x), Double.parseDouble(y)))); … … 614 614 return node; 615 615 } 616 616 617 617 /** Compare two doubles within a default epsilon */ 618 618 public static boolean equals(Double a, Double b) {
Note:
See TracChangeset
for help on using the changeset viewer.