Newbe help on getting from polygon shape file to Leaflet polygon

498 views Asked by At

Learning Leaflet. Had success with point data. Now want to create polygons.

The process starts with an Access record with a Parcel Identification Number. Using ArcMap desktop, the records are joined to a parcel shape file for the county.

What the best approach to get to Leaflet polygons from here? Like with point data, do I need to add fields to contain the lat/lon data?

I don't need a lot of detail; just a pointer in the right direction. I don't mind doing homework.

1

There are 1 answers

7
sfletche On BEST ANSWER

My approach would be to convert the shapefile to geojson and then load the geojson into your Leaflet map.

I'm aware of some ArcGIS plugins to export geojson, but an alternative approach is to use the command line tool GDAL (ogr2ogr).

See the links on this answer for more details, but the command will end up being something like the following...

ogr2ogr -f GeoJSON -t_srs "EPSG:4326" [name][.geojson|.json] [name].shp

From there you can preview the results in geojson.io or github before creating your Leaflet map.