octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #53422] [octave forge] (mapping) Corrupt outpu


From: anonymous
Subject: [Octave-bug-tracker] [bug #53422] [octave forge] (mapping) Corrupt output when writing polygons to shapefile with shapewrite
Date: Thu, 5 Apr 2018 09:07:30 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36

Follow-up Comment #15, bug #53422 (project octave):

I've just tried reading and writing SHP files with the latest shaperead,
shapewrite and dbfwrite functions. Everything seems to work correctly (the
geometry and attribute table are displayed correctly in QGIS). 

I'll let you know if I find any remaining issues.

Many thanks for the work.

For reference, I've attached the test files in a ZIP and the Octave test code
is below:



%% read / write points
s1 = shaperead('point_test_qgis.shp');
shapewrite(s1, 'point_test_octave.shp');
s2 = shaperead('point_test_octave.shp');

%% read / write lines
s1 = shaperead('line_test_qgis.shp');
shapewrite(s1, 'line_test_octave.shp');
s2 = shaperead('line_test_octave.shp');

%% read / write polygons
s1 = shaperead('polygon_test_qgis.shp');
shapewrite(s1, 'polygon_test_octave.shp');
s2 = shaperead('polygon_test_octave.shp');



As a side note, the code I used previously (... F1 = fread(fid1, inf,
'uint8'); ...) which read the SHP and SHX files into an uint8 array was just
used to compare the files, not to extract meaningful attribute values (which
obviously requires parsing according to the file specification).

(file #43809)
    _______________________________________________________

Additional Item Attachment:

File name: octave_mapping_test.zip        Size:3 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?53422>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]