Closed joaosr closed 7 years ago
because javascript is case sensitive so .DBF is not the same as .dbf
I did one change on shp.js
file, I added in this code:
parsed = shp.combine([parseShp(zip[name + '.shp'], zip[name + '.prj']), zip[name + '.dbf']]);
parsed.fileName = name;
more this:
var _shp = zip[name + '.shp'] || zip[name + '.SHP'];
var _prj = zip[name + '.prj'] || zip[name + '.PRJ'];
var _dbf = zip[name + '.dbf'] || zip[name + '.DBF'];
parsed = shp.combine([parseShp(_shp, _prj), _dbf]);
parsed.fileName = name;
Now I can import file with uppercase extension.
we probably would need a more general solution that can deal with mixed case files as well e.g. .dbF
In my case the pattern .SHP is very common in Brazil. I am going work in a solution for that, i wish get some headway.
i looked into fixing this and remembered this code which is supposed to deal with just your problem, are you purchance using an older version ?
When use a file with name name.DBF or name.PRJ or name.SHP, parseShp doesn't work. why this happen?