I am trying to create a shapefile and a geojson using geopandas and fiona.
import fiona
import fiona.crs
…
geometry = [Point(xy) for xy in zip(df['longitude'],df['latitude'])]
crs = {'init': 'epsg:4326'}
gdf = GeoDataFrame(df, crs=crs, geometry=geometry)
some more stuffs and finally:
gdf.to_file('localization/shapefiles/localizaciones.shp', driver='ESRI Shapefile')
but the .prj file is in blank. Then the projection is wrong.
I am writing the content of the the .prj file after the file is created in blank, but the crs problems still in progress either in geojson file or gpx files. No crs is created
Best Answer
Found two solutions to have coordinate reference system defined in the output shapefile: Proj4 style mappings and WKT strings (source: Fiona). The OGC WKT strings can be found on spatialreference.