Giter Site home page Giter Site logo

Comments (3)

Joxit avatar Joxit commented on June 13, 2024

Oh, I found something else, I did the same for the .shp, in the spec from ESRI page 9/34 they said that record numbers begin at 1.
With hexyl, shapefile-rs begin at 0 and not 1 (check the line 00000060).

hexyl  test.shp
ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
ā”‚00000000ā”‚ 00 00 27 0a 00 00 00 00 ā”Š 00 00 00 00 00 00 00 00 ā”‚00'_0000ā”Š00000000ā”‚
ā”‚00000010ā”‚ 00 00 00 00 00 00 00 00 ā”Š 00 00 00 6e e8 03 00 00 ā”‚00000000ā”Š000nƗā€¢00ā”‚
ā”‚00000020ā”‚ 05 00 00 00 00 00 00 00 ā”Š 00 e8 27 c0 ae cd 88 e7 ā”‚ā€¢0000000ā”Š0Ɨ'ƗƗƗƗƗā”‚
ā”‚00000030ā”‚ c0 f3 3f 40 00 00 00 00 ā”Š 00 a4 3f 40 ab 2c fb 50 ā”‚Ć—Ć—?@0000ā”Š0Ɨ?@Ɨ,ƗPā”‚
ā”‚00000040ā”‚ 39 49 4b 40 00 00 00 00 ā”Š 00 00 00 00 00 00 00 00 ā”‚9IK@0000ā”Š00000000ā”‚
ā”‚00000050ā”‚ 00 00 00 00 00 00 00 00 ā”Š 00 00 00 00 00 00 00 00 ā”‚00000000ā”Š00000000ā”‚
ā”‚00000060ā”‚ 00 00 00 00 00 00 00 00 ā”Š 00 00 00 38 05 00 00 00 ā”‚00000000ā”Š0008ā€¢000ā”‚
ā”‚00000070ā”‚ 00 00 00 00 00 e8 27 c0 ā”Š ae cd 88 e7 c0 f3 3f 40 ā”‚00000Ɨ'Ɨā”ŠĆ—Ć—Ć—Ć—Ć—Ć—?@ā”‚
ā”‚00000080ā”‚ 00 00 00 00 00 a4 3f 40 ā”Š ab 2c fb 50 39 49 4b 40 ā”‚00000Ɨ?@ā”ŠĆ—,ƗP9IK@ā”‚
ā”‚00000090ā”‚ 01 00 00 00 04 00 00 00 ā”Š 00 00 00 00 00 00 00 00 ā”‚ā€¢000ā€¢000ā”Š00000000ā”‚
ā”‚000000a0ā”‚ 00 e0 00 c0 ab 2c fb 50 ā”Š 39 49 4b 40 00 00 00 00 ā”‚0Ɨ0ƗƗ,ƗPā”Š9IK@0000ā”‚
ā”‚000000b0ā”‚ 00 a4 3f 40 52 f7 77 fc ā”Š 35 0b 46 40 00 00 00 00 ā”‚0Ɨ?@RƗwƗā”Š5ā€¢F@0000ā”‚
ā”‚000000c0ā”‚ 00 e8 27 c0 ae cd 88 e7 ā”Š c0 f3 3f 40 00 00 00 00 ā”‚0Ɨ'ƗƗƗƗƗā”ŠĆ—Ć—?@0000ā”‚
ā”‚000000d0ā”‚ 00 e0 00 c0 ab 2c fb 50 ā”Š 39 49 4b 40             ā”‚0Ɨ0ƗƗ,ƗPā”Š9IK@    ā”‚
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
hexyl  qgis.shp
ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
ā”‚00000000ā”‚ 00 00 27 0a 00 00 00 00 ā”Š 00 00 00 00 00 00 00 00 ā”‚00'_0000ā”Š00000000ā”‚
ā”‚00000010ā”‚ 00 00 00 00 00 00 00 00 ā”Š 00 00 00 6e e8 03 00 00 ā”‚00000000ā”Š000nƗā€¢00ā”‚
ā”‚00000020ā”‚ 05 00 00 00 00 00 00 00 ā”Š 00 e8 27 c0 ae cd 88 e7 ā”‚ā€¢0000000ā”Š0Ɨ'ƗƗƗƗƗā”‚
ā”‚00000030ā”‚ c0 f3 3f 40 00 00 00 00 ā”Š 00 a4 3f 40 ab 2c fb 50 ā”‚Ć—Ć—?@0000ā”Š0Ɨ?@Ɨ,ƗPā”‚
ā”‚00000040ā”‚ 39 49 4b 40 00 00 00 00 ā”Š 00 00 00 00 00 00 00 00 ā”‚9IK@0000ā”Š00000000ā”‚
ā”‚00000050ā”‚ 00 00 00 00 00 00 00 00 ā”Š 00 00 00 00 00 00 00 00 ā”‚00000000ā”Š00000000ā”‚
ā”‚00000060ā”‚ 00 00 00 00 00 00 00 01 ā”Š 00 00 00 38 05 00 00 00 ā”‚0000000ā€¢ā”Š0008ā€¢000ā”‚
ā”‚00000070ā”‚ 00 00 00 00 00 e8 27 c0 ā”Š ae cd 88 e7 c0 f3 3f 40 ā”‚00000Ɨ'Ɨā”ŠĆ—Ć—Ć—Ć—Ć—Ć—?@ā”‚
ā”‚00000080ā”‚ 00 00 00 00 00 a4 3f 40 ā”Š ab 2c fb 50 39 49 4b 40 ā”‚00000Ɨ?@ā”ŠĆ—,ƗP9IK@ā”‚
ā”‚00000090ā”‚ 01 00 00 00 04 00 00 00 ā”Š 00 00 00 00 00 00 00 00 ā”‚ā€¢000ā€¢000ā”Š00000000ā”‚
ā”‚000000a0ā”‚ 00 e0 00 c0 ab 2c fb 50 ā”Š 39 49 4b 40 00 00 00 00 ā”‚0Ɨ0ƗƗ,ƗPā”Š9IK@0000ā”‚
ā”‚000000b0ā”‚ 00 a4 3f 40 52 f7 77 fc ā”Š 35 0b 46 40 00 00 00 00 ā”‚0Ɨ?@RƗwƗā”Š5ā€¢F@0000ā”‚
ā”‚000000c0ā”‚ 00 e8 27 c0 ae cd 88 e7 ā”Š c0 f3 3f 40 00 00 00 00 ā”‚0Ɨ'ƗƗƗƗƗā”ŠĆ—Ć—?@0000ā”‚
ā”‚000000d0ā”‚ 00 e0 00 c0 ab 2c fb 50 ā”Š 39 49 4b 40             ā”‚0Ɨ0ƗƗ,ƗPā”Š9IK@    ā”‚
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”“ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜

from shapefile-rs.

tmontaigu avatar tmontaigu commented on June 13, 2024

Hey, thank you for taking the time to report an error.

There was indeed 2 problems:

  • The shape began from 0
  • The shape offset written in the index file was not in '16 bit words' length

With the code from #7 the file written by your test can actually be shown by QGIS

from shapefile-rs.

Joxit avatar Joxit commented on June 13, 2024

Thank you for your fast response and fix ! šŸ˜„

Yes ! The PR fix my issue ! šŸŽ‰

from shapefile-rs.

Related Issues (12)

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.