Comments (5)
because javascript is case sensitive so .DBF is not the same as .dbf
from shapefile-js.
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.
from shapefile-js.
we probably would need a more general solution that can deal with mixed case files as well e.g. .dbF
from shapefile-js.
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.
from shapefile-js.
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 ?
from shapefile-js.
Related Issues (20)
- I get wrong coordinates when converting shapefiles with "EPSG:2100" - GGRS87 / Greek Grid - Projection
- Projected small demo doesn't work: Invalid URL HOT 1
- coordinates must be finite numbers HOT 4
- Problem with instanceof check HOT 3
- It removes metadata as name and id from shapefile
- global is undefined HOT 1
- British National Grid prj - I don't know that shp type HOT 6
- Can't read the data of 'the loaded zip file
- after npm install, how to import shp API? HOT 1
- Still do not support Projected coordinate system? HOT 2
- Opening shp produces wrong coordinates for "EPSG:2039" - Israel 1993 / Israeli TM Grid
- UI Issue
- Can't parse shapefile zip
- Error: nodebuffer is not supported by this platform HOT 5
- Vulnerability with jszip before 3.8.0 HOT 1
- nodebuffer is not supported by this platform HOT 2
- Coordinates not converted to ESPG:4326
- Error using in Vue3 HOT 3
- TypeError: Right-hand side of 'instanceof' is not an object HOT 3
- big number double error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shapefile-js.