Jacqueline de Cortez
Jacqueline de Cortez

Reputation: 51

Not understanding how work with "urn:ogc:def:crs:OGC:1.3:CRS84" in geopandas

I have this geojason file

{
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "visit_date": "2013-03-27Z", "name": "Mayi-Tatu", "n_workers": 150.0, "mineral": "Gold" }, "geometry": { "type": "Point", "coordinates": [ 29.66033, 1.01089 ] } },
{ "type": "Feature", "properties": { "visit_date": "2013-03-27Z", "name": "Mabanga", "n_workers": 115.0, "mineral": "Gold" }, "geometry": { "type": "Point", "coordinates": [ 29.65862, 1.00308 ] } },
{ "type": "Feature", "properties": { "visit_date": "2013-03-27Z", "name": "Molende", "n_workers": 130.0, "mineral": "Gold" }, "geometry": { "type": "Point", "coordinates": [ 29.65629, 0.98563 ] } },
...
{ "type": "Feature", "properties": { "visit_date": "2017-08-31Z", "name": "Kambasha", "n_workers": 37.0, "mineral": "Cassiterite" }, "geometry": { "type": "Point", "coordinates": [ 29.05973167, -2.25938167 ] } }
]
}

I read this file, with the next code:

filename = "ipis_cod_mines.geojson"
df_congomines_crs84_geo = gpd.read_file(filename)

But when I check the crs property of df_congomines_crs84_geo,

df_congomines_crs84_geo.crs

I got "{'init': 'epsg:4326'}", I don't understand why i don't get the right crs. (first question)

After, I read another dataset for the same area (both data belongs to congo)

df_countries_4326_geo = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))

This dataset has crs equal to {'init': 'epsg:4326'}. When i plot both datasets (without change the crs),

ax = congo_df.plot(alpha=0.5, color='brown', figsize=(11,4))
df_congomines_crs84_geo.plot(ax=ax, column='mineral')
plt.show()

I got the next image: Image result

Why both image are not overlaped if they belong to the same area??? How can I fix it??? Is this problem related to the UTM zone???(second question)

Upvotes: 3

Views: 1172

Answers (1)

Jool
Jool

Reputation: 1785

CRS84 is equivalent to WGS84 for which the standard EPSG code is EPSG:4326. CRS84 was defined in an old geojson spec (2008). Reading a geojson file gives EPSG:4326 as the CRS.

Upvotes: 0

Related Questions