mapbox / shp-write

create and write to shapefiles in pure javascript
BSD 3-Clause "New" or "Revised" License
290 stars 186 forks source link

Attribute data rounded to nearest integer #38

Closed jcoombs20 closed 7 years ago

jcoombs20 commented 7 years ago

Values for attributes are rounded to the nearest integer for shapefile zip outputs which renders data such as probabilities meaningless. It would be great if this, and the parts problem with point data mentioned in the previous issue could be resolved. Otherwise, thanks for the package.

jvail commented 7 years ago

@jcoombs20 : that needs to be fixed in the dbf repo https://github.com/mapbox/dbf/. If you need a quick&dirty solution - as I do - just replace the 0 with e.g. 3 (no. decimals) here https://github.com/mapbox/dbf/blob/master/src/structure.js#L55.

jcoombs20 commented 7 years ago

Thanks jvail, that worked perfectly!

tmcw commented 7 years ago

Fixed in d5032aca48cd89e739f47b0b490cbe4657eadda5