makinacorpus / Leaflet.FileLayer

Loads files locally (GeoJSON, KML, GPX) as layers using HTML5 File API
http://makinacorpus.github.io/Leaflet.FileLayer/
MIT License
273 stars 91 forks source link

Add shapefile support #7

Open leplatrem opened 11 years ago

leplatrem commented 11 years ago

See https://github.com/calvinmetcalf/leaflet.shapefile

leplatrem commented 10 years ago

Drag & Drop a Shapefile, get a Geojson map : https://github.com/daguar/shapefile-to-webmap/

Luen commented 3 years ago

This fork supports shapefiles - https://github.com/vamsiampolu/Leaflet.FileLayer

melanievt commented 5 months ago

The one @Luen shared is really good. However, it has a drawback which is only one zipped shapefile can be uploaded. When you try to upload a second zipped shapefile, you unfortunately get no response : ( Interestingly, this doesn't apply to GeoJson uploads. You can upload as many GeoJson files as you want successively without refreshing the page🤷🏼‍♀️

camillemonchicourt commented 5 months ago

I think that things changed about GIS files formats since this issue was initially created.

If we should add the support for GIS files, I would rather choose an opensource and stronger format such as Geopackage (.gpkg).

Several tools are moving from .SHP to .GPKG.

http://switchfromshapefile.org/

We initially choose to focus on format easy to manage server side, and thought it was easy to convert a shapefile or Geopackage file into Geojson with softwares such as QGIS.

But why not manage a GIS format such as GPKG.

melanievt commented 5 months ago

I'm a supporter of using open formats so completely agree that GPKG can be a good option @camillemonchicourt. To be honest, GeoJson is also enough to meet my needs. However, as indicated in the link you shared, the answer to your question is "ESRI Shapefile has been around since the early 1990s and is still the most commonly used vector data exchange format." The majority still tend to use this format, therefore SHP flexibility is somehow required🤷🏼‍♀️

camillemonchicourt commented 5 months ago

It's time to move from SHP to GPKG. If we all implement SHP in our tools, it will never change. 🤔 QGIS is now privileging GPKG.