nacholavarria
nacholavarria

Reputation: 1

geopandas.explore plot the wrong cordinates

I've been working on a georeferenced data set using geopandas library, when I use gdf.plot() the figure I get is right,in the sense that latitude and longitude of the POINTS being ploted match the background map. enter image description here

But when I use de gdf.explore() method, the points appear squished around the latitude= 0.0, longitude =0.0 coordinates. if I zoom in enough I can see the distribution kind of match my original data.

enter image description here

I tried to check for NaN on the coordinates of my original data set but there are no problems there.

Upvotes: 0

Views: 50

Answers (1)

Dimitris
Dimitris

Reputation: 36

The problem that you encounter maybe it derives from the projection of your geodataframe. The explore() method uses the crs EPSG:4327

First you can check your crs(Coordinate Reference System) by using:

  • print(yourgeodataframe.crs)

Then change your crs of your data frame to EPSG:4326 by:

  • yourgeodataframe = yourgeodataframe.to_crs('EPSG:4326')

Finally try the explore() method again.

Upvotes: 0

Related Questions