Giter Club home page Giter Club logo

Comments (5)

calvinmetcalf avatar calvinmetcalf commented on August 22, 2024

because javascript is case sensitive so .DBF is not the same as .dbf

from shapefile-js.

joaosr avatar joaosr commented on August 22, 2024

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.

calvinmetcalf avatar calvinmetcalf commented on August 22, 2024

we probably would need a more general solution that can deal with mixed case files as well e.g. .dbF

from shapefile-js.

joaosr avatar joaosr commented on August 22, 2024

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.

calvinmetcalf avatar calvinmetcalf commented on August 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.