bugGNU Octave - Bugs: bug #46298, Geostruct/Mapstruct not compatible...

 
 

bug #46298: Geostruct/Mapstruct not compatible with MATLAB

Submitter:  None
Submitted:  Mon 26 Oct 2015 12:39:49 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  philipnienhuis
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * other
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 19 Dec 2015 10:52:19 PM UTC, comment #4: 

No reaction from OP for almost 2 months.
Fixed in the mean time in repo.

Closing report.

Philip Nienhuis <philipnienhuis>
Group Member
Tue 27 Oct 2015 07:31:16 PM UTC, comment #3: 

Better try this version of shapewrite.m (Lat/Lon mix-up fixed).

(file #35316)

Philip Nienhuis <philipnienhuis>
Group Member
Mon 26 Oct 2015 10:30:30 PM UTC, comment #2: 

Just try with the attached shaperead.m and shapewrite.m and report back.

Do:
which ("shaperead")
to find out where to put the files.


(file #35308, file #35309)

Philip Nienhuis <philipnienhuis>
Group Member
Mon 26 Oct 2015 09:34:21 PM UTC, comment #1: 

Matlab-compatibility of the GIS file functions in the OF mapping package hasn't received much testing.  I wrote most of these functions for my own use, when adding them to the mapping package it was (strongly) suggested to make them ML-compatible but I hit a few obstacles there, most prominently a lack of reference, i.e., no ML mapping toolbox at hand.
So the structure of the Matlab-compatible outputs had to be inferred as good as possible from the on-line ML mapping package docs.
Therefore glitches are to be expected, sorry for that.

It would help if someone could provide examples of some simple geostructs, mapstructs and symbolspecs (in .mat file(s)) made using ML's mapping toolbox. Then I (or maybe someone else who likes to help) can try to make the relevant functions more Matlab compatible.

shapewrite.m can only write structs with X and Y coordinates, not Lat and Lon; Lat and Lon fields are written as X,Y coordinates. See "help shapewrite" - there it is clearly explained what fields are required.

I've changed a few fields (release, OS, Item group) in the bug report.

Philip Nienhuis <philipnienhuis>
Group Member
Mon 26 Oct 2015 12:39:49 PM UTC, original submission:  

I am trying to use the mapping toolbox to create shapefiles from data. As a test i tried to use the example for creating a geostruct containing point data provided by MATLAB, please see attached script.
When trying to use shapewrite, I get
shapewrite(Cities,'Cities')
error: shapewrite: unsupported struct type.

Adding a BoundingBox Field leads to error messages concerning Lat,Lon fields, see file 2.

Changing Lan,Lot to X,Y seems to do the trick but then the shp file seems to be weird. At least I cannot display anything in Qgis..

Maybe I'm only missing a detail, but if someone could provide a working example on how to create a working geostruct that would be very helpful..

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #35316:  shapewrite.m added by philipnienhuis (10KiB - application/vnd.wolfram.mathematica.package)
file #35308:  shaperead.m added by philipnienhuis (37KiB - application/vnd.wolfram.mathematica.package)
file #35309:  shapewrite.m added by philipnienhuis (10KiB - application/vnd.wolfram.mathematica.package)
file #35299:  geostructtest.m added by None (850B - application/binary)
file #35300:  geostructtest2.m added by None (914B - application/binary)
file #35301:  geostructtest3.m added by None (910B - application/binary)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only group members can vote.

 

Follow 13 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2015-12-19 philipnienhuis StatusIn Progress Fixed
    Open/ClosedOpen Closed
2015-10-27 philipnienhuis Attached File- Added shapewrite.m, #35316
2015-10-26 philipnienhuis StatusNone In Progress
    Assigned toNone philipnienhuis
2015-10-26 philipnienhuis Attached File- Added shaperead.m, #35308
    Attached File- Added shapewrite.m, #35309
2015-10-26 philipnienhuis Item GroupIncorrect Result Matlab Compatibility
    Release3.8.2 other
    Operating SystemGNU/Linux Any
2015-10-26 None Attached File- Added geostructtest.m, #35299
    Attached File- Added geostructtest2.m, #35300
    Attached File- Added geostructtest3.m, #35301

Back to the top

Powered by Savane 3.13-caa5.
Corresponding source code