├── ArcShapeFile Library Documentation.chm ├── ArcShapeFile Library Documentation.chw ├── ArcShapeFile Library Documentation.msha ├── ArcShapeFile Library Documentation.mshc ├── ArcShapeFile.csproj ├── ArcShapeFile.snk ├── ESRIGeo.txt ├── ESRIProj.txt ├── Field.cs ├── Fields.cs ├── Globals.cs ├── HelpContentSetup.msha ├── IField.cs ├── IShapeFile.cs ├── IVertice.cs ├── LICENSE ├── Part.cs ├── Parts.cs ├── Projection.cs ├── README.md ├── ShapeFile.cs ├── ShapeOCX.ico ├── Vertice.cs ├── Vertices.cs ├── WKTProjectionInfo.xls ├── WKTReader.cs └── bin └── Release ├── ArcShapeFile.XML ├── ArcShapeFile.dll ├── ArcShapeFile.pdb └── ArcShapeFile.tlb /ArcShapeFile Library Documentation.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosspickard/ArcShapeFile/b885396cd478a917883fd0e67734c618ea8e60d6/ArcShapeFile Library Documentation.chm -------------------------------------------------------------------------------- /ArcShapeFile Library Documentation.chw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosspickard/ArcShapeFile/b885396cd478a917883fd0e67734c618ea8e60d6/ArcShapeFile Library Documentation.chw -------------------------------------------------------------------------------- /ArcShapeFile Library Documentation.msha: -------------------------------------------------------------------------------- 1 |  2 | 3 | The ArcShapeFile Read/Write Library 4 | 5 | 6 |
7 | Vendor Name 8 | en-us 9 | The ArcShapeFile Read/Write Library 10 | The ArcShapeFile Read/Write Library 11 |
12 |
13 |
14 | 15 | ArcShapeFile Library Documentation 16 | ArcShapeFile Library Documentation.mshc 17 |
18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /ArcShapeFile Library Documentation.mshc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosspickard/ArcShapeFile/b885396cd478a917883fd0e67734c618ea8e60d6/ArcShapeFile Library Documentation.mshc -------------------------------------------------------------------------------- /ArcShapeFile.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.50727 7 | 2.0 8 | {D0288422-89CA-4041-A7E4-04B85312DEAB} 9 | Library 10 | Properties 11 | ArcShapeFile 12 | ArcShapeFile 13 | true 14 | ArcShapeFile.snk 15 | ShapeOCX.ico 16 | v4.8 17 | 18 | 19 | 20 | 21 | 2.0 22 | 23 | 24 | 25 | true 26 | full 27 | false 28 | bin\Debug\ 29 | DEBUG;TRACE 30 | prompt 31 | 4 32 | bin\Debug\ArcShapeFile.XML 33 | false 34 | 35 | 36 | pdbonly 37 | true 38 | bin\Release\ 39 | TRACE 40 | prompt 41 | 4 42 | bin\Release\ArcShapeFile.XML 43 | true 44 | false 45 | 46 | 47 | true 48 | bin\x86\Debug\ 49 | DEBUG;TRACE 50 | bin\Debug\ArcShapeFile.XML 51 | full 52 | x86 53 | prompt 54 | false 55 | 56 | 57 | bin\x86\Release\ 58 | TRACE 59 | bin\Release\ArcShapeFile.XML 60 | true 61 | pdbonly 62 | x86 63 | prompt 64 | false 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 105 | 106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /ArcShapeFile.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosspickard/ArcShapeFile/b885396cd478a917883fd0e67734c618ea8e60d6/ArcShapeFile.snk -------------------------------------------------------------------------------- /ESRIGeo.txt: -------------------------------------------------------------------------------- 1 | 4120 Greek GEOGCS["Greek",DATUM["D_Greek",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 2 | 4121 GGRS87 GEOGCS["GGRS87",DATUM["D_GGRS_1987",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 3 | 4122 ATS77 GEOGCS["ATS77",DATUM["D_ATS_1977",SPHEROID["Average_Terrestrial_System_1977",6378135,298.257]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 4 | 4123 KKJ GEOGCS["KKJ",DATUM["D_KKJ",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 5 | 4124 RT90 GEOGCS["RT90",DATUM["D_RT_1990",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 6 | 4125 Samboja GEOGCS["Samboja",DATUM["D_Samboja",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 7 | 4126 LKS94 (ETRS89) GEOGCS["LKS94 (ETRS89)",DATUM["D_Lithuania_1994",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 8 | 4127 Tete GEOGCS["Tete",DATUM["D_Tete",SPHEROID["Clarke_1866",6378206.4,294.9786982138982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 9 | 4128 Madzansua GEOGCS["Madzansua",DATUM["D_Madzansua",SPHEROID["Clarke_1866",6378206.4,294.9786982138982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 10 | 4129 Observatario GEOGCS["Observatario",DATUM["D_Observatario",SPHEROID["Clarke_1866",6378206.4,294.9786982138982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 11 | 4130 Moznet GEOGCS["Moznet",DATUM["D_Moznet",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 12 | 4131 Indian 1960 GEOGCS["Indian 1960",DATUM["D_Indian_1960",SPHEROID["Everest_1830_1937_Adjustment",6377276.345,300.8017]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 13 | 4132 FD58 GEOGCS["FD58",DATUM["D_FD_1958",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 14 | 4133 EST92 GEOGCS["EST92",DATUM["D_Estonia_1992",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 15 | 4134 PDO Survey Datum 1993 GEOGCS["PDO Survey Datum 1993",DATUM["D_PDO_1993",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 16 | 4135 Old Hawaiian GEOGCS["Old Hawaiian",DATUM["D_Old_Hawaiian",SPHEROID["Clarke_1866",6378206.4,294.9786982138982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 17 | 4136 St. Lawrence Island GEOGCS["St. Lawrence Island",DATUM["D_St_Lawrence_Island",SPHEROID["Clarke_1866",6378206.4,294.9786982138982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 18 | 4137 St. Paul Island GEOGCS["St. Paul Island",DATUM["D_St_Paul_Island",SPHEROID["Clarke_1866",6378206.4,294.9786982138982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 19 | 4138 St. George Island GEOGCS["St. George Island",DATUM["D_St_George_Island",SPHEROID["Clarke_1866",6378206.4,294.9786982138982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 20 | 4139 Puerto Rico GEOGCS["Puerto Rico",DATUM["D_Puerto_Rico",SPHEROID["Clarke_1866",6378206.4,294.9786982138982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 21 | 4140 NAD83(CSRS98) GEOGCS["NAD83(CSRS98)",DATUM["D_North_American_1983_CSRS98",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 22 | 4141 Israel GEOGCS["Israel",DATUM["D_Israel",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 23 | 4142 Locodjo 1965 GEOGCS["Locodjo 1965",DATUM["D_Locodjo_1965",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 24 | 4143 Abidjan 1987 GEOGCS["Abidjan 1987",DATUM["D_Abidjan_1987",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 25 | 4144 Kalianpur 1937 GEOGCS["Kalianpur 1937",DATUM["D_Kalianpur_1937",SPHEROID["Everest_1830_1937_Adjustment",6377276.345,300.8017]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 26 | 4145 Kalianpur 1962 GEOGCS["Kalianpur 1962",DATUM["D_Kalianpur_1962",SPHEROID["Everest_1830_1962_Definition",6377301.243,300.8017255]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 27 | 4146 Kalianpur 1975 GEOGCS["Kalianpur 1975",DATUM["D_Kalianpur_1975",SPHEROID["Everest_1830_1975_Definition",6377299.151,300.8017255]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 28 | 4147 Hanoi 1972 GEOGCS["Hanoi 1972",DATUM["D_Hanoi_1972",SPHEROID["Krassowsky_1940",6378245,298.3]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 29 | 4148 Hartebeesthoek94 GEOGCS["Hartebeesthoek94",DATUM["D_Hartebeesthoek_1994",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 30 | 4149 CH1903 GEOGCS["CH1903",DATUM["D_CH1903",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 31 | 4150 CH1903+ GEOGCS["CH1903+",DATUM["D_CH1903",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 32 | 4151 CHTRF95 GEOGCS["CHTRF95",DATUM["D_Swiss_TRF_1995",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 33 | 4152 NAD83(HARN) GEOGCS["NAD83(HARN)",DATUM["D_North_American_1983_HARN",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 34 | 4153 Rassadiran GEOGCS["Rassadiran",DATUM["D_Rassadiran",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 35 | 4154 ED50(ED77) GEOGCS["ED50(ED77)",DATUM["D_European_1950_ED77",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 36 | 4157 Mount Dillon GEOGCS["Mount Dillon",DATUM["D_Mount_Dillon",SPHEROID["Clarke_1858",6378293.645208759,294.2606763692654]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 37 | 4158 Naparima 1955 GEOGCS["Naparima 1955",DATUM["D_Naparima_1955",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 38 | 4159 ELD79 GEOGCS["ELD79",DATUM["D_European_Libyan_1979",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 39 | 4160 Chos Malal 1914 GEOGCS["Chos Malal 1914",DATUM["D_Chos_Malal_1914",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 40 | 4161 Pampa del Castillo GEOGCS["Pampa del Castillo",DATUM["D_Pampa_del_Castillo",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 41 | 4162 Korean 1985 GEOGCS["Korean 1985",DATUM["D_Korean_Datum_1985",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 42 | 4163 Yemen NGN96 GEOGCS["Yemen NGN96",DATUM["D_Yemen_NGN_1996",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 43 | 4164 South Yemen GEOGCS["South Yemen",DATUM["D_South_Yemen",SPHEROID["Krassowsky_1940",6378245,298.3]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 44 | 4166 Korean 1995 GEOGCS["Korean 1995",DATUM["D_Korean_Datum_1995",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 45 | 4167 NZGD2000 GEOGCS["NZGD2000",DATUM["D_NZGD_2000",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 46 | 4168 Accra GEOGCS["Accra",DATUM["D_Accra",SPHEROID["War_Office",6378300,296]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 47 | 4170 SIRGAS GEOGCS["SIRGAS",DATUM["D_SIRGAS",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 48 | 4171 RGF93 GEOGCS["RGF93",DATUM["D_RGF_1993",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 49 | 4172 POSGAR GEOGCS["POSGAR",DATUM["D_POSGAR",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 50 | 4173 IRENET95 GEOGCS["IRENET95",DATUM["D_IRENET95",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 51 | 4174 Sierra Leone 1924 GEOGCS["Sierra Leone 1924",DATUM["D_Sierra_Leone_1924",SPHEROID["War_Office",6378300,296]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 52 | 4175 Sierra Leone 1968 GEOGCS["Sierra Leone 1968",DATUM["D_Sierra_Leone_1968",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 53 | 4176 Australian Antarctic GEOGCS["Australian Antarctic",DATUM["D_Australian_Antarctic_1998",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 54 | 4178 Pulkovo 1942(83) GEOGCS["Pulkovo 1942(83)",DATUM["D_Pulkovo_1942_Adj_1983",SPHEROID["Krassowsky_1940",6378245,298.3]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 55 | 4179 Pulkovo 1942(58) GEOGCS["Pulkovo 1942(58)",DATUM["D_Pulkovo_1942_Adj_1958",SPHEROID["Krassowsky_1940",6378245,298.3]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 56 | 4180 EST97 GEOGCS["EST97",DATUM["D_Estonia_1997",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 57 | 4181 Luxembourg 1930 GEOGCS["Luxembourg 1930",DATUM["D_Luxembourg_1930",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 58 | 4182 Azores Occidental 1939 GEOGCS["Azores Occidental 1939",DATUM["D_Azores_Occidental_Islands_1939",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 59 | 4183 Azores Central 1948 GEOGCS["Azores Central 1948",DATUM["D_Azores_Central_Islands_1948",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 60 | 4184 Azores Oriental 1940 GEOGCS["Azores Oriental 1940",DATUM["D_Azores_Oriental_Islands_1940",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 61 | 4185 Madeira 1936 GEOGCS["Madeira 1936",DATUM["D_Madeira_1936",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 62 | 4188 OSNI 1952 GEOGCS["OSNI 1952",DATUM["D_OSNI_1952",SPHEROID["Airy_1830",6377563.396,299.3249646]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 63 | 4189 REGVEN GEOGCS["REGVEN",DATUM["D_REGVEN",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 64 | 4190 POSGAR 98 GEOGCS["POSGAR 98",DATUM["D_POSGAR_1998",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 65 | 4191 Albanian 1987 GEOGCS["Albanian 1987",DATUM["D_Albanian_1987",SPHEROID["Krassowsky_1940",6378245,298.3]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 66 | 4192 Douala 1948 GEOGCS["Douala 1948",DATUM["D_Douala_1948",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 67 | 4193 Manoca 1962 GEOGCS["Manoca 1962",DATUM["D_Manoca_1962",SPHEROID["Clarke_1880_IGN",6378249.2,293.4660212936269]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 68 | 4194 Qornoq 1927 GEOGCS["Qornoq 1927",DATUM["D_Qornoq_1927",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 69 | 4195 Scoresbysund 1952 GEOGCS["Scoresbysund 1952",DATUM["D_Scoresbysund_1952",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 70 | 4196 Ammassalik 1958 GEOGCS["Ammassalik 1958",DATUM["D_Ammassalik_1958",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 71 | 4198 Kousseri GEOGCS["Kousseri",DATUM["D_Kousseri",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 72 | 4199 Egypt 1930 GEOGCS["Egypt 1930",DATUM["D_Egypt_1930",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 73 | 4200 Pulkovo 1995 GEOGCS["Pulkovo 1995",DATUM["D_Pulkovo_1995",SPHEROID["Krassowsky_1940",6378245,298.3]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 74 | 4201 Adindan GEOGCS["Adindan",DATUM["D_Adindan",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 75 | 4202 AGD66 GEOGCS["AGD66",DATUM["D_Australian_1966",SPHEROID["Australian_National_Spheroid",6378160,298.25]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 76 | 4203 AGD84 GEOGCS["AGD84",DATUM["D_Australian_1984",SPHEROID["Australian_National_Spheroid",6378160,298.25]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 77 | 4204 Ain el Abd GEOGCS["Ain el Abd",DATUM["D_Ain_el_Abd_1970",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 78 | 4205 Afgooye GEOGCS["Afgooye",DATUM["D_Afgooye",SPHEROID["Krassowsky_1940",6378245,298.3]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 79 | 4206 Agadez GEOGCS["Agadez",DATUM["D_Agadez",SPHEROID["Clarke_1880_IGN",6378249.2,293.4660212936269]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 80 | 4207 Lisbon GEOGCS["Lisbon",DATUM["D_Lisbon",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 81 | 4208 Aratu GEOGCS["Aratu",DATUM["D_Aratu",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 82 | 4209 Arc 1950 GEOGCS["Arc 1950",DATUM["D_Arc_1950",SPHEROID["Clarke_1880_Arc",6378249.145,293.4663077]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 83 | 4210 Arc 1960 GEOGCS["Arc 1960",DATUM["D_Arc_1960",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 84 | 4211 Batavia GEOGCS["Batavia",DATUM["D_Batavia",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 85 | 4212 Barbados 1938 GEOGCS["Barbados 1938",DATUM["D_Barbados_1938",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 86 | 4213 Beduaram GEOGCS["Beduaram",DATUM["D_Beduaram",SPHEROID["Clarke_1880_IGN",6378249.2,293.4660212936269]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 87 | 4214 Beijing 1954 GEOGCS["Beijing 1954",DATUM["D_Beijing_1954",SPHEROID["Krassowsky_1940",6378245,298.3]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 88 | 4215 Belge 1950 GEOGCS["Belge 1950",DATUM["D_Belge_1950",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 89 | 4216 Bermuda 1957 GEOGCS["Bermuda 1957",DATUM["D_Bermuda_1957",SPHEROID["Clarke_1866",6378206.4,294.9786982138982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 90 | 4218 Bogota 1975 GEOGCS["Bogota 1975",DATUM["D_Bogota",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 91 | 4219 Bukit Rimpah GEOGCS["Bukit Rimpah",DATUM["D_Bukit_Rimpah",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 92 | 4220 Camacupa GEOGCS["Camacupa",DATUM["D_Camacupa",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 93 | 4221 Campo Inchauspe GEOGCS["Campo Inchauspe",DATUM["D_Campo_Inchauspe",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 94 | 4222 Cape GEOGCS["Cape",DATUM["D_Cape",SPHEROID["Clarke_1880_Arc",6378249.145,293.4663077]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 95 | 4223 Carthage GEOGCS["Carthage",DATUM["D_Carthage",SPHEROID["Clarke_1880_IGN",6378249.2,293.4660212936269]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 96 | 4224 Chua GEOGCS["Chua",DATUM["D_Chua",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 97 | 4225 Corrego Alegre GEOGCS["Corrego Alegre",DATUM["D_Corrego_Alegre",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 98 | 4226 Cote d'Ivoire GEOGCS["Cote d'Ivoire",DATUM["D_Cote_d_Ivoire",SPHEROID["Clarke_1880_IGN",6378249.2,293.4660212936269]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 99 | 4227 Deir ez Zor GEOGCS["Deir ez Zor",DATUM["D_Deir_ez_Zor",SPHEROID["Clarke_1880_IGN",6378249.2,293.4660212936269]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 100 | 4228 Douala GEOGCS["Douala",DATUM["D_Douala",SPHEROID["Clarke_1880_IGN",6378249.2,293.4660212936269]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 101 | 4229 Egypt 1907 GEOGCS["Egypt 1907",DATUM["D_Egypt_1907",SPHEROID["Helmert_1906",6378200,298.3]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 102 | 4230 ED50 GEOGCS["ED50",DATUM["D_European_1950",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 103 | 4231 ED87 GEOGCS["ED87",DATUM["D_European_1987",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 104 | 4232 Fahud GEOGCS["Fahud",DATUM["D_Fahud",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 105 | 4233 Gandajika 1970 GEOGCS["Gandajika 1970",DATUM["D_Gandajika_1970",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 106 | 4234 Garoua GEOGCS["Garoua",DATUM["D_",SPHEROID["Clarke_1880_IGN",6378249.2,293.4660212936269]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 107 | 4235 Guyane Francaise GEOGCS["Guyane Francaise",DATUM["D_Guyane_Francaise",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 108 | 4236 Hu Tzu Shan GEOGCS["Hu Tzu Shan",DATUM["D_Hu_Tzu_Shan",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 109 | 4237 HD72 GEOGCS["HD72",DATUM["D_Hungarian_1972",SPHEROID["GRS_1967",6378160,298.247167427]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 110 | 4238 ID74 GEOGCS["ID74",DATUM["D_Indonesian_1974",SPHEROID["Indonesian_National_Spheroid",6378160,298.247]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 111 | 4239 Indian 1954 GEOGCS["Indian 1954",DATUM["D_Indian_1954",SPHEROID["Everest_1830_1937_Adjustment",6377276.345,300.8017]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 112 | 4240 Indian 1975 GEOGCS["Indian 1975",DATUM["D_Indian_1975",SPHEROID["Everest_1830_1937_Adjustment",6377276.345,300.8017]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 113 | 4241 Jamaica 1875 GEOGCS["Jamaica 1875",DATUM["D_Jamaica_1875",SPHEROID["Clarke_1880",6378249.144808011,293.4663076556303]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 114 | 4242 JAD69 GEOGCS["JAD69",DATUM["D_Jamaica_1969",SPHEROID["Clarke_1866",6378206.4,294.9786982138982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 115 | 4243 Kalianpur 1880 GEOGCS["Kalianpur 1880",DATUM["D_Kalianpur_1880",SPHEROID["Everest_1830_Definition",6377299.36559538,300.8017255433612]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 116 | 4244 Kandawala GEOGCS["Kandawala",DATUM["D_Kandawala",SPHEROID["Everest_1830_1937_Adjustment",6377276.345,300.8017]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 117 | 4245 Kertau 1968 GEOGCS["Kertau 1968",DATUM["D_Kertau",SPHEROID["Everest_1830_Modified",6377304.063,300.8017]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 118 | 4246 KOC GEOGCS["KOC",DATUM["D_Kuwait_Oil_Company",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 119 | 4247 La Canoa GEOGCS["La Canoa",DATUM["D_La_Canoa",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 120 | 4248 PSAD56 GEOGCS["PSAD56",DATUM["D_Provisional_S_American_1956",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 121 | 4249 Lake GEOGCS["Lake",DATUM["D_Lake",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 122 | 4250 Leigon GEOGCS["Leigon",DATUM["D_Leigon",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 123 | 4251 Liberia 1964 GEOGCS["Liberia 1964",DATUM["D_Liberia_1964",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 124 | 4252 Lome GEOGCS["Lome",DATUM["D_Lome",SPHEROID["Clarke_1880_IGN",6378249.2,293.4660212936269]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 125 | 4253 Luzon 1911 GEOGCS["Luzon 1911",DATUM["D_Luzon_1911",SPHEROID["Clarke_1866",6378206.4,294.9786982138982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 126 | 4254 Hito XVIII 1963 GEOGCS["Hito XVIII 1963",DATUM["D_Hito_XVIII_1963",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 127 | 4255 Herat North GEOGCS["Herat North",DATUM["D_Herat_North",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 128 | 4256 Mahe 1971 GEOGCS["Mahe 1971",DATUM["D_Mahe_1971",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 129 | 4257 Makassar GEOGCS["Makassar",DATUM["D_Makassar",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 130 | 4258 ETRS89 GEOGCS["ETRS89",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 131 | 4259 Malongo 1987 GEOGCS["Malongo 1987",DATUM["D_Malongo_1987",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 132 | 4260 Manoca GEOGCS["Manoca",DATUM["D_Manoca",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 133 | 4261 Merchich GEOGCS["Merchich",DATUM["D_Merchich",SPHEROID["Clarke_1880_IGN",6378249.2,293.4660212936269]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 134 | 4262 Massawa GEOGCS["Massawa",DATUM["D_Massawa",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 135 | 4263 Minna GEOGCS["Minna",DATUM["D_Minna",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 136 | 4264 Mhast GEOGCS["Mhast",DATUM["D_Mhast",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 137 | 4265 Monte Mario GEOGCS["Monte Mario",DATUM["D_Monte_Mario",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 138 | 4266 M'poraloko GEOGCS["M'poraloko",DATUM["D_Mporaloko",SPHEROID["Clarke_1880_IGN",6378249.2,293.4660212936269]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 139 | 4267 GCS North American 1927 GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982138982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 140 | 4268 NAD27 Michigan GEOGCS["NAD27 Michigan",DATUM["D_North_American_Michigan",SPHEROID["Clarke_1866_Michigan",6378450.047548896,294.9786971646747]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 141 | 4269 GCS North American 1983 GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 142 | 4270 Nahrwan 1967 GEOGCS["Nahrwan 1967",DATUM["D_Nahrwan_1967",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 143 | 4271 Naparima 1972 GEOGCS["Naparima 1972",DATUM["D_Naparima_1972",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 144 | 4272 NZGD49 GEOGCS["NZGD49",DATUM["D_New_Zealand_1949",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 145 | 4273 NGO 1948 GEOGCS["NGO 1948",DATUM["D_NGO_1948",SPHEROID["Bessel_Modified",6377492.018,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 146 | 4274 Datum 73 GEOGCS["Datum 73",DATUM["D_Datum_73",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 147 | 4275 NTF GEOGCS["NTF",DATUM["D_NTF",SPHEROID["Clarke_1880_IGN",6378249.2,293.4660212936269]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 148 | 4276 NSWC 9Z-2 GEOGCS["NSWC 9Z-2",DATUM["D_NSWC_9Z_2",SPHEROID["NWL_9D",6378145,298.25]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 149 | 4277 OSGB 1936 GEOGCS["OSGB 1936",DATUM["D_OSGB_1936",SPHEROID["Airy_1830",6377563.396,299.3249646]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 150 | 4278 OSGB70 GEOGCS["OSGB70",DATUM["D_OSGB_1970_SN",SPHEROID["Airy_1830",6377563.396,299.3249646]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 151 | 4279 OS(SN)80 GEOGCS["OS(SN)80",DATUM["D_OS_SN_1980",SPHEROID["Airy_1830",6377563.396,299.3249646]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 152 | 4280 Padang GEOGCS["Padang",DATUM["D_Padang_1884",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 153 | 4281 Palestine 1923 GEOGCS["Palestine 1923",DATUM["D_Palestine_1923",SPHEROID["Clarke_1880_Benoit",6378300.789,293.4663155389811]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 154 | 4282 Pointe Noire GEOGCS["Pointe Noire",DATUM["D_Pointe_Noire",SPHEROID["Clarke_1880_IGN",6378249.2,293.4660212936269]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 155 | 4283 GDA94 GEOGCS["GDA94",DATUM["D_GDA_1994",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 156 | 4284 Pulkovo 1942 GEOGCS["Pulkovo 1942",DATUM["D_Pulkovo_1942",SPHEROID["Krassowsky_1940",6378245,298.3]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 157 | 4285 Qatar 1974 GEOGCS["Qatar 1974",DATUM["D_Qatar",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 158 | 4286 Qatar 1948 GEOGCS["Qatar 1948",DATUM["D_Qatar_1948",SPHEROID["Helmert_1906",6378200,298.3]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 159 | 4287 Qornoq GEOGCS["Qornoq",DATUM["D_Qornoq",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 160 | 4288 Loma Quintana GEOGCS["Loma Quintana",DATUM["D_Loma_Quintana",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 161 | 4289 Amersfoort GEOGCS["Amersfoort",DATUM["D_Amersfoort",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 162 | 4291 SAD69 GEOGCS["SAD69",DATUM["D_South_American_1969",SPHEROID["GRS_1967",6378160,298.247167427]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 163 | 4292 Sapper Hill 1943 GEOGCS["Sapper Hill 1943",DATUM["D_Sapper_Hill_1943",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 164 | 4293 Schwarzeck GEOGCS["Schwarzeck",DATUM["D_Schwarzeck",SPHEROID["Bessel_Namibia_GLM",6377483.865280419,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 165 | 4294 Segora GEOGCS["Segora",DATUM["D_Segora",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 166 | 4295 Serindung GEOGCS["Serindung",DATUM["D_Serindung",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 167 | 4296 Sudan GEOGCS["Sudan",DATUM["D_Sudan",SPHEROID["Clarke_1880_IGN",6378249.2,293.4660212936269]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 168 | 4297 Tananarive GEOGCS["Tananarive",DATUM["D_Tananarive_1925",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 169 | 4298 Timbalai 1948 GEOGCS["Timbalai 1948",DATUM["D_Timbalai_1948",SPHEROID["Everest_1830_1967_Definition",6377298.556,300.8017]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 170 | 4299 TM65 GEOGCS["TM65",DATUM["D_TM65",SPHEROID["Airy_Modified_1849",6377340.189,299.3249646]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 171 | 4300 TM75 GEOGCS["TM75",DATUM["D_TM75",SPHEROID["Airy_Modified_1849",6377340.189,299.3249646]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 172 | 4301 Tokyo GEOGCS["Tokyo",DATUM["D_Tokyo",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 173 | 4302 Trinidad 1903 GEOGCS["Trinidad 1903",DATUM["D_Trinidad_1903",SPHEROID["Clarke_1858",6378293.645208759,294.2606763692654]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 174 | 4303 TC(1948) GEOGCS["TC(1948)",DATUM["D_Trucial_Coast_1948",SPHEROID["Helmert_1906",6378200,298.3]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 175 | 4304 Voirol 1875 GEOGCS["Voirol 1875",DATUM["D_Voirol_1875",SPHEROID["Clarke_1880_IGN",6378249.2,293.4660212936269]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 176 | 4306 Bern 1938 GEOGCS["Bern 1938",DATUM["D_Bern_1938",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 177 | 4307 Nord Sahara 1959 GEOGCS["Nord Sahara 1959",DATUM["D_Nord_Sahara_1959",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 178 | 4308 RT38 GEOGCS["RT38",DATUM["D_Stockholm_1938",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 179 | 4309 Yacare GEOGCS["Yacare",DATUM["D_Yacare",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 180 | 4310 Yoff GEOGCS["Yoff",DATUM["D_Yoff",SPHEROID["Clarke_1880_IGN",6378249.2,293.4660212936269]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 181 | 4311 Zanderij GEOGCS["Zanderij",DATUM["D_Zanderij",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 182 | 4312 MGI GEOGCS["MGI",DATUM["D_MGI",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 183 | 4313 Belge 1972 GEOGCS["Belge 1972",DATUM["D_Belge_1972",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 184 | 4314 DHDN GEOGCS["DHDN",DATUM["D_Deutsches_Hauptdreiecksnetz",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 185 | 4315 Conakry 1905 GEOGCS["Conakry 1905",DATUM["D_Conakry_1905",SPHEROID["Clarke_1880_IGN",6378249.2,293.4660212936269]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 186 | 4316 Dealul Piscului 1933 GEOGCS["Dealul Piscului 1933",DATUM["D_Dealul_Piscului_1933",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 187 | 4317 Dealul Piscului 1970 GEOGCS["Dealul Piscului 1970",DATUM["D_Dealul_Piscului_1970",SPHEROID["Krassowsky_1940",6378245,298.3]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 188 | 4318 NGN GEOGCS["NGN",DATUM["D_NGN",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 189 | 4319 KUDAMS GEOGCS["KUDAMS",DATUM["D_Kuwait_Utility",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 190 | 4322 WGS 72 GEOGCS["WGS 72",DATUM["D_WGS_1972",SPHEROID["WGS_1972",6378135,298.26]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 191 | 4324 WGS 72BE GEOGCS["WGS 72BE",DATUM["D_WGS_1972_BE",SPHEROID["WGS_1972",6378135,298.26]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 192 | 4326 GCS WGS 1984 GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 193 | 4600 Anguilla 1957 GEOGCS["Anguilla 1957",DATUM["D_Anguilla_1957",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 194 | 4601 Antigua 1943 GEOGCS["Antigua 1943",DATUM["D_Antigua_1943",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 195 | 4602 Dominica 1945 GEOGCS["Dominica 1945",DATUM["D_Dominica_1945",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 196 | 4603 Grenada 1953 GEOGCS["Grenada 1953",DATUM["D_Grenada_1953",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 197 | 4605 St. Kitts 1955 GEOGCS["St. Kitts 1955",DATUM["D_St_Kitts_1955",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 198 | 4606 St. Lucia 1955 GEOGCS["St. Lucia 1955",DATUM["D_St_Lucia_1955",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 199 | 4607 St. Vincent 1945 GEOGCS["St. Vincent 1945",DATUM["D_St_Vincent_1945",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 200 | 4608 NAD27(76) GEOGCS["NAD27(76)",DATUM["D_NAD_1927_Definition_1976",SPHEROID["Clarke_1866",6378206.4,294.9786982138982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 201 | 4609 NAD27(CGQ77) GEOGCS["NAD27(CGQ77)",DATUM["D_NAD_1927_CGQ77",SPHEROID["Clarke_1866",6378206.4,294.9786982138982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 202 | 4610 Xian 1980 GEOGCS["Xian 1980",DATUM["D_Xian_1980",SPHEROID["Xian_1980",6378140,298.257]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 203 | 4611 Hong Kong 1980 GEOGCS["Hong Kong 1980",DATUM["D_Hong_Kong_1980",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 204 | 4612 JGD2000 GEOGCS["JGD2000",DATUM["D_JGD_2000",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 205 | 4613 Segara GEOGCS["Segara",DATUM["D_Gunung_Segara",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 206 | 4614 QND95 GEOGCS["QND95",DATUM["D_QND_1995",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 207 | 4615 Porto Santo GEOGCS["Porto Santo",DATUM["D_Porto_Santo_1936",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 208 | 4619 SWEREF99 GEOGCS["SWEREF99",DATUM["D_SWEREF99",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 209 | 4620 Point 58 GEOGCS["Point 58",DATUM["D_Point_58",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 210 | 4621 Fort Marigot GEOGCS["Fort Marigot",DATUM["D_Fort_Marigot",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 211 | 4622 Guadeloupe 1948 GEOGCS["Guadeloupe 1948",DATUM["D_Sainte_Anne",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 212 | 4623 CSG67 GEOGCS["CSG67",DATUM["D_CSG_1967",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 213 | 4624 RGFG95 GEOGCS["RGFG95",DATUM["D_RGFG_1995",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 214 | 4625 Martinique 1938 GEOGCS["Martinique 1938",DATUM["D_Fort_Desaix",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 215 | 4626 Reunion 1947 GEOGCS["Reunion 1947",DATUM["D_Reunion_1947",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 216 | 4627 RGR92 GEOGCS["RGR92",DATUM["D_RGR_1992",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 217 | 4628 Tahiti 52 GEOGCS["Tahiti 52",DATUM["D_Tahiti_1952",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 218 | 4629 Tahaa 54 GEOGCS["Tahaa 54",DATUM["D_Tahaa_1954",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 219 | 4630 IGN72 Nuku Hiva GEOGCS["IGN72 Nuku Hiva",DATUM["D_IGN72_Nuku_Hiva",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 220 | 4631 K0 1949 GEOGCS["K0 1949",DATUM["D_K0_1949",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 221 | 4632 Combani 1950 GEOGCS["Combani 1950",DATUM["D_Combani_1950",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 222 | 4633 IGN56 Lifou GEOGCS["IGN56 Lifou",DATUM["D_IGN56_Lifou",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 223 | 4635 ST87 Ouvea GEOGCS["ST87 Ouvea",DATUM["D_ST87_Ouvea",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 224 | 4636 Petrels 1972 GEOGCS["Petrels 1972",DATUM["D_Petrels_1972",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 225 | 4637 Perroud 1950 GEOGCS["Perroud 1950",DATUM["D_Pointe_Geologie_Perroud_1950",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 226 | 4638 Saint Pierre et Miquelon 1950 GEOGCS["Saint Pierre et Miquelon 1950",DATUM["D_Saint_Pierre_et_Miquelon_1950",SPHEROID["Clarke_1866",6378206.4,294.9786982138982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 227 | 4639 MOP78 GEOGCS["MOP78",DATUM["D_MOP78",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 228 | 4640 RRAF 1991 GEOGCS["RRAF 1991",DATUM["D_RRAF_1991",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 229 | 4641 IGN53 Mare GEOGCS["IGN53 Mare",DATUM["D_IGN53_Mare",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 230 | 4642 ST84 Ile des Pins GEOGCS["ST84 Ile des Pins",DATUM["D_ST84_Ile_des_Pins",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 231 | 4643 ST71 Belep GEOGCS["ST71 Belep",DATUM["D_ST71_Belep",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 232 | 4644 NEA74 Noumea GEOGCS["NEA74 Noumea",DATUM["D_NEA74_Noumea",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 233 | 4645 RGNC 1991 GEOGCS["RGNC 1991",DATUM["D_RGNC_1991",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 234 | 4646 Grand Comoros GEOGCS["Grand Comoros",DATUM["D_Grand_Comoros",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 235 | 4657 Reykjavik 1900 GEOGCS["Reykjavik 1900",DATUM["D_Reykjavik_1900",SPHEROID["Danish_1876",6377019.27,300]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 236 | 4658 Hjorsey 1955 GEOGCS["Hjorsey 1955",DATUM["D_Hjorsey_1955",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 237 | 4659 ISN93 GEOGCS["ISN93",DATUM["D_Islands_Network_1993",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 238 | 4660 Helle 1954 GEOGCS["Helle 1954",DATUM["D_Helle_1954",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 239 | 4661 LKS92 GEOGCS["LKS92",DATUM["D_Latvia_1992",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 240 | 4662 IGN72 Grande Terre GEOGCS["IGN72 Grande Terre",DATUM["D_IGN72_Grande_Terre",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 241 | 4663 Porto Santo 1995 GEOGCS["Porto Santo 1995",DATUM["D_Porto_Santo_1995",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 242 | 4664 Azores Oriental 1995 GEOGCS["Azores Oriental 1995",DATUM["D_Azores_Oriental_Islands_1995",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 243 | 4665 Azores Central 1995 GEOGCS["Azores Central 1995",DATUM["D_Azores_Central_Islands_1995",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 244 | 4666 Lisbon 1890 GEOGCS["Lisbon 1890",DATUM["D_Lisbon_1890",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 245 | 4667 IKBD-92 GEOGCS["IKBD-92",DATUM["D_Iraq_Kuwait_Boundary_1992",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 246 | 4668 ED79 GEOGCS["ED79",DATUM["D_European_1979",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 247 | 4670 IGM95 GEOGCS["IGM95",DATUM["D_IGM_1995",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 248 | 4801 Bern 1898 (Bern) GEOGCS["Bern 1898 (Bern)",DATUM["D_Bern_1898",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Bern",7.439583333333333],UNIT["Degree",0.017453292519943295]] 249 | 4802 Bogota 1975 (Bogota) GEOGCS["Bogota 1975 (Bogota)",DATUM["D_Bogota",SPHEROID["International_1924",6378388,297]],PRIMEM["Bogota",-74.08091666666667],UNIT["Degree",0.017453292519943295]] 250 | 4803 Lisbon (Lisbon) GEOGCS["Lisbon (Lisbon)",DATUM["D_Lisbon",SPHEROID["International_1924",6378388,297]],PRIMEM["Lisbon",-9.131906111111112],UNIT["Degree",0.017453292519943295]] 251 | 4804 Makassar (Jakarta) GEOGCS["Makassar (Jakarta)",DATUM["D_Makassar",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Jakarta",106.8077194444444],UNIT["Degree",0.017453292519943295]] 252 | 4805 MGI (Ferro) GEOGCS["MGI (Ferro)",DATUM["D_MGI",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Ferro",-17.66666666666667],UNIT["Degree",0.017453292519943295]] 253 | 4806 Monte Mario (Rome) GEOGCS["Monte Mario (Rome)",DATUM["D_Monte_Mario",SPHEROID["International_1924",6378388,297]],PRIMEM["Rome",12.45233333333333],UNIT["Degree",0.017453292519943295]] 254 | 4807 NTF (Paris) GEOGCS["NTF (Paris)",DATUM["D_NTF",SPHEROID["Clarke_1880_IGN",6378249.2,293.4660212936269]],PRIMEM["Paris",2.33722917],UNIT["grad",0.01570796326794897]] 255 | 4808 Padang (Jakarta) GEOGCS["Padang (Jakarta)",DATUM["D_Padang_1884",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Jakarta",106.8077194444444],UNIT["Degree",0.017453292519943295]] 256 | 4809 Belge 1950 (Brussels) GEOGCS["Belge 1950 (Brussels)",DATUM["D_Belge_1950",SPHEROID["International_1924",6378388,297]],PRIMEM["Brussels",4.367975],UNIT["Degree",0.017453292519943295]] 257 | 4810 Tananarive (Paris) GEOGCS["Tananarive (Paris)",DATUM["D_Tananarive_1925",SPHEROID["International_1924",6378388,297]],PRIMEM["Paris",2.33722917],UNIT["grad",0.01570796326794897]] 258 | 4811 Voirol 1875 (Paris) GEOGCS["Voirol 1875 (Paris)",DATUM["D_Voirol_1875",SPHEROID["Clarke_1880_IGN",6378249.2,293.4660212936269]],PRIMEM["Paris",2.33722917],UNIT["grad",0.01570796326794897]] 259 | 4813 Batavia (Jakarta) GEOGCS["Batavia (Jakarta)",DATUM["D_Batavia",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Jakarta",106.8077194444444],UNIT["Degree",0.017453292519943295]] 260 | 4814 RT38 (Stockholm) GEOGCS["RT38 (Stockholm)",DATUM["D_Stockholm_1938",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Stockholm",18.05827777777778],UNIT["Degree",0.017453292519943295]] 261 | 4816 Carthage (Paris) GEOGCS["Carthage (Paris)",DATUM["D_Carthage",SPHEROID["Clarke_1880_IGN",6378249.2,293.4660212936269]],PRIMEM["Paris",2.33722917],UNIT["grad",0.01570796326794897]] 262 | 4817 NGO 1948 (Oslo) GEOGCS["NGO 1948 (Oslo)",DATUM["D_NGO_1948",SPHEROID["Bessel_Modified",6377492.018,299.1528128]],PRIMEM["Oslo",10.72291666666667],UNIT["Degree",0.017453292519943295]] 263 | 4819 Nord Sahara 1959 (Paris) GEOGCS["Nord Sahara 1959 (Paris)",DATUM["D_Nord_Sahara_1959",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Paris",2.33722917],UNIT["grad",0.01570796326794897]] 264 | 4820 Segara (Jakarta) GEOGCS["Segara (Jakarta)",DATUM["D_Gunung_Segara",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Jakarta",106.8077194444444],UNIT["Degree",0.017453292519943295]] 265 | 4901 unnamed ellipse GEOGCS["unnamed ellipse",DATUM["D_unknown",SPHEROID["Unknown",6376523,308.6399999999995]],PRIMEM["paris",2.3372291666985],UNIT["Degree",0.017453292519943295]] 266 | 4902 NDG (Paris) GEOGCS["NDG (Paris)",DATUM["D_Nord_de_Guerre",SPHEROID["Plessis_1817",6376523,308.64]],PRIMEM["Paris",2.33722917],UNIT["grad",0.01570796326794897]] 267 | 4903 Madrid 1870 (Madrid) GEOGCS["Madrid 1870 (Madrid)",DATUM["D_Madrid_1870",SPHEROID["Struve_1860",6378298.3,294.73]],PRIMEM["Madrid",-3.687938888888889],UNIT["Degree",0.017453292519943295]] 268 | 4904 Lisbon 1890 (Lisbon) GEOGCS["Lisbon 1890 (Lisbon)",DATUM["D_Lisbon_1890",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Lisbon",-9.131906111111112],UNIT["Degree",0.017453292519943295]] 269 | 7844 GDA2020 GEOGCS["GDA2020",DATUM["GDA2020",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] 270 | 37202 GCS Everest Bangladesh GEOGCS["GCS_Everest_Bangladesh",DATUM["D_Everest_Bangladesh",SPHEROID["Everest_Adjustment_1937",6377276.345,300.8017]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 271 | 37203 GCS Everest India Nepal GEOGCS["GCS_Everest_India_Nepal",DATUM["D_Everest_India_Nepal",SPHEROID["Everest_Definition_1962",6377301.243,300.8017255]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 272 | 37205 GCS Hong Kong 1963 GEOGCS["GCS_Hong_Kong_1963",DATUM["D_Hong_Kong_1963",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 273 | 37206 GCS Oman GEOGCS["GCS_Oman",DATUM["D_Oman",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 274 | 37207 GCS South Asia Singapore GEOGCS["GCS_South_Asia_Singapore",DATUM["D_South_Asia_Singapore",SPHEROID["Fischer_Modified",6378155,298.3]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 275 | 37208 GCS Ayabelle GEOGCS["GCS_Ayabelle",DATUM["D_Ayabelle",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 276 | 37212 GCS Beacon E 1945 GEOGCS["GCS_Beacon_E_1945",DATUM["D_Beacon_E_1945",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 277 | 37213 GCS Tern Island 1961 GEOGCS["GCS_Tern_Island_1961",DATUM["D_Tern_Island_1961",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 278 | 37214 GCS Astro 1952 GEOGCS["GCS_Astro_1952",DATUM["D_Astro_1952",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 279 | 37215 GCS Bellevue IGN GEOGCS["GCS_Bellevue_IGN",DATUM["D_Bellevue_IGN",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 280 | 37216 GCS Canton 1966 GEOGCS["GCS_Canton_1966",DATUM["D_Canton_1966",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 281 | 37217 GCS Chatham Island 1971 GEOGCS["GCS_Chatham_Island_1971",DATUM["D_Chatham_Island_1971",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 282 | 37218 GCS DOS 1968 GEOGCS["GCS_DOS_1968",DATUM["D_DOS_1968",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 283 | 37219 GCS Easter Island 1967 GEOGCS["GCS_Easter_Island_1967",DATUM["D_Easter_Island_1967",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 284 | 37220 GCS Guam 1963 GEOGCS["GCS_Guam_1963",DATUM["D_Guam_1963",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 285 | 37221 GCS GUX 1 GEOGCS["GCS_GUX_1",DATUM["D_GUX_1",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 286 | 37222 GCS Johnston Island 1961 GEOGCS["GCS_Johnston_Island_1961",DATUM["D_Johnston_Island_1961",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 287 | 37223 GCS Carthage Degree GEOGCS["GCS_Carthage_Degree",DATUM["D_Carthage",SPHEROID["Clarke_1880_IGN",6378249.2,293.46602]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 288 | 37224 GCS Midway 1961 GEOGCS["GCS_Midway_1961",DATUM["D_Midway_1961",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 289 | 37226 GCS Pitcairn 1967 GEOGCS["GCS_Pitcairn_1967",DATUM["D_Pitcairn_1967",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 290 | 37227 GCS Santo DOS 1965 GEOGCS["GCS_Santo_DOS_1965",DATUM["D_Santo_DOS_1965",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 291 | 37228 GCS Viti Levu 1916 GEOGCS["GCS_Viti_Levu_1916",DATUM["D_Viti_Levu_1916",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 292 | 37229 GCS Wake Eniwetok 1960 GEOGCS["GCS_Wake_Eniwetok_1960",DATUM["D_Wake_Eniwetok_1960",SPHEROID["Hough_1960",6378270,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 293 | 37230 GCS Wake Island 1952 GEOGCS["GCS_Wake_Island_1952",DATUM["D_Wake_Island_1952",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 294 | 37231 GCS Anna 1 1965 GEOGCS["GCS_Anna_1_1965",DATUM["D_Anna_1_1965",SPHEROID["Australian",6378160,298.25]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 295 | 37232 GCS Gan 1970 GEOGCS["GCS_Gan_1970",DATUM["D_Gan_1970",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 296 | 37233 GCS ISTS 073 1969 GEOGCS["GCS_ISTS_073_1969",DATUM["D_ISTS_073_1969",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 297 | 37234 GCS Kerguelen Island 1949 GEOGCS["GCS_Kerguelen_Island_1949",DATUM["D_Kerguelen_Island_1949",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 298 | 37235 GCS Reunion GEOGCS["GCS_Reunion",DATUM["D_Reunion",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 299 | 37237 GCS Ascension Island 1958 GEOGCS["GCS_Ascension_Island_1958",DATUM["D_Ascension_Island_1958",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 300 | 37238 GCS DOS 71 4 GEOGCS["GCS_DOS_71_4",DATUM["D_DOS_71_4",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 301 | 37239 GCS Cape Canaveral GEOGCS["GCS_Cape_Canaveral",DATUM["D_Cape_Canaveral",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 302 | 37240 GCS Fort Thomas 1955 GEOGCS["GCS_Fort_Thomas_1955",DATUM["D_Fort_Thomas_1955",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 303 | 37241 GCS Graciosa Base SW 1948 GEOGCS["GCS_Graciosa_Base_SW_1948",DATUM["D_Graciosa_Base_SW_1948",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 304 | 37242 GCS ISTS 061 1968 GEOGCS["GCS_ISTS_061_1968",DATUM["D_ISTS_061_1968",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 305 | 37243 GCS LC5 1961 GEOGCS["GCS_LC5_1961",DATUM["D_LC5_1961",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 306 | 37245 GCS Observ Meteorologico 1939 GEOGCS["GCS_Observ_Meteorologico_1939",DATUM["D_Observ_Meteorologico_1939",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 307 | 37246 GCS Pico de Las Nieves GEOGCS["GCS_Pico_de_Las_Nieves",DATUM["D_Pico_de_Las_Nieves",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 308 | 37249 GCS Sao Braz GEOGCS["GCS_Sao_Braz",DATUM["D_Sao_Braz",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 309 | 37250 GCS Selvagem Grande 1938 GEOGCS["GCS_Selvagem_Grande_1938",DATUM["D_Selvagem_Grande_1938",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 310 | 37251 GCS Tristan 1968 GEOGCS["GCS_Tristan_1968",DATUM["D_Tristan_1968",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 311 | 37252 GCS Samoa 1962 GEOGCS["GCS_Samoa_1962",DATUM["D_Samoa_1962",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 312 | 37253 GCS Camp Area GEOGCS["GCS_Camp_Area",DATUM["D_Camp_Area",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 313 | 37254 GCS Deception Island GEOGCS["GCS_Deception_Island",DATUM["D_Deception_Island",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 314 | 37257 GCS S42 Hungary GEOGCS["GCS_S42_Hungary",DATUM["D_S42_Hungary",SPHEROID["Krasovsky_1940",6378245,298.3]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 315 | 37259 GCS Kusaie 1951 GEOGCS["GCS_Kusaie_1951",DATUM["D_Kusaie_1951",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 316 | 37260 GCS Alaskan Islands GEOGCS["GCS_Alaskan_Islands",DATUM["D_Alaskan_Islands",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 317 | 104102 GCS Hermannskogel GEOGCS["GCS_Hermannskogel",DATUM["D_Hermannskogel",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 318 | 104103 GCS Sierra Leone 1960 GEOGCS["GCS_Sierra_Leone_1960",DATUM["D_Sierra_Leone_1960",SPHEROID["Clarke_1880_RGS",6378249.145,293.465]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 319 | 104105 GCS Datum Lisboa Bessel GEOGCS["GCS_Datum_Lisboa_Bessel",DATUM["D_Datum_Lisboa_Bessel",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 320 | 104106 GCS Datum Lisboa Hayford GEOGCS["GCS_Datum_Lisboa_Hayford",DATUM["D_Datum_Lisboa_Hayford",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] 321 | 104261 GCS Merchich Degree GEOGCS["GCS_Merchich_Degree",DATUM["D_Merchich",SPHEROID["Clarke_1880_IGN",6378249.2,293.46602]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /Field.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace ArcShapeFile 7 | { 8 | /// 9 | /// Contains the Database field information and data values. As each Field object is a representation of the database field of the DBF file format there are some restrictions on both field size (maximum of 245 characters for text as memo fields are not supported) and field names (maximum of 10 characters). 10 | /// 11 | [ClassInterface(ClassInterfaceType.AutoDual)] 12 | [Guid("A977E6A5-7C5E-4fdd-859C-B53BE4C60433")] 13 | public class Field : ArcShapeFile.IField 14 | { 15 | #region ********** Field Variables ********** 16 | 17 | private object mvarValue=null; 18 | private string mvarStatus=null; // Status indicators : N=Name Change, T=Type Change, S=Size Change .=DecimalChange, D=Delete 19 | private string mvarFieldName = ""; 20 | private eFieldType mvarFieldType = eFieldType.shpText; 21 | private short mvarFieldSize = 10; 22 | private short mvarFieldDecimal = 0; 23 | private object missing = null; 24 | 25 | #endregion 26 | 27 | #region ********** Field Properties ********** 28 | 29 | ///A string representing the name of the database field 30 | /// 31 | /// Field objects can't share the same name with any object in the same collection. You can test for this by setting the FixFieldNames property to true, otherwise on your own head be it. 32 | /// When creating a new ShapeFile, if a Fields collection has not been defined and initialized using the WriteFieldDefs method then a data file will be created with one Field (SHAPE_ID) when the first WriteShape command is given. The DBF file needs at least one field in it. 33 | /// 34 | public string Name 35 | { 36 | get { return mvarFieldName; } 37 | set { mvarFieldName = value; } 38 | } 39 | 40 | ///A short integer representing the type of the database field 41 | /// 42 | /// This property determines what kind of data the Field object can hold. When creating a new Field object some predefined data types exist, in some cases removing the need to provide the Size and Decimal values. 43 | /// The Type values are described below: 44 | /// 45 | /// 46 | /// Data Type 47 | /// Value 48 | /// Description 49 | /// 50 | /// 51 | /// ShpNumeric 52 | /// 19 53 | /// Generic numeric input, FieldSize and FieldDecimal values must be defined. Converts to System.Double 54 | /// 55 | /// 56 | /// ShpDate 57 | /// 8 58 | /// Date value stored in dBASE as an 8 character value (YYYYMMDD), FieldSize =8, FieldDecimal = 0. Converts to System.DateTime 59 | /// 60 | /// 61 | /// ShpText 62 | /// 10 63 | /// Generic character input, FieldSize will default to 10 unless defined, FieldDecimal defaults to 0. Converts to System.String 64 | /// 65 | /// 66 | /// ShpBoolean 67 | /// 1 68 | /// Logical True/False value FieldSize = 1, FieldDecimal = 0. Converts to System.Boolean 69 | /// 70 | /// 71 | /// ShpDouble 72 | /// 7 73 | /// Double precision numeric, FieldSize = 30, FieldDecimal = 10. Converts to System.Double 74 | /// 75 | /// 76 | /// ShpLong 77 | /// 4 78 | /// Big Integer, FieldSize = 10, FieldDecimal = 0. Converts to System.Int64 79 | /// 80 | /// 81 | /// ShpInteger 82 | /// 3 83 | /// Small Integer, FieldSize = 5, FieldDecimal = 0. Converts to System.Int32 84 | /// 85 | /// 86 | /// ShpSingle 87 | /// 6 88 | /// Single precision numeric, FieldSize = 20, FieldDecimal = 5. Converts to System.Single 89 | /// 90 | /// 91 | /// ShpFloat 92 | /// 20 93 | /// Float numeric, FieldSize = 20, FieldDecimal = 5. Comprises of 16 digit mantissa and 2 digit exponent (e.g. 1.1234567890123456E+04). Converts to System.Double 94 | /// 95 | /// 96 | /// 97 | ///eFieldType ENum 98 | public eFieldType Type 99 | { 100 | get { return mvarFieldType; } 101 | set { mvarFieldType = value; } 102 | } 103 | 104 | ///A short integer representing the length of the database field 105 | ///For Fields with the of shpText (System.String) the value of the Size property cannot exceed 255. This is a limitation of the DBF format. 106 | public short Size { 107 | get { return mvarFieldSize; } 108 | set { mvarFieldSize = value; } 109 | } 110 | 111 | ///A short integer representing the number of digits to the right of the decimal place 112 | /// 113 | /// For fields that contain numeric data, the Decimal property indicates the number of significant digits to the right of the decimal point that the field can hold. This can be set to default values using predefined data types referred to by the property. 114 | /// 115 | public short Decimal 116 | { 117 | get { return mvarFieldDecimal; } 118 | set { mvarFieldDecimal = value; } 119 | } 120 | 121 | ///A object representing the value of the database field 122 | /// 123 | ///The data value in this property will take on the equivalent system data type of the you defined 124 | /// 125 | public object Value 126 | { 127 | get { return mvarValue; } 128 | set { 129 | if (mvarValue == value) { 130 | Globals.mvarFieldChange = false; 131 | } else { 132 | Globals.mvarFieldChange = true; 133 | mvarValue = value; 134 | } 135 | } 136 | } 137 | 138 | /// 139 | /// Reports if the field has been marked for deletion. This will not physically occur until the Pack command is given 140 | /// 141 | /// 142 | /// 143 | /// Pack 144 | public bool IsDeleted 145 | { 146 | get 147 | { 148 | if (mvarStatus.Contains("D")) 149 | { return true; } 150 | else { return false; } 151 | } 152 | } 153 | 154 | 155 | /// Holds the status of the field - has it been modified, deleted, etc. for use with writing modifications 156 | internal string Status { 157 | get { return mvarStatus; } 158 | set { mvarStatus = value; } 159 | } 160 | 161 | #endregion 162 | 163 | #region ********** Field Methods ********** 164 | ///Change the field name and type of a particular field 165 | /// The new Field name of the ShapeFile Database record 166 | /// The new Type of field to be created 167 | /// You can change the details of any field in the Fields collection using this method. One thing to be aware of though is that 168 | /// once you've changed to the details you still have to write them out to the DBF file. This is done with the ModifyShape 169 | /// method. If you don't do this and start writing out ShapeFile records then you will corrupt your database - so use some common sense here. 170 | public void Modify(string Name, eFieldType Type) 171 | { ChangeField(Name, Type, -1, -1); } 172 | ///Change the field name, type and size of a particular field 173 | /// The new Field name of the ShapeFile Database record 174 | /// The new Type of field to be created 175 | /// The new length of the field 176 | /// You can change the details of any field in the Fields collection using this method. One thing to be aware of though is that 177 | /// once you've changed to the details you still have to write them out to the DBF file. This is done with the ModifyShape 178 | /// method. If you don't do this and start writing out ShapeFile records then you will corrupt your database - so use some common sense here. 179 | public void Modify(string Name, eFieldType Type, short Size) 180 | { ChangeField(Name, Type, Size, -1); } 181 | ///Change the field name, type, size and decimal placing of a particular field 182 | /// The new Field name of the ShapeFile Database record 183 | /// The new Type of field to be created 184 | /// The new length of the field 185 | /// The new number of digits to be stored right of the decimal point 186 | /// You can change the details of any field in the Fields collection using this method. One thing to be aware of though is that 187 | /// once you've changed to the details you still have to write them out to the DBF file. This is done with the ModifyShape 188 | /// method. If you don't do this and start writing out ShapeFile records then you will corrupt your database - so use some common sense here. 189 | public void Modify(string Name, eFieldType Type, short Size, short Decimal) 190 | { ChangeField(Name, Type, Size, Decimal); } 191 | ///Change the field name and size of a particular field 192 | /// The new Field name of the ShapeFile Database record 193 | /// The new length of the field 194 | /// You can change the details of any field in the Fields collection using this method. One thing to be aware of though is that 195 | /// once you've changed to the details you still have to write them out to the DBF file. This is done with the ModifyShape 196 | /// method. If you don't do this and start writing out ShapeFile records then you will corrupt your database - so use some common sense here. 197 | public void Modify(string Name, short Size) 198 | { ChangeField(Name, missing, Size, -1); } 199 | ///Change the field name of a particular field 200 | /// The new Field name of the ShapeFile Database record 201 | /// You can change the details of any field in the Fields collection using this method. One thing to be aware of though is that 202 | /// once you've changed to the details you still have to write them out to the DBF file. This is done with the ModifyShape 203 | /// method. If you don't do this and start writing out ShapeFile records then you will corrupt your database - so use some common sense here. 204 | public void Modify(string Name) 205 | { ChangeField(Name, missing, -1 , -1); } 206 | ///Change the field name, size and decimal placing of a particular field 207 | /// The new Field name of the ShapeFile Database record 208 | /// The new length of the field 209 | /// The new number of digits to be stored right of the decimal point 210 | /// You can change the details of any field in the Fields collection using this method. One thing to be aware of though is that 211 | /// once you've changed to the details you still have to write them out to the DBF file. This is done with the ModifyShape 212 | /// method. If you don't do this and start writing out ShapeFile records then you will corrupt your database - so use some common sense here. 213 | public void Modify(string Name, short Size, short Decimal) 214 | { ChangeField(Name, missing, Size, Decimal); } 215 | ///Change the field type, size and decimal placing of a particular field 216 | /// The new Type of field to be created 217 | /// The new length of the field 218 | /// The new number of digits to be stored right of the decimal point 219 | /// You can change the details of any field in the Fields collection using this method. One thing to be aware of though is that 220 | /// once you've changed to the details you still have to write them out to the DBF file. This is done with the ModifyShape 221 | /// method. If you don't do this and start writing out ShapeFile records then you will corrupt your database - so use some common sense here. 222 | public void Modify(eFieldType Type, short Size, short Decimal) 223 | { ChangeField(null, missing, Size, Decimal); } 224 | ///Change the field size and decimal placing of a particular field 225 | /// The new length of the field 226 | /// The new number of digits to be stored right of the decimal point 227 | /// You can change the details of any field in the Fields collection using this method. One thing to be aware of though is that 228 | /// once you've changed to the details you still have to write them out to the DBF file. This is done with the ModifyShape 229 | /// method. If you don't do this and start writing out ShapeFile records then you will corrupt your database - so use some common sense here. 230 | public void Modify(short Size, short Decimal) 231 | { ChangeField(null, missing, Size, Decimal); } 232 | ///Change the field size of a particular field 233 | /// The new length of the field 234 | /// You can change the details of any field in the Fields collection using this method. One thing to be aware of though is that 235 | /// once you've changed to the details you still have to write them out to the DBF file. This is done with the ModifyShape 236 | /// method. If you don't do this and start writing out ShapeFile records then you will corrupt your database - so use some common sense here. 237 | public void Modify(short Size) 238 | { ChangeField(null, missing, Size, -1); } 239 | private void ChangeField(string Name, Object Type, short Size, short Decimal) 240 | { 241 | 242 | short nFieldSize = 0; 243 | short nFieldDecimal = 0; 244 | 245 | // Exit if there is nothing to do 246 | //if ((Type == missing)) 247 | //{ 248 | // if ((Size == -1)) 249 | // { 250 | // if (Decimal == -1) 251 | // { return; } 252 | // } 253 | //} 254 | 255 | // Do nothing to deleted records 256 | if (mvarStatus == "D") 257 | return; 258 | 259 | //Change the FieldName 260 | if ((Name != null) & mvarFieldName != Name.ToUpper()) { 261 | // Set change flag 262 | mvarStatus = mvarStatus + "N"; 263 | mvarFieldName = Name.ToUpper(); 264 | } 265 | 266 | if (Type != missing) 267 | { 268 | // Set change flag 269 | mvarStatus = mvarStatus + "T"; 270 | 271 | if ((Size == -1)) { 272 | nFieldSize = 10; 273 | } else if (Size == 0) { 274 | nFieldSize = 10; 275 | } 276 | 277 | switch ((eFieldType)Type) { 278 | case eFieldType.shpBoolean: 279 | nFieldDecimal = 0; 280 | nFieldSize = 1; 281 | break; 282 | case eFieldType.shpDate: 283 | nFieldDecimal = 0; 284 | nFieldSize = 8; 285 | break; 286 | case eFieldType.shpDouble: 287 | nFieldDecimal = 10; 288 | nFieldSize = 30; 289 | break; 290 | case eFieldType.shpLong: 291 | nFieldDecimal = 0; 292 | nFieldSize = 10; 293 | break; 294 | case eFieldType.shpInteger: 295 | nFieldDecimal = 0; 296 | nFieldSize = 5; 297 | break; 298 | case eFieldType.shpSingle: 299 | nFieldDecimal = 5; 300 | nFieldSize = 20; 301 | break; 302 | case eFieldType.shpText: 303 | nFieldDecimal = 0; 304 | break; 305 | } 306 | 307 | if (nFieldSize != mvarFieldSize) { 308 | mvarStatus = mvarStatus + "S"; 309 | mvarFieldSize = nFieldSize; 310 | } 311 | mvarFieldType = (eFieldType)Type; 312 | 313 | 314 | } 315 | 316 | if ((Size != -1)) { 317 | if (Size != mvarFieldSize) { 318 | mvarStatus += "S"; 319 | mvarFieldSize = Size; 320 | } 321 | } 322 | 323 | if ((Decimal != -1)) 324 | { 325 | if (Decimal != mvarFieldDecimal) 326 | { 327 | mvarStatus += "."; 328 | mvarFieldDecimal = Decimal; 329 | } 330 | } 331 | else 332 | { 333 | mvarFieldDecimal = nFieldDecimal; 334 | } 335 | 336 | } 337 | 338 | /// Marks the field for deletion. This will not physically occur until the Pack command is given. 339 | /// 340 | /// 341 | /// Pack 342 | public void Delete() 343 | { 344 | mvarStatus += "D"; 345 | } 346 | 347 | /// Unmarks the field for deletion. Just in case you've had second thoughts about deleting a Field. 348 | /// 349 | /// 350 | /// Pack 351 | public void UnDelete() 352 | { 353 | mvarStatus = mvarStatus.Replace("D", ""); 354 | } 355 | 356 | 357 | #endregion 358 | } 359 | } 360 | -------------------------------------------------------------------------------- /Fields.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace ArcShapeFile 7 | { 8 | /// 9 | /// The Collection of all Database field information and data values 10 | /// 11 | /// 12 | /// The Fields collection represents a single row from the Shape DBF. It always points to the current record of the ShapeFiles object. 13 | /// You can refer to each Field object within the collection by: 14 | ///
    15 | ///
  • Iteration by using the 0 based ordinal - i.e. for(int i=0;i < shp.Fields.Count; i++) .
  • 16 | ///
  • Iteration by reference - i.e. foreach(Field fd in shp.Fields) .
  • 17 | ///
  • By referencing the item by FieldName - i.e. shp.Fields["myname"] .
  • 18 | ///
19 | ///
20 | [ClassInterface(ClassInterfaceType.AutoDual)] 21 | [Guid("1BBEA337-0B68-418c-B380-BB54B38866B0")] 22 | public class Fields : System.Collections.CollectionBase 23 | { 24 | #region ********** Local Variables ********** 25 | 26 | bool mvarIsDeleted = false; 27 | static bool mvarFixFieldDupls = false; 28 | // Database Variables; 29 | private Int16 dbfHeaderLength; 30 | private Int16 dbfRecordlength; 31 | private eLanguage dbfLanguage; 32 | private string dbfDelimiter = "."; 33 | private int dbfRecordCount; 34 | 35 | internal Int16 HeaderLength 36 | { 37 | get { return dbfHeaderLength; } 38 | set { dbfHeaderLength = value; } 39 | } 40 | internal Int16 Recordlength 41 | { 42 | get { return dbfRecordlength; } 43 | set { dbfRecordlength = value; } 44 | } 45 | internal eLanguage Language 46 | { 47 | get { return (eLanguage)dbfLanguage; } 48 | set { dbfLanguage = value; } 49 | } 50 | internal string Delimiter 51 | { 52 | get{return dbfDelimiter;} 53 | set {dbfDelimiter=value;} 54 | } 55 | internal int RecordCount 56 | { 57 | get { return dbfRecordCount; } 58 | set { dbfRecordCount = value; } 59 | } 60 | 61 | #endregion 62 | 63 | #region ********** Fields Methods ********** 64 | 65 | /// 66 | /// Creates a new ShapeFile Database field by defining the field in detail 67 | /// 68 | /// Field name of the ShapeFile Database record 69 | /// Type of field to be created 70 | /// The length of the field 71 | /// The number of digits to be stored right of the decimal point 72 | /// 73 | /// Use the Add method to append a field definition into the collection. To physically write the definition to the DBF file you must use the 74 | /// WriteFieldDefs method. You can aren't limited to adding field definitions to new shapefiles - you can append them to existing ones too. 75 | /// 76 | public void Add(string Name, eFieldType Type, short Size, short Decimal) 77 | { CreateField(Name, Type, Size, Decimal); } 78 | /// 79 | /// Creates a new ShapeFile Database field using name, type and size 80 | /// 81 | /// Field name of the ShapeFile Database record 82 | /// Type of field to be created 83 | /// The length of the field 84 | /// 85 | /// Use the Add method to append a field definition into the collection. To physically write the definition to the DBF file you must use the 86 | /// WriteFieldDefs method. You can aren't limited to adding field definitions to new shapefiles - you can append them to existing ones too. 87 | /// 88 | public void Add(string Name, eFieldType Type, short Size) 89 | { CreateField(Name, Type, Size, -1); } 90 | /// 91 | /// Creates a new ShapeFile Database field using name and predetermined type 92 | /// 93 | /// Field name of the ShapeFile Database record 94 | /// Type of field to be created 95 | /// 96 | /// Use the Add method to append a field definition into the collection. To physically write the definition to the DBF file you must use the 97 | /// WriteFieldDefs method. You can aren't limited to adding field definitions to new shapefiles - you can append them to existing ones too. 98 | /// 99 | public void Add(string Name, eFieldType Type) 100 | { CreateField(Name, Type, -1, -1); } 101 | /// 102 | /// Creates a new ShapeFile Database field from a field definition 103 | /// 104 | /// The ShapeFile Field definition to be added 105 | /// 106 | /// Use the Add method to append a field definition into the collection. To physically write the definition to the DBF file you must use the 107 | /// WriteFieldDefs method. You can aren't limited to adding field definitions to new shapefiles - you can append them to existing ones too. 108 | /// 109 | public void Add(Field thisField) 110 | { CreateField(thisField.Name, thisField.Type, thisField.Size, thisField.Decimal); } 111 | 112 | private void CreateField(string Name, eFieldType Type, short Size, short Decimal) 113 | { 114 | //Check existance of Field Name 115 | if (Name.Length>10){Name=Name.Substring(0,10);} 116 | 117 | foreach(Field testField in List) 118 | { 119 | if(testField.Name==Name.ToUpper() & testField.Name!="SHAPE_ID") 120 | { 121 | if (mvarFixFieldDupls == false) { throw new System.ArgumentException("A Field already exists with this name", Name); } 122 | else 123 | { 124 | bool lvarFoundName = true; 125 | int i = 0; 126 | string newName = null; 127 | while (lvarFoundName == true) 128 | { 129 | lvarFoundName = false; 130 | i++; 131 | newName = Name.Substring(0, Name.Length - i.ToString().Length) + i.ToString(); 132 | foreach (Field nameField in List) 133 | { 134 | if (nameField.Name == newName) { break; } 135 | } 136 | } 137 | Name = newName; 138 | } 139 | } 140 | } 141 | //create a new object 142 | Field objNewMember = default(Field); 143 | objNewMember = new Field(); 144 | 145 | //set the properties passed into the method 146 | objNewMember.Name = Name.ToUpper(); 147 | objNewMember.Status = "A"; 148 | objNewMember.Type = Type; 149 | switch (Type) 150 | {case eFieldType.shpBoolean: 151 | objNewMember.Decimal = 0; 152 | objNewMember.Size = 1; 153 | break; 154 | case eFieldType.shpDate: 155 | objNewMember.Decimal = 0; 156 | objNewMember.Size = 8; 157 | break; 158 | case eFieldType.shpDouble: 159 | if (Decimal == -1) { objNewMember.Decimal = 10; } 160 | else { objNewMember.Decimal = Decimal; } 161 | if (Size == -1) { objNewMember.Size = 30; } 162 | else { objNewMember.Size = Size; } 163 | break; 164 | case eFieldType.shpLong: 165 | objNewMember.Decimal = 0; 166 | if (Size == -1) { objNewMember.Size = 10; } 167 | else { objNewMember.Size = Size; } 168 | break; 169 | case eFieldType.shpInteger: 170 | objNewMember.Decimal = 0; 171 | if (Size == -1) { objNewMember.Size = 5; } 172 | else { objNewMember.Size = Size; } 173 | break; 174 | case eFieldType.shpFloat: 175 | if (Decimal == -1) { objNewMember.Decimal = 11; } 176 | else { objNewMember.Decimal = Decimal; } 177 | if (Size == -1) { objNewMember.Size = 19; } 178 | else { objNewMember.Size = Size; } 179 | break; 180 | case eFieldType.shpSingle: 181 | if (Decimal == -1) { objNewMember.Decimal = 5; } 182 | else { objNewMember.Decimal = Decimal; } 183 | if (Size == -1) { objNewMember.Size = 20; } 184 | else { objNewMember.Size = Size; } 185 | break; 186 | case eFieldType.shpText: 187 | objNewMember.Decimal = 0; 188 | if (Size == -1) { objNewMember.Size = 10; } 189 | else { objNewMember.Size = Size; } 190 | break; 191 | default: 192 | if (Decimal == -1) { objNewMember.Decimal = 0; } 193 | else { objNewMember.Decimal = Decimal; } 194 | if (Size == -1) { objNewMember.Size = 10; } 195 | else { objNewMember.Size = Size; } 196 | break; 197 | } 198 | List.Add(objNewMember); 199 | objNewMember = null; 200 | } 201 | 202 | /// 203 | /// Defines if duplicate field names should be corrected by adding a number to the end of the field name 204 | /// 205 | /// As with all databases - your field names need to be unique but as the .DBF data format limits the field name to 10 characters this can sometimes be a bit of a problem. 206 | /// When you set this property to true every field name is checked when added. If it isn't unique then the field name has a counter added to it (e.g. MYNAME1, MYNAME2). If the field name is larger than 207 | /// 10 charcters in length then it will be truncated before the counter is added. 208 | public bool FixFieldNames 209 | { 210 | get { return mvarFixFieldDupls; } 211 | set { mvarFixFieldDupls = value; } 212 | } 213 | 214 | /// 215 | /// Marks a field for deletion 216 | /// 217 | /// The Index if the field to be removed 218 | /// 219 | /// This method marks the indicated Field for removal from the collection. This uses the same process as the Field Delete method in the Field object. When the WriteFieldDefs method is used the removal is made permanent. 220 | /// 221 | /// Field Delete 222 | /// Field UnDelete 223 | /// Pack 224 | public new void RemoveAt(int vntIndexKey) 225 | { 226 | Field mField = (Field)List[vntIndexKey]; 227 | mField.Delete(); 228 | } 229 | 230 | #endregion 231 | 232 | #region ********** Fields Properties ********** 233 | 234 | /// 235 | /// Reports if the database record is Deleted 236 | /// 237 | /// Deleted records are often associated with Null shape records. Creating a Null record using AddNullShape will automatically add a new record to the database, but set the 238 | /// delete flag. This property will tell you the status of the current record. 239 | public bool isDeleted 240 | { 241 | get { return mvarIsDeleted; } 242 | set { mvarIsDeleted = value; } 243 | } 244 | /// 245 | /// Grabs the Field record from the collection by using its ordinal position within the collection 246 | /// 247 | /// The index within the collection 248 | public Field this[int Index] 249 | { 250 | get 251 | { 252 | return (Field)List[Index]; 253 | } 254 | } 255 | /// 256 | /// Grabs the Field record from the collection by using the FieldName 257 | /// 258 | /// The field name listed in the collection 259 | public Field this[string FieldName] 260 | { 261 | get 262 | { 263 | int retIndex = -1; 264 | for (int Index = 0; Index < List.Count; Index++) 265 | { 266 | Field testField = (Field)List[Index]; 267 | if (testField.Name == FieldName.ToUpper()) 268 | { 269 | retIndex = Index; 270 | break; 271 | } 272 | } 273 | if (retIndex > -1) 274 | { return (Field)List[retIndex]; } 275 | else 276 | { return null; } 277 | 278 | } 279 | } 280 | 281 | #endregion 282 | 283 | #region ********** Internal Methods ********** 284 | 285 | /// 286 | /// Removes the data values from the Fields Collection but leaves the structure behind 287 | /// 288 | internal void Strip() 289 | { 290 | foreach (Field mField in List) 291 | { mField.Value = null; } 292 | } 293 | 294 | #endregion 295 | 296 | } 297 | } 298 | -------------------------------------------------------------------------------- /Globals.cs: -------------------------------------------------------------------------------- 1 | namespace ArcShapeFile 2 | { 3 | static class Globals 4 | { 5 | public static bool mvarFieldChange; 6 | public static bool mvarVerticeChange; 7 | 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /HelpContentSetup.msha: -------------------------------------------------------------------------------- 1 |  2 | 3 | The ArcShapeFile Read/Write Library 4 | 5 | 6 |
7 | Vendor Name 8 | en-us 9 | The ArcShapeFile Read/Write Library 10 | The ArcShapeFile Read/Write Library 11 |
12 |
13 |
14 | 15 | ArcShapeFile Library Documentation 16 | ArcShapeFile Library Documentation.mshc 17 |
18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /IField.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | namespace ArcShapeFile 3 | { 4 | interface IField 5 | { 6 | short Decimal { get; set; } 7 | bool IsDeleted { get;} 8 | void Modify(string Name, short Size, short Decimal); 9 | void Modify(string Name, short Size); 10 | void Modify(eFieldType Type, short Size, short Decimal); 11 | void Modify(short Size, short Decimal); 12 | void Modify(short Size); 13 | void Modify(string Name, eFieldType Type, short Size, short Decimal); 14 | void Modify(string Name, eFieldType Type); 15 | void Modify(string Name, eFieldType Type, short Size); 16 | void Delete(); 17 | void UnDelete(); 18 | string Name { get; set; } 19 | short Size { get; set; } 20 | eFieldType Type { get; set; } 21 | object Value { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /IShapeFile.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | namespace ArcShapeFile 3 | { 4 | //[Guid("EA3FAAC9-C49F-49dd-80AA-785D877012F9")] 5 | interface IShapeFile 6 | { 7 | void AddNullShape(); 8 | double? Area { get; } 9 | bool BOF { get; } 10 | double CentroidX { get; } 11 | double CentroidY { get; } 12 | void Close(); 13 | void CopyFrom(string ShapeFileName, int RecordNumber); 14 | void CopyTo(string ShapeFileName, int RecordNumber); 15 | void CopyTo(string ShapeFileName); 16 | bool CreateEmpty { get; set; } 17 | void WriteShape(); 18 | int CurrentRecord { get; } 19 | void DeletePart(int PartNo); 20 | void DeleteShape(); 21 | void EmptyShape(); 22 | bool EOF { get; } 23 | Fields Fields { get; } 24 | void FindFirst(string QueryString); 25 | void FindFirst(double InX, double InY); 26 | void FindFirst(double InX, double InY, double Tolerance); 27 | void FindNext(); 28 | bool IsVisible(double InX, double InY, double Tolerance); 29 | bool IsVisible(double InX, double InY); 30 | eLanguage Language { get; set; } 31 | void LoadDBFData(); 32 | void LoadFieldDefs(string DBFFileName); 33 | void LoadShapeData(); 34 | double? mMax { get; } 35 | double? mMin { get; } 36 | void ModifyShape(); 37 | void MoveFirst(); 38 | void MoveLast(); 39 | void MoveNext(); 40 | void MovePrevious(); 41 | void MoveTo(int Index); 42 | bool NoMatch { get; } 43 | void Open(string filename); 44 | void Open(string filename, eShapeType shapetype, bool lockfile); 45 | void Open(string filename, bool lockfile); 46 | void Open(string filename, eShapeType shapetype); 47 | void Pack(); 48 | Parts Parts { get; } 49 | double Perimeter { get; } 50 | Projection Projection { get; set; } 51 | eReadMode ReadMode { get; set; } 52 | int RecordCount { get; } 53 | bool RetainData { get; set; } 54 | void SetPartDirection(int PartNo, eDirection Orientation); 55 | string ShapeFileName { get; } 56 | eShapeType ShapeType { get; } 57 | bool TestForHoles { get; set; } 58 | void UnDeleteShape(); 59 | void UpdateMBR(); 60 | Vertices Vertices { get; } 61 | void WriteFieldDefs(); 62 | void WriteProjection(eGeocentricDatums Datum); 63 | void WriteProjection(eGeographicDatums Projection); 64 | double xMax { get; } 65 | double xMin { get; } 66 | double yMax { get; } 67 | double yMin { get; } 68 | double? zMax { get; } 69 | double? zMin { get; } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /IVertice.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace ArcShapeFile 6 | { 7 | interface IVertice 8 | { 9 | double X_Cord { get; set;} 10 | double Y_Cord { get; set;} 11 | double? Z_Cord { get; set;} 12 | double? Measure { get; set;} 13 | 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /Part.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace ArcShapeFile 6 | { 7 | /// 8 | /// A Part is a connected sequence of two or more points in a line or polygon. Parts may or may not be connected to one another. Parts may or may not intersect one another. A part can be used to describe holes in polygons, or polygons and lines that share the same database attributes. 9 | /// 10 | public class Part 11 | { 12 | 13 | #region ********** Local Variables ********** 14 | 15 | private double mvarMBRXMin = 0; 16 | private double mvarMBRXMax = 0; 17 | private double mvarMBRYMin = 0; 18 | private double mvarMBRYMax = 0; 19 | private double? mvarZMin = null; 20 | private double? mvarZMax = null; 21 | private double? mvarMeasureMin = null; 22 | private double? mvarMeasureMax = null; 23 | private int mvarStart = 0; 24 | private int mvarFinish = 0; 25 | private bool mvarDonut = false; 26 | private ePartType mvarPartType = ePartType.none; 27 | private double mvarPartArea = 0; 28 | private eDirection? mvarDirection = null; 29 | private double? mvarPartCentroidX = null; 30 | private double? mvarPartCentroidY = null; 31 | private double? mvarPartPerimeter = null; 32 | 33 | #endregion 34 | 35 | #region ********** Public Part Properties ********** 36 | 37 | /// 38 | /// The End property of each Part denotes the ordinal position of the last vertice that describes the part shape within the Vertices collection. 39 | /// 40 | /// 41 | /// Use this property, together with the property to navigate your way through each part of a multipart shape record. 42 | /// 43 | /// 44 | /// 45 | /// foreach(Part p in shp.Parts) 46 | /// { 47 | /// Console.WriteLine("Part begins at vertice no. {0} and ends at vertice no. {1}", p.Begins, p.Ends); 48 | /// for(int v = p.Begins; v <= p.Ends; v++) 49 | /// { 50 | /// Console.WriteLine("Vertice Position: {0} X Value: {1} Y Value {2}", v, shp.Vertices[v].X_Cord, shp.Vertices[v].Y_Cord); 51 | /// } 52 | /// } 53 | /// 54 | /// 55 | /// 56 | public int Ends 57 | { 58 | get { return mvarFinish; } 59 | set { mvarFinish = value; } 60 | } 61 | 62 | 63 | /// 64 | /// The Begins property of each Part denotes the ordinal position of the first vertice that describes the part shape within the Vertices collection. 65 | /// 66 | /// 67 | /// Use this property, together with the property to navigate your way through each part of a multipart shape record. 68 | /// 69 | /// 70 | /// 71 | /// foreach(Part p in shp.Parts) 72 | /// { 73 | /// Console.WriteLine("Part begins at vertice no. {0} and ends at vertice no. {1}", p.Begins, p.Ends); 74 | /// for(int v = p.Begins; v <= p.Ends; v++) 75 | /// { 76 | /// Console.WriteLine("Vertice Position: {0} X Value: {1} Y Value {2}", v, shp.Vertices[v].X_Cord, shp.Vertices[v].Y_Cord); 77 | /// } 78 | /// } 79 | /// 80 | /// 81 | /// 82 | public int Begins 83 | { 84 | get { return mvarStart; } 85 | set { mvarStart = value; } 86 | } 87 | 88 | 89 | /// 90 | /// Returns the area of the part for polygon shapes. 91 | /// 92 | /// 93 | /// Referencing this property through the Parts collection you will notice that some values are negative and some are positive. If the value is positive then the polygon vertices are ordered clockwise about the normal, otherwise it's counter clockwise with a negative area indicating a hole 94 | /// 95 | public double Area 96 | { 97 | get { return mvarPartArea; } 98 | set 99 | {mvarPartArea = value; } 100 | } 101 | 102 | 103 | /// 104 | /// This property denotes the direction in which each vertice part has been captured. 105 | /// 106 | /// 107 | /// Polygon rings are normally captured in a clockwise direction ... unless they are holes, in which case they should be captured as anticlockwise. If you are using this library to create your own polygons and are unsure as to the direction of each part you can (and should) force the issue using the SetPartDirection method. 108 | /// 109 | public eDirection? Direction 110 | { 111 | get { return mvarDirection; } 112 | set { mvarDirection = value; } 113 | } 114 | 115 | 116 | /// 117 | /// Returns an object that represents the X Centroid of the polygon shape described by this Part 118 | /// 119 | public double? CentroidX 120 | { 121 | get { return mvarPartCentroidX; } 122 | set { mvarPartCentroidX = value; } 123 | } 124 | 125 | 126 | /// 127 | /// Returns an object that represents the Y Centroid of the polygon shape described by this Part 128 | /// 129 | public double? CentroidY 130 | { 131 | get { return mvarPartCentroidY; } 132 | set { mvarPartCentroidY = value; } 133 | } 134 | 135 | 136 | /// 137 | /// Provides the length of the perimeter around the part polygon shape or the length a line shape. 138 | /// 139 | /// 140 | /// Forget about using this property on MultiPatch shapes - the calculated value will be way out. This property is really designed to cater for polygons and lines. 141 | /// If you want the perimeter length of the entire shape use the ShapeFile Perimeter property 142 | /// 143 | public double? Perimeter 144 | { 145 | get { return mvarPartPerimeter; } 146 | set { mvarPartPerimeter = value; } 147 | } 148 | 149 | 150 | /// 151 | /// Returns Double that represents the bounding rectangle minimum X of the polygon shape described by this Part 152 | /// 153 | public double MBRXMin 154 | { 155 | get { return mvarMBRXMin; } 156 | set { mvarMBRXMin = value; } 157 | } 158 | 159 | 160 | 161 | /// 162 | /// Returns Double that represents the bounding rectangle maximum X of the polygon shape described by this Part 163 | /// 164 | public double MBRXMax 165 | { 166 | get { return mvarMBRXMax; } 167 | set { mvarMBRXMax = value; } 168 | } 169 | 170 | 171 | 172 | /// 173 | /// Returns Double that represents the bounding rectangle minimum Y of the polygon shape described by this Part 174 | /// 175 | public double MBRYMin 176 | { 177 | get { return mvarMBRYMin; } 178 | set { mvarMBRYMin = value; } 179 | } 180 | 181 | 182 | 183 | /// 184 | /// Returns a Double that represents the bounding rectangle maximum Y of the polygon shape described by this Part 185 | /// 186 | public double MBRYMax 187 | { 188 | get { return mvarMBRYMax; } 189 | set { mvarMBRYMax = value; } 190 | } 191 | 192 | 193 | /// 194 | /// Returns a Double that represents the bounding rectangle minimum Z of the polygonZ shape described by this Part 195 | /// 196 | public double? zMin 197 | { 198 | get { return mvarZMin; } 199 | set { mvarZMin = value; } 200 | } 201 | 202 | 203 | 204 | /// 205 | /// Returns a Double that represents the bounding rectangle minimum Z of the polygonZ shape described by this Part 206 | /// 207 | public double? zMax 208 | { 209 | get { return mvarZMax; } 210 | set { mvarZMax = value; } 211 | } 212 | 213 | 214 | /// 215 | /// Returns a Double that represents the bounding rectangle minimum measure of the polygonZ and polygonM shape described by this Part 216 | /// 217 | public double? MeasureMin 218 | { 219 | get { return mvarMeasureMin; } 220 | set { mvarMeasureMin = value; } 221 | } 222 | 223 | 224 | 225 | /// 226 | /// Returns aDouble that represents the bounding rectangle maximum measure of the polygonZ and polygonM shapes described by this Part 227 | /// 228 | public double? MeasureMax 229 | { 230 | get { return mvarMeasureMax; } 231 | set { mvarMeasureMax = value; } 232 | } 233 | 234 | 235 | 236 | /// 237 | /// A polygon consists of one or more rings, or parts. A polygon may contain multiple outer rings. The order of vertices or orientation for a ring indicates which side of the ring is the interior of the polygon. The neighborhood to the right of an observer walking along the ring in vertex order is the neighborhood inside the polygon. Vertices of rings defining holes in polygons are always in a counterclockwise direction. Vertices for a single, ringed polygon are, therefore, always in a clockwise order. 238 | /// 239 | /// 240 | /// The IsHole property attempts to indicate that the polygon part is a hole by comparing the minimum bounding rectangles of all parts of the current ShapeFile record. A True value is returned if the part is contained with the bounds of any other part of the current ShapeFile record. As a further check a line is drawn from the interior polygon part through the largest polygon part and the number of intersections counted (an odd number indicates that the part is within the larger part). Why this method? I have found that ShapeFiles created by some translators use parts to group distinct polygons that share the same attribute data, that is they do not conform to the idea that polygon consists of a series of outer rings.
241 | ///
242 | /// The figure on the left shows how parts can be used to denote distinct polygons with the same attributes, while the figure on the right shows how parts can be used to create holes in the polygon. One thing that you should note programatically is that polygon holes must be Anti Clockwise. You can force this before creating your shape with the SetPartDirection method for any parts in your shape. 243 | ///
244 | /// SetPartDirection Method 245 | public bool IsHole 246 | { 247 | get { return mvarDonut; } 248 | set { mvarDonut = value; } 249 | } 250 | 251 | 252 | /// 253 | /// A MultiPatch shape consists of a number of surfaces, each described by a vertice part. What type of MultiPatch shape each part is is described by the PatchType. The parts of a MultiPatch can be of the following types: 254 | /// 255 | /// 256 | /// The following is straight out of the ESRI technical description. A sequence of parts (or rings) can describe a polygonal surface patch with holes. The sequence typically consists of all Outer Ring, representing the outer boundary of the patch followed by a number of Inner Rings representing holes. When the individual types of rings in a collection of rings representing a polygonal patch with holes are unknown, the sequence must start with First Ring, followed by a number of Rings. A sequence of Rings not preceded by a First Ring is treated as a sequence of Outer Rings without holes. 257 | /// The following figure shows examples of all types of MultiPatch parts.
258 | /// 259 | ///
260 | public ePartType PartType 261 | { 262 | get { return mvarPartType; } 263 | set { mvarPartType = value; } 264 | } 265 | 266 | 267 | #endregion 268 | } 269 | } 270 | -------------------------------------------------------------------------------- /Parts.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace ArcShapeFile 6 | { 7 | /// 8 | /// The Parts Collection consists of one or more Part objects, each representing the beginning and end point of each ring or part in the current record. 9 | /// 10 | /// Some ShapeFile records consist of polygons with donuts inside them or multiple shapes that share the same database attribution. With the Parts collection 11 | /// I've tried to give you a bit more information about these features, including the start and end ordinal of the vertices that make up each ring, the centroid of the ring and a few other bits and pieces. 12 | /// ou can refer to each Part object within the collection by: 13 | ///
    14 | ///
  • Iteration by using the 0 based ordinal - i.e. for(int i=0;i < shp.Parts.Count; i++)
  • 15 | ///
  • Iteration by reference - i.e. foreach(Part pt in shp.Parts)
  • 16 | ///
17 | public class Parts : System.Collections.CollectionBase 18 | { 19 | 20 | #region ********** Internal Methods ********** 21 | 22 | internal void Add(int Begins) 23 | { 24 | //create a new object 25 | Part objNewMember = default(Part); 26 | objNewMember = new Part(); 27 | 28 | //set the properties passed into the method 29 | objNewMember.Begins = Begins; 30 | 31 | List.Add(objNewMember); 32 | 33 | } 34 | 35 | #endregion 36 | 37 | #region ********** Public Methods ********** 38 | 39 | /// 40 | /// Grabs the Part information based on the Index 41 | /// 42 | /// The index of the Part within the collection 43 | public Part this[int Index] 44 | { 45 | get 46 | { 47 | return (Part)List[Index]; 48 | } 49 | } 50 | 51 | #endregion 52 | 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Projection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace ArcShapeFile 6 | { 7 | /// 8 | /// A class containing the values read from a PRJ file 9 | /// 10 | /// 11 | /// This class is essentially read only and grabs the available details from the projection (.PRJ) file with the same name as the ShapeFile. To write 12 | /// a projection file use the method. 13 | public class Projection 14 | { 15 | 16 | #region ********** Local Variables ********** 17 | 18 | string mvarCoordSystem; 19 | string mvarProjSystem; 20 | string mvarDatum; 21 | string mvarSpheroidName; 22 | double mvarEqRadius; 23 | double mvarFlatInv; 24 | double mvarPolarRadius; 25 | double mvarEccentricity; 26 | string mvarPrimeMerName; 27 | double mvarPrimeMeridian; 28 | double mvarCentralMeridian; 29 | string mvarGeoSpaceUnitName; 30 | double mvarGeoSpaceUnitSize; 31 | string mvarType; 32 | 33 | string mvarProjectionName; 34 | double mvarFalseEast; 35 | double mvarFalseNorth; 36 | double mvarLatOrigin; 37 | double mvarLongOrigin; 38 | double mvarScaleFactor; 39 | string mvarProjectionUnitName; 40 | double mvarProjectionUnitSize; 41 | 42 | #endregion 43 | 44 | #region ********** Public Projection Properties ********** 45 | /// 46 | /// What type of projection is this? 47 | /// 48 | public string Type 49 | { 50 | get { return mvarType; } 51 | internal set { mvarType = value; } 52 | } 53 | /// 54 | /// The Geographic Cooordinate System Name 55 | /// 56 | public string GeoCoordSystem 57 | { 58 | get { return mvarCoordSystem; } 59 | internal set { mvarCoordSystem = value; } 60 | } 61 | /// 62 | /// The Projection Name 63 | /// 64 | public string ProjCoordSystem 65 | { 66 | get { return mvarProjSystem; } 67 | internal set { mvarProjSystem = value; } 68 | } 69 | /// 70 | /// The Datum used in the projection 71 | /// 72 | public string Datum 73 | { 74 | get { return mvarDatum; } 75 | internal set { mvarDatum = value; } 76 | } 77 | /// 78 | /// The name of the spheroid used in the projection 79 | /// 80 | public string SpheroidName 81 | { 82 | get { return mvarSpheroidName; } 83 | internal set { mvarSpheroidName = value; } 84 | } 85 | /// 86 | /// The Equatorial Radius 87 | /// 88 | public double EquitorialRadius 89 | { 90 | get { return mvarEqRadius; } 91 | internal set { mvarEqRadius = value; } 92 | } 93 | /// 94 | /// The Inverse of the flattening 95 | /// 96 | public double FlatteningInverse 97 | { 98 | get { return mvarFlatInv; } 99 | internal set { mvarFlatInv = value; } 100 | } 101 | /// 102 | /// The Polar Radius 103 | /// 104 | public double PolarRadius 105 | { 106 | get { return mvarPolarRadius; } 107 | internal set { mvarPolarRadius = value; } 108 | } 109 | /// 110 | /// The Eccentricity 111 | /// 112 | public double Eccentricity 113 | { 114 | get { return mvarEccentricity; } 115 | internal set { mvarEccentricity = value; } 116 | } 117 | /// 118 | /// The name of the Prime Meridian 119 | /// 120 | public string PrimeMeridianName 121 | { 122 | get { return mvarPrimeMerName; } 123 | internal set { mvarPrimeMerName = value; } 124 | } 125 | /// 126 | /// The Prime Meridian value 127 | /// 128 | public double PrimeMeridian 129 | { 130 | get { return mvarPrimeMeridian; } 131 | internal set { mvarPrimeMeridian = value; } 132 | } 133 | /// 134 | /// The Central Meridian value 135 | /// 136 | public double CentralMeridian 137 | { 138 | get { return mvarCentralMeridian; } 139 | internal set { mvarCentralMeridian = value; } 140 | } 141 | /// 142 | /// The name of the coordinate system units 143 | /// 144 | public string GeoSpaceUnitName 145 | { 146 | get { return mvarGeoSpaceUnitName; } 147 | internal set { mvarGeoSpaceUnitName = value; } 148 | } 149 | /// 150 | /// The size of the coordinate system units 151 | /// 152 | public double GeoSpaceUnitSize 153 | { 154 | get { return mvarGeoSpaceUnitSize; } 155 | internal set { mvarGeoSpaceUnitSize = value; } 156 | } 157 | /// 158 | /// The name of the Projection 159 | /// 160 | public string ProjectionName 161 | { 162 | get { return mvarProjectionName; } 163 | internal set { mvarProjectionName = value; } 164 | } 165 | /// 166 | /// The projection false East value 167 | /// 168 | public double FalseEast 169 | { 170 | get { return mvarFalseEast; } 171 | internal set { mvarFalseEast = value; } 172 | } 173 | /// 174 | /// The projection false North value 175 | /// 176 | public double FalseNorth 177 | { 178 | get { return mvarFalseNorth; } 179 | internal set { mvarFalseNorth = value; } 180 | } 181 | /// 182 | /// Latitude of Origin value 183 | /// 184 | public double LatitudeOrigin 185 | { 186 | get { return mvarLatOrigin; } 187 | internal set { mvarLatOrigin = value; } 188 | } 189 | /// 190 | /// Longitude of Origin value 191 | /// 192 | public double LongitudeOrigin 193 | { 194 | get { return mvarLongOrigin; } 195 | internal set { mvarLongOrigin = value; } 196 | } 197 | /// 198 | /// Scale factor 199 | /// 200 | public double ScaleFactor 201 | { 202 | get { return mvarScaleFactor; } 203 | internal set { mvarScaleFactor = value; } 204 | } 205 | /// 206 | /// The name of the units used by the projection 207 | /// 208 | public string ProjectionUnitName 209 | { 210 | get { return mvarProjectionUnitName; } 211 | internal set { mvarProjectionUnitName = value; } 212 | } 213 | /// 214 | /// The size of the units used by the projection 215 | /// 216 | public double ProjectionUnitSize 217 | { 218 | get { return mvarProjectionUnitSize; } 219 | internal set { mvarProjectionUnitSize = value; } 220 | } 221 | 222 | 223 | #endregion 224 | 225 | } 226 | } 227 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ArcShapeFile 2 | A C# library to read and write ESRI Shapefiles 3 | 4 | The ESRI Shapefile format is a commonly shared geographic data format. This is my attempt to read and write to it. The set of C# classes that make up the DLL allow you to read and create both the vector/point data and the associated attribute record. The source code comes with a reasonably comprehensive help file that includes code C# and VB.Net examples. 5 | 6 |

Background

7 | The Shapefile format first made it's appearence back in the 1980's.  Despite it's limitations it remains a standard format for moving data between GIS systems. Essentially the format as described in the ESRI Shapefile Technical Description consists on three files

8 |
  • .shp - holds the vertice data (x, y and in some cases z and measure values)
  • 9 |
  • .shx - contains the offset and length of each record in the .shp
  • 10 |
  • .dbf - contains the attribute data for each record. This file is based on the old Ashton Tate dBASE III format, though without memo field support so text fields are limited to 254 characters and the field names are limited to 10 characters
11 |

A further limitation of the ShapeFile format is that each Shapefile can only contain one type of shape (i.e. all points or all lines or all polygons). There is one exception and that is you can have a null record to act as a placeholder within the Shapefile structure.

12 | 13 |

Additionally I've added support for the .prj file. This is a WKT file holding the projection information - handy when you want to use this data in different systems as most seem to recognise it. I've also added support of the .cfg codepage file, though this still in the development phase and may need some additional work.

I originally developed this code in VS 2005 so I've keep the style (relatively) simple - no vars, just explicit dimensioning and no LINQ (though that meant I had to write my own query parser) - so you should be able to easily import the code into any VS version and run it as is. 14 | -------------------------------------------------------------------------------- /ShapeOCX.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosspickard/ArcShapeFile/b885396cd478a917883fd0e67734c618ea8e60d6/ShapeOCX.ico -------------------------------------------------------------------------------- /Vertice.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Runtime.InteropServices; 5 | 6 | namespace ArcShapeFile 7 | { 8 | ///

9 | /// Contains the X, Y, Z coordinates and measure information of a vertice 10 | /// 11 | [ClassInterface(ClassInterfaceType.AutoDual)] 12 | [Guid("1BBEA337-0B68-418c-B380-BB54B38866A1")] 13 | public class Vertice : ArcShapeFile.IVertice 14 | { 15 | 16 | #region ********** Local Variables ********** 17 | 18 | private double mvarX_Cord; 19 | private double mvarY_Cord; 20 | private double? mvarZ_Cord; 21 | private double? mvarMeasure; 22 | //private int mvarPartNo; 23 | //private ePartType mvarPartType; 24 | 25 | #endregion 26 | 27 | #region ********** Public Vertice Properties ********** 28 | 29 | 30 | /// 31 | /// The X component of the cartesian coordinate 32 | /// 33 | /// 34 | /// This is one part of the standard 2 dimesional cartesian plain coordinate pair. Adding new Vertices should be done through the method. 35 | /// The ModifyShape method will write any changes to existing vertices back to the ShapeFile. 36 | /// 37 | public double X_Cord 38 | { 39 | get { return mvarX_Cord; } 40 | set 41 | { 42 | if (mvarX_Cord != value) 43 | Globals.mvarVerticeChange = true; 44 | mvarX_Cord = value; 45 | } 46 | } 47 | 48 | /// 49 | /// The Y component of the cartesian coordinate 50 | /// 51 | /// 52 | /// This is one part of the standard 2 dimesional cartesian plain coordinate pair. Adding new Vertices should be done through the method. 53 | /// The ModifyShape method will write any changes to existing vertices back to the ShapeFile. 54 | /// 55 | public double Y_Cord 56 | { 57 | get { return mvarY_Cord; } 58 | set 59 | { 60 | if (mvarY_Cord != value) 61 | Globals.mvarVerticeChange = true; 62 | mvarY_Cord = value; 63 | } 64 | } 65 | 66 | /// 67 | /// The Z or height component of the current 3 dimensional Vertice record 68 | /// 69 | /// 70 | /// Z coordinates are only applicable to shapes of type X,Y,Z Measure. The Z_Cord value may be null. Null values are written to ShapeFiles as any value less than 10-38 71 | /// 72 | public double? Z_Cord 73 | { 74 | get { return mvarZ_Cord; } 75 | set 76 | { 77 | if (mvarZ_Cord != value) 78 | Globals.mvarVerticeChange = true; 79 | mvarZ_Cord = value; 80 | } 81 | } 82 | 83 | /// 84 | /// The measure component of the current Vertice record 85 | /// 86 | /// 87 | /// Measures are only applicable to shapes of type X,Y Measure or X,Y,Z Measure. The Measure value may be null. Null values are written to ShapeFiles as any value less than 10-38 88 | /// 89 | public double? Measure 90 | { 91 | get { return mvarMeasure; } 92 | set 93 | { 94 | if (!mvarMeasure.Equals(value)) 95 | { 96 | Globals.mvarVerticeChange = true; 97 | } 98 | mvarMeasure = value; 99 | } 100 | } 101 | 102 | #endregion 103 | 104 | 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /WKTProjectionInfo.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosspickard/ArcShapeFile/b885396cd478a917883fd0e67734c618ea8e60d6/WKTProjectionInfo.xls -------------------------------------------------------------------------------- /WKTReader.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | using System.IO; 6 | 7 | namespace ArcShapeFile 8 | { 9 | /* **************************************************************************** 10 | * This is my own interpretation of a Well Known Text reader for spatial 11 | * projection info as implemented in the ESRI prj file. I've tried to 12 | * emulate the XML reader structure in that each base class (or Node) will 13 | * have a name, a parent, attributes and possibly children (or Nodes). 14 | * The tricky part is iterating through the nodes to find the one you want 15 | * I've provided a couple of methods to make it easier for you: 16 | * GetNodesByName - returns all nodes regardless of depth that match your 17 | * criteria. 18 | * GetAttribValuebyName - Returns the value of the xth attribute that 19 | * matches your criteria 20 | * GetAttribName - Returns the name of the attibute gievn a tag name and/or 21 | * parent tag name 22 | * Anyway ... it seems to work 23 | * ***************************************************************************** 24 | */ 25 | /// 26 | /// This is my own interpretation of a Well Known Text reader for spatial 27 | /// projection info as implemented in the ESRI prj file. I've tried to 28 | /// emulate the XML reader structure in that each base class (or Node) will 29 | /// have a name, a parent, attributes and possibly children (or Nodes). 30 | /// The tricky part is iterating through the nodes to find the one you want 31 | /// I've provided a couple of methods to make it easier for you: 32 | /// 33 | /// 34 | /// GetNodesByName - Returns all nodes regardless of depth that match your criteria 35 | /// 36 | /// 37 | /// 38 | /// GetAttribValuebyName - Returns the value of the xth attribute that matches your criteria 39 | /// 40 | /// 41 | /// 42 | /// GetAttribName - Returns the name of the attibute given a tag name and/or parent tag name 43 | /// 44 | /// 45 | /// Anyway ... it seems to work 46 | /// 47 | public class WKTReader 48 | { 49 | private ArrayList LevelList; 50 | 51 | private WKTNodes mvarNodes; 52 | 53 | /// 54 | /// The collection of individual nodes from the WKT input 55 | /// 56 | public WKTNodes Nodes 57 | { 58 | get { return mvarNodes; } 59 | } 60 | 61 | /// 62 | /// Opens the WKT file and loads all the data into the reader's nodes 63 | /// 64 | /// The name of the WKT file to load 65 | public void Read(string filename) 66 | { 67 | if (!System.IO.File.Exists(filename)) 68 | { throw new Exception("WKT File does not exist"); } 69 | LevelList = new ArrayList(); 70 | mvarNodes = new WKTNodes(); 71 | 72 | try 73 | { 74 | 75 | string inData = System.IO.File.ReadAllText(filename); 76 | // Remove unwanted characters 77 | inData = inData.Replace("\t", ""); 78 | inData = inData.Replace("\n", ""); 79 | inData = inData.Replace("\r", ""); 80 | inData = inData.Replace(", ", ","); 81 | 82 | 83 | int majLevel = 0; 84 | 85 | while (inData != "") 86 | { 87 | int brkPos = inData.IndexOf("["); 88 | if (brkPos == -1) 89 | return; 90 | 91 | string valName = (inData.Substring(0, brkPos)).Trim(); 92 | if (valName.Contains(",")) 93 | valName = valName.Substring(valName.IndexOf(",") + 1); 94 | string innerText = LoadParameterFromWKT(valName, inData); 95 | string param = null; 96 | inData = (inData.Substring(brkPos + 2 + innerText.Length)).Trim(); 97 | 98 | if (innerText.Contains("[")) 99 | { 100 | brkPos = innerText.IndexOf("["); 101 | brkPos = innerText.LastIndexOf(",", brkPos); 102 | param = (innerText.Substring(0, brkPos)).Trim(); 103 | } 104 | else 105 | { param = innerText; } 106 | 107 | majLevel++; 108 | mvarNodes.Add("Top", valName, innerText, param, ""); 109 | 110 | } 111 | 112 | FindAllLevels(); 113 | } 114 | catch { } 115 | } 116 | 117 | private void FindAllLevels() 118 | { 119 | bool HasChildren = true; 120 | LevelList.Clear(); 121 | for (int i = 0; i < mvarNodes.Count; i++) 122 | { 123 | LevelList.Add(i.ToString() + "."); 124 | } 125 | 126 | int startSearch = 0; 127 | int noAdded = 0; 128 | 129 | while (HasChildren) 130 | { 131 | HasChildren = false; 132 | for (int i = startSearch; i < LevelList.Count; i++) 133 | { 134 | startSearch += noAdded; 135 | noAdded = 0; 136 | string thisLevel = LevelList[i].ToString(); 137 | thisLevel = thisLevel.Substring(0, thisLevel.Length - 1); 138 | string[] testLevels = thisLevel.Split('.'); 139 | WKTNode tNode = mvarNodes[Convert.ToInt32(testLevels[0])]; 140 | for (int j = 1; j < testLevels.Length; j++) 141 | { tNode = tNode.Children[Convert.ToInt32(testLevels[j])]; } 142 | if (tNode.hasChildren) 143 | { 144 | // Does this already exist in the list? 145 | for (int nNode = 0; nNode < tNode.Children.Count; nNode++) 146 | { 147 | string newLevel = LevelList[i].ToString() + nNode.ToString() + "."; 148 | if (!LevelList.Contains(newLevel)) 149 | { 150 | HasChildren = true; 151 | LevelList.Add(newLevel); 152 | noAdded++; 153 | } 154 | } 155 | } 156 | 157 | } 158 | 159 | } 160 | 161 | for (int i = 0; i < LevelList.Count; i++) 162 | { 163 | System.Diagnostics.Debug.WriteLine(LevelList[i].ToString()); 164 | } 165 | } 166 | 167 | private string LoadParameterFromWKT(string Header, string WKTString) 168 | { 169 | int paramStart = WKTString.IndexOf(Header); 170 | if (paramStart < 0) 171 | { return null; } 172 | paramStart += Header.Length + 1; 173 | string tString = WKTString.Substring(paramStart); 174 | int paramEnd = tString.IndexOf("]"); 175 | int NoOfClosedBrks = 1; 176 | int NoOfOpenBrks = 0; 177 | 178 | while (NoOfClosedBrks != NoOfOpenBrks) 179 | { 180 | NoOfOpenBrks = 1; 181 | int brkPos = 0; 182 | do 183 | { 184 | // how many "[" are there between the start and the first closed brackets 185 | 186 | brkPos = tString.IndexOf("[", brkPos + 1); 187 | if (brkPos > -1 & brkPos < paramEnd) 188 | NoOfOpenBrks++; 189 | } 190 | while (brkPos > -1 & brkPos < paramEnd); 191 | if (NoOfOpenBrks != NoOfClosedBrks) 192 | { 193 | paramEnd = tString.IndexOf("]", paramEnd + 1); 194 | NoOfClosedBrks++; 195 | NoOfOpenBrks = 0; 196 | }; 197 | } 198 | 199 | return tString.Substring(0, paramEnd); 200 | } 201 | 202 | /// 203 | /// Returns all the nodes in the WKT string that match 204 | /// 205 | /// The name of the Parent of the Tag (e.g. DATUM is the parent of SHEROID) 206 | /// "The name of the Tag (e.g. DATUM) 207 | /// The name of the Attribute to search for (e.g. Latitude_Of_Origin) 208 | public WKTNodes GetNodesbyName(string ParentName, string TagName, string AttribName) 209 | { 210 | WKTNodes getNodes = new WKTNodes(); 211 | // Iterate through all the nodes and their children to find the match 212 | foreach (string testLevel in LevelList) 213 | { 214 | string[] splitLevels = testLevel.Split('.'); 215 | WKTNode retNode = mvarNodes[Convert.ToInt32(splitLevels[0])]; 216 | for (int i = 1; i < splitLevels.Length - 1; i++) 217 | { 218 | retNode = retNode.Children[Convert.ToInt32(splitLevels[i])]; 219 | } 220 | if (retNode.ParentName.ToUpper() == ParentName.ToUpper() & retNode.TagName.ToUpper() == TagName.ToUpper() & retNode.AttributeName.ToUpper() == AttribName.ToUpper()) 221 | { getNodes.Add(retNode); } 222 | } 223 | return getNodes; 224 | } 225 | 226 | /// 227 | /// Returns all the nodes in the WKT string that match 228 | /// 229 | /// "The name of the Tag (e.g. DATUM) 230 | /// The name of the Attribute to search for (e.g. Latitude_Of_Origin) 231 | public WKTNodes GetNodesbyName(string TagName, string AttribName) 232 | { 233 | WKTNodes getNodes = new WKTNodes(); 234 | // Iterate through all the nodes and their children to find the match 235 | foreach (string testLevel in LevelList) 236 | { 237 | string[] splitLevels = testLevel.Split('.'); 238 | WKTNode retNode = mvarNodes[Convert.ToInt32(splitLevels[0])]; 239 | for (int i = 1; i < splitLevels.Length - 1; i++) 240 | { 241 | retNode = retNode.Children[Convert.ToInt32(splitLevels[i])]; 242 | } 243 | if (retNode.TagName.ToUpper() == TagName.ToUpper() & retNode.AttributeName.ToUpper() == AttribName.ToUpper()) 244 | { getNodes.Add(retNode); } 245 | } 246 | return getNodes; 247 | } 248 | 249 | /// 250 | /// Returns all the nodes in the WKT string that match 251 | /// 252 | /// "The name of the Tag (e.g. DATUM) 253 | public WKTNodes GetNodesbyName(string TagName) 254 | { 255 | WKTNodes getNodes = new WKTNodes(); 256 | // Iterate through all the nodes and their children to find the match 257 | foreach (string testLevel in LevelList) 258 | { 259 | string[] splitLevels = testLevel.Split('.'); 260 | WKTNode retNode = mvarNodes[Convert.ToInt32(splitLevels[0])]; 261 | for (int i = 1; i < splitLevels.Length - 1; i++) 262 | { 263 | retNode = retNode.Children[Convert.ToInt32(splitLevels[i])]; 264 | } 265 | if (retNode.TagName.ToUpper() == TagName.ToUpper()) 266 | { getNodes.Add(retNode); } 267 | } 268 | return getNodes; 269 | } 270 | 271 | /// 272 | /// Gets an attribute value for a particular Tag 273 | /// 274 | /// The name of the Parent of the Tag (e.g. DATUM is the parent of SHEROID) 275 | /// "The name of the Tag (e.g. DATUM) 276 | /// The name of the Attribute to search for (e.g. Latitude_Of_Origin) 277 | /// The item number of the Attribute array (defaults to 0) 278 | public string GetAttribValuebyName(string ParentName, string TagName, string AttribName, int AttribNumber) 279 | { 280 | string RetString = null; 281 | // Iterate through all the nodes and their children to find the match 282 | foreach (string testLevel in LevelList) 283 | { 284 | string[] splitLevels = testLevel.Split('.'); 285 | WKTNode retNode = mvarNodes[Convert.ToInt32(splitLevels[0])]; 286 | for (int i = 1; i < splitLevels.Length - 1; i++) 287 | { 288 | retNode = retNode.Children[Convert.ToInt32(splitLevels[i])]; 289 | } 290 | if (!String.IsNullOrEmpty(retNode.AttributeName)) 291 | { 292 | if (retNode.ParentName.ToUpper() == ParentName.ToUpper() & retNode.TagName.ToUpper() == TagName.ToUpper() & retNode.AttributeName.ToUpper() == AttribName.ToUpper()) 293 | { 294 | RetString = (string)retNode.Attributes[AttribNumber]; 295 | break; 296 | } 297 | } 298 | } 299 | return RetString; 300 | } 301 | 302 | /// 303 | /// Gets an attribute value for a particular Tag 304 | /// 305 | /// "The name of the Tag (e.g. DATUM) 306 | /// The name of the Attribute to search for (e.g. Latitude_Of_Origin) 307 | /// The item number of the Attribute array (defaults to 0) 308 | public string GetAttribValuebyName(string TagName, string AttribName, int AttribNumber) 309 | { 310 | string RetString = null; 311 | // Iterate through all the nodes and their children to find the match 312 | foreach (string testLevel in LevelList) 313 | { 314 | string[] splitLevels = testLevel.Split('.'); 315 | WKTNode retNode = mvarNodes[Convert.ToInt32(splitLevels[0])]; 316 | for (int i = 1; i < splitLevels.Length - 1; i++) 317 | { 318 | retNode = retNode.Children[Convert.ToInt32(splitLevels[i])]; 319 | } 320 | 321 | if (!String.IsNullOrEmpty(retNode.AttributeName)) 322 | { 323 | if (retNode.TagName.ToUpper() == TagName.ToUpper() & retNode.AttributeName.ToUpper() == AttribName.ToUpper()) 324 | { 325 | RetString = (string)retNode.Attributes[AttribNumber]; 326 | break; 327 | } 328 | } 329 | } 330 | return RetString; 331 | } 332 | 333 | /// 334 | /// Gets an attribute value for a particular Tag 335 | /// 336 | /// The name of the Parent of the Tag (e.g. DATUM is the parent of SHEROID) 337 | /// "The name of the Tag (e.g. DATUM) 338 | /// The name of the Attribute to search for (e.g. Latitude_Of_Origin) 339 | public string GetAttribValuebyName(string ParentName, string TagName, string AttribName) 340 | { 341 | string RetString = null; 342 | // Iterate through all the nodes and their children to find the match 343 | foreach (string testLevel in LevelList) 344 | { 345 | string[] splitLevels = testLevel.Split('.'); 346 | WKTNode retNode = mvarNodes[Convert.ToInt32(splitLevels[0])]; 347 | for (int i = 1; i < splitLevels.Length - 1; i++) 348 | { 349 | retNode = retNode.Children[Convert.ToInt32(splitLevels[i])]; 350 | } 351 | if (!String.IsNullOrEmpty(retNode.AttributeName)) 352 | { 353 | if (retNode.ParentName.ToUpper() == ParentName.ToUpper() & retNode.TagName.ToUpper() == TagName.ToUpper() & retNode.AttributeName.ToUpper() == AttribName.ToUpper()) 354 | { 355 | RetString = (string)retNode.Attributes[0]; 356 | break; 357 | } 358 | } 359 | } 360 | return RetString; 361 | } 362 | 363 | /// 364 | /// Gets an attribute value for a particular Tag 365 | /// 366 | /// "The name of the Tag (e.g. DATUM) 367 | /// The name of the Attribute to search for (e.g. Latitude_Of_Origin) 368 | public string GetAttribValuebyName(string TagName, string AttribName) 369 | { 370 | string RetString = null; 371 | // Iterate through all the nodes and their children to find the match 372 | foreach (string testLevel in LevelList) 373 | { 374 | string[] splitLevels = testLevel.Split('.'); 375 | WKTNode retNode = mvarNodes[Convert.ToInt32(splitLevels[0])]; 376 | for (int i = 1; i < splitLevels.Length - 1; i++) 377 | { 378 | retNode = retNode.Children[Convert.ToInt32(splitLevels[i])]; 379 | } 380 | if (!String.IsNullOrEmpty(retNode.AttributeName)) 381 | { 382 | if (retNode.TagName.ToUpper() == TagName.ToUpper() & retNode.AttributeName.ToUpper() == AttribName.ToUpper()) 383 | { 384 | RetString = (string)retNode.Attributes[0]; 385 | break; 386 | } 387 | } 388 | } 389 | return RetString; 390 | } 391 | 392 | /// 393 | /// Gets an attribute name for a particular Tag 394 | /// 395 | /// The name of the Parent of the Tag (e.g. DATUM is the parent of SHEROID) 396 | /// "The name of the Tag (e.g. DATUM) 397 | public string GetAttribName(string ParentName, string TagName) 398 | { 399 | string RetString = null; 400 | // Iterate through all the nodes and their children to find the match 401 | foreach (string testLevel in LevelList) 402 | { 403 | string[] splitLevels = testLevel.Split('.'); 404 | WKTNode retNode = mvarNodes[Convert.ToInt32(splitLevels[0])]; 405 | for (int i = 1; i < splitLevels.Length - 1; i++) 406 | { 407 | retNode = retNode.Children[Convert.ToInt32(splitLevels[i])]; 408 | } 409 | 410 | if (retNode.ParentName.ToUpper() == ParentName.ToUpper() & retNode.TagName.ToUpper() == TagName.ToUpper() ) 411 | { 412 | RetString = (string)retNode.AttributeName; 413 | break; 414 | } 415 | } 416 | return RetString; 417 | } 418 | 419 | /// 420 | /// Gets an attribute name for a particular Tag 421 | /// 422 | /// "The name of the Tag (e.g. DATUM) 423 | public string GetAttribName(string TagName) 424 | { 425 | string RetString = null; 426 | // Iterate through all the nodes and their children to find the match 427 | foreach (string testLevel in LevelList) 428 | { 429 | string[] splitLevels = testLevel.Split('.'); 430 | WKTNode retNode = mvarNodes[Convert.ToInt32(splitLevels[0])]; 431 | for (int i = 1; i < splitLevels.Length - 1; i++) 432 | { 433 | retNode = retNode.Children[Convert.ToInt32(splitLevels[i])]; 434 | } 435 | if (retNode.TagName.ToUpper() == TagName.ToUpper()) 436 | { 437 | RetString = (string)retNode.AttributeName; 438 | break; 439 | } 440 | } 441 | return RetString; 442 | } 443 | 444 | 445 | } 446 | 447 | /// 448 | /// A collection of WKT nodes 449 | /// 450 | public class WKTNodes : System.Collections.CollectionBase 451 | { 452 | private int Counter = 0; 453 | private string sLevel = ""; 454 | 455 | internal void Add(string Parent, string Name, string InnerText, string Parameters, string Level) 456 | { 457 | //create a new object 458 | string[] paramList; 459 | WKTNode objNewMember = default(WKTNode); 460 | objNewMember = new WKTNode(); 461 | WKTNodes Kids = new WKTNodes(); 462 | 463 | sLevel = Level; 464 | Counter++; 465 | 466 | //set the properties passed into the method 467 | objNewMember.TagName = Name.Replace("\"", ""); 468 | objNewMember.InnerText = InnerText; 469 | objNewMember.ParentName = Parent; 470 | objNewMember.Children = Kids; 471 | //if (Parent == "Top") 472 | //{ objNewMember.Level = Level; } 473 | //else 474 | objNewMember.Level = Level + "." + Counter.ToString(); 475 | 476 | 477 | if (Parameters != null) 478 | { 479 | paramList = Parameters.Split(','); 480 | if(paramList[0].StartsWith("\"")) 481 | {objNewMember.AttributeName = paramList[0].Replace("\"", "");} 482 | else 483 | {objNewMember.Attributes.Add(paramList[0].Trim());} 484 | for (int i = 1; i < paramList.Length; i++) 485 | { 486 | // TO DO: Because the paramList is an ArrayList there is no reason why everything has to be 487 | // Stored as a string. 488 | objNewMember.Attributes.Add(paramList[i].Replace("\"", "").Trim()); 489 | } 490 | } 491 | 492 | List.Add(objNewMember); 493 | 494 | while (InnerText != null) 495 | { 496 | int brkPos = InnerText.IndexOf("["); 497 | string valName = null; 498 | string subText = null; 499 | string param = null; 500 | if (brkPos > -1) 501 | { 502 | valName = (InnerText.Substring(0, brkPos)).Trim(); 503 | if (valName.Contains(",")) 504 | valName = (valName.Substring(valName.LastIndexOf(",") + 1)).Trim(); 505 | subText = LoadParameterFromWKT(valName, InnerText); 506 | InnerText = (InnerText.Substring(brkPos + 2 + subText.Length)).Trim(); 507 | if (InnerText.StartsWith(",")) 508 | InnerText = InnerText.Substring(1); 509 | InnerText = InnerText.Trim(); 510 | 511 | if (subText.Contains("[")) 512 | { 513 | brkPos = subText.IndexOf("["); 514 | brkPos = subText.LastIndexOf(",", brkPos); 515 | param = subText.Substring(0, brkPos).Trim(); 516 | } 517 | else 518 | { 519 | param = subText; 520 | subText = null; 521 | } 522 | } 523 | else 524 | { 525 | param = InnerText; 526 | InnerText = null; 527 | } 528 | if (InnerText == "") 529 | InnerText = null; 530 | 531 | objNewMember = (WKTNode)List[List.Count - 1]; 532 | objNewMember.hasChildren = true; 533 | objNewMember.Children.Add(objNewMember.TagName, valName, subText, param, objNewMember.Level); 534 | } 535 | 536 | } 537 | internal void Add(WKTNode addNode) 538 | { 539 | List.Add(addNode); 540 | } 541 | 542 | private string LoadParameterFromWKT(string Header, string WKTString) 543 | { 544 | if (Header == null) 545 | { return null; } 546 | int paramStart = WKTString.IndexOf(Header); 547 | if (paramStart < 0) 548 | { return null; } 549 | paramStart += Header.Length + 1; 550 | string tString = WKTString.Substring(paramStart); 551 | int paramEnd = tString.IndexOf("]"); 552 | int NoOfClosedBrks = 1; 553 | int NoOfOpenBrks = 0; 554 | 555 | while (NoOfClosedBrks != NoOfOpenBrks) 556 | { 557 | NoOfOpenBrks = 1; 558 | int brkPos = 0; 559 | do 560 | { 561 | // how many "[" are there between the start and the first closed brackets 562 | 563 | brkPos = tString.IndexOf("[", brkPos + 1); 564 | if (brkPos > -1 & brkPos < paramEnd) 565 | NoOfOpenBrks++; 566 | } 567 | while (brkPos > -1 & brkPos < paramEnd); 568 | if (NoOfOpenBrks != NoOfClosedBrks) 569 | { 570 | paramEnd = tString.IndexOf("]", paramEnd + 1); 571 | NoOfClosedBrks++; 572 | NoOfOpenBrks = 0; 573 | }; 574 | } 575 | 576 | return tString.Substring(0, paramEnd); 577 | } 578 | 579 | /// 580 | /// Well Know Text node by Index 581 | /// 582 | /// 583 | public WKTNode this[int Index] 584 | { 585 | get 586 | { 587 | return (WKTNode)List[Index]; 588 | } 589 | } 590 | /// 591 | /// Well Know Text node by Name 592 | /// 593 | /// 594 | public WKTNode this[string Name] 595 | { 596 | get 597 | { 598 | int retIndex = -1; 599 | for (int Index = 0; Index < List.Count; Index++) 600 | { 601 | WKTNode testField = (WKTNode)List[Index]; 602 | if (testField.TagName == Name.ToUpper()) 603 | { 604 | retIndex = Index; 605 | break; 606 | } 607 | } 608 | if (retIndex > -1) 609 | { return (WKTNode)List[retIndex]; } 610 | else 611 | { return null; } 612 | 613 | } 614 | } 615 | 616 | } 617 | 618 | /// 619 | /// A Node read from a WKT file 620 | /// 621 | public class WKTNode 622 | { 623 | private string mvarInnerText; 624 | private bool mvarhasInner; 625 | private string mvarParent; 626 | private string mvarName; 627 | private string mvarAttribName; 628 | private string mvarLevel; 629 | private WKTNodes mvarChildren; 630 | 631 | ArrayList mvarParams = new ArrayList(); 632 | 633 | /// 634 | /// The name of the Attribute 635 | /// 636 | public string AttributeName 637 | { 638 | get { return mvarAttribName; } 639 | set { mvarAttribName = value; } 640 | } 641 | /// 642 | /// The Text Tag 643 | /// 644 | public string TagName 645 | { 646 | get { return mvarName; } 647 | set { mvarName = value; } 648 | } 649 | /// 650 | /// Then Name of the Parnet 651 | /// 652 | public string ParentName 653 | { 654 | get { return mvarParent; } 655 | set { mvarParent = value; } 656 | } 657 | internal string Level 658 | { 659 | get { return mvarLevel; } 660 | set { mvarLevel = value; } 661 | } 662 | /// 663 | /// The Node Inner Text 664 | /// 665 | public string InnerText 666 | { 667 | get { return mvarInnerText; } 668 | set { mvarInnerText = value; } 669 | } 670 | /// 671 | /// Do any children nodes exist? 672 | /// 673 | public bool hasChildren 674 | { 675 | get { return mvarhasInner; } 676 | set { mvarhasInner = value; } 677 | } 678 | /// 679 | /// The attribute of the node 680 | /// 681 | public ArrayList Attributes 682 | { 683 | get { return mvarParams; } 684 | set { mvarParams = value; } 685 | } 686 | /// 687 | /// The children of the node 688 | /// 689 | public WKTNodes Children 690 | { 691 | get { return mvarChildren; } 692 | set { mvarChildren = value; } 693 | } 694 | 695 | } 696 | } 697 | -------------------------------------------------------------------------------- /bin/Release/ArcShapeFile.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosspickard/ArcShapeFile/b885396cd478a917883fd0e67734c618ea8e60d6/bin/Release/ArcShapeFile.dll -------------------------------------------------------------------------------- /bin/Release/ArcShapeFile.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosspickard/ArcShapeFile/b885396cd478a917883fd0e67734c618ea8e60d6/bin/Release/ArcShapeFile.pdb -------------------------------------------------------------------------------- /bin/Release/ArcShapeFile.tlb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rosspickard/ArcShapeFile/b885396cd478a917883fd0e67734c618ea8e60d6/bin/Release/ArcShapeFile.tlb --------------------------------------------------------------------------------