I am trying to convert my shapefile to GeoJSON using the below code snippet:
StringWriter writer = new StringWriter(); String geoJson = null; FeatureJSON fjson = new FeatureJSON(); fjson.writeFeatureCollection(col, writer);
This works fine for small shapefiles but when I try to convert a file that is of 54 MB the system gets hung.
What should I do differently? Or is there another approach to convert big shapefiles to GeoJSON?