Is it possible to generate the geoJSON object from the .shp file?
I think currently it's only possible to generate an array of geometries from the .shp file using: shp.parseShp(). It would be helpful to have a method that return the geoJSON object directly. It could be similar to the combine function but the .dbf file shouldn't be mandatory.
shp.combine = function(arr) {
var out = {};
out.type = 'FeatureCollection';
out.features = [];
var i = 0;
var len = arr[0].length;
while (i < len) {
out.features.push({
'type': 'Feature',
'geometry': arr[0][i],
// 'properties': arr[1][i] <- it shouldn't be mandatory
});
i++;
}
return out;
};
Is it possible to generate the geoJSON object from the .shp file?
I think currently it's only possible to generate an array of geometries from the .shp file using: shp.parseShp(). It would be helpful to have a method that return the geoJSON object directly. It could be similar to the combine function but the .dbf file shouldn't be mandatory.