I think Folium uses EPSG3857 by default, but I have a custom .prj file that I need to use. Is there a way to load that in? I'm not reading in the projection file at all right now.

This is my current code:

gdf = gpd.read_file('test.shp')
# gdf_wgs84 = gdf.to_crs({'init': 'epsg:4326'})
gj = json.loads(gdf.to_json())
m = folium.Map(location=[36.6, -119.6], zoom_start=9, tiles=basemap)
folium.GeoJson(gj, style_function=lambda feature: {
    # 'fillColor': feature['properties']['RGBA'],
    # 'color' : feature['properties']['RGBA'],
    'weight' : 1,
    'fillOpacity' : 0,


# Save map
m.save(save_name("name", ".html"))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.