0

我正在使用一个名为college3

college3 = gpd.GeoDataFrame(pd.read_table('data.txt'),crs = {'init': 'epsg:4269'})

shape专栏最初采用以下格式编写:

country type    color   relver  shape   _imported   _dataset    uniq_id pop
67  10  1781    1788    166452  Lesley University   Art Institute of  Boston    700 Beacon Street   Boston  MA  2215    ... 25025   USA 4-Year, Private 10  1.13.3  0106000020157C01000100000001030000000100000005...   2013-09-24 09:14:10 2013-01-01 00:00:00 d7a43fd5b64ce70481de5e6f057e99f4    480.694851
68  10  1995    2002    165167  Cambridge College   Main Campus 1000 Massachusetts Avenue, Suite 31 Cambridge   MA  2138    ... 25017   USA 4-Year, Private 0   1.13.3  0106000020157C01000200000001030000000100000005...   2013-09-24 09:14:10 2013-01-01 00:00:00 b57a1f68ea10a72ec9f53fece669f2cb    8942.000000
69  10  1025    1026    166513  University of Massachusetts Lowell  UML South   1 Solomont Way  Lowell  MA  1854    ... 25017   USA NaN 5   1.13.3  0106000020157C01000100000001030000000100000021...   2013-09-24 09:14:10 2013-01-01 00:00:00 a961b9066a579a5d6d56a0e91f3ce1be    10456.345189
70  10  509 509 164924  Boston College  Newton Campus   885 Centre Street   Newton Centre   MA  2459    ... 25017   USA NaN 10  1.13.3  0106000020157C01000100000001030000000100000030...   2013-09-24 09:14:10 2013-01-01 00:00:00 d8f31b0bde7553d795bd68ba697c6b5c    5589.823847
72  10  2160    2167    167376  Northern Essex Community College    Main    100 Elliot Street   Haverhill   MA  1843    ... 25009   USA 2-Year, Public  0   1.13.3  0106000020157C0100010000000103000000010000007F...   2013-09-24 09:14:10 2013-01-01 00:00:00 dc686ca64b68ad0e18137f576caee96a    19264.000000

我通过执行以下操作转换了十六进制形状:

college3['geometry'] = np.nan
for i in range(0, len(college3)):
    college3['geometry'].iloc[i] = shapely.wkb.loads(hex=True,data=college3['shape'].iloc[I])

这产生了一个新的college3['geometry']

0    (POLYGON ((1045282.478239882 1257128.653710355...
1    (POLYGON ((1114508.897557752 1243969.445296504...
2    (POLYGON ((1023386.780084164 1265306.580706236...
3    (POLYGON ((1043605.376445292 1281471.656769202...
4    (POLYGON ((1064893.875765753 1254220.62727893,...

但是,我想投影college3['geometry']epsg=4269. 当我尝试

college3 = college3.to_crs(epsg=4269)
college3['geometry'].head()

我得到相同的结果:

0    (POLYGON ((1045282.478239882 1257128.653710355...
1    (POLYGON ((1114508.897557752 1243969.445296504...
2    (POLYGON ((1023386.780084164 1265306.580706236...
3    (POLYGON ((1043605.376445292 1281471.656769202...
4    (POLYGON ((1064893.875765753 1254220.62727893,...

如何将我的更改college3['geometry']为 lat long epsg=4269?我将不胜感激任何帮助

4

0 回答 0