octave-maintainers
[Top][All Lists]
Advanced

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

Re: Octave GIS integration


From: Philip Nienhuis
Subject: Re: Octave GIS integration
Date: Thu, 18 Dec 2014 10:38:34 -0800 (PST)

Philip Nienhuis wrote
> 
> shash wrote
>> I recently found out there is no in-built functions for reading and
>> writing shape and geotiff files in Octave. I am currently doing a project
>> with a defense lab and I need these functions. I am willing to do it for
>> Octave.  Can somebody help me putting it inside Octave? 
> There's the m_Map package, http://www.eos.ubc.ca/~rich/private/
> Chances are it may well suit your needs.
> 
> It works (to some extent) in contemporary Octave, but at the time (a year
> ago or so) I could't link the output formats of e.g., m_shaperead to the
> tools and formats we have at work (developed for Matlab in the course of
> over a decade or more).
> 
> Incidentally, I've been busy with functions "shaperead", "shapeinfo",
> "shapeplot" the last weeks. My idea was to put them in the (currently
> unmaintained) mapping package and make a new release of that within a few
> weeks.
> Because "shapeplot" isn't ML-compatible and on request of Carnë, I've also
> made wrapper functions "mapshow" and "geoshow" with basic functionality.
> The function "dbfread" (required for shaperead) is in the just released io
> package version 2.2.5.
> 
> My shaperead as it stands can do a little more than ML's, it also reads
> ...M and ...Z shape variants and MultiPatch. I was busy with clipping for
> BoundingBox (ML doesn't do that either) but that is harder than I hoped as
> regards ..M and ...Z Point/Vertex values.
> Plotting presently only works for lines and polygon outlines, filled isn't
> possible yet (but half an hour of work will take care of the basics).

Just FYI: I've uploaded (pushed) what I have now to the mapping package repo
on octave.sf.net.

It's just able to read shapefiles and do some basic plotting, but AFAICS
shaperead.m and plotshape.m can do a little bit more than ML can (which
incidentally is the main reason I started writing it): support for M and Z
type shape features, MultiPatch and 3D plotting, plus clipping shapes on
bounding boxes - does not work for 3D (yet).

I haven't found a way to effectively speed up reading shapefiles as I
wouldn't know how to preallocate struct arrays when neither the total number
nor the individual element sizes (each one differently) can be assessed
beforehand.
So as soon as the shapefile size exceeds several MBs a noticeable slowdown
occurs.

I have a trick in mind for the non-ML compatible output but that will have
to wait. 
ML-compatible output (= struct arrays) do not support M/Z type shape
features nor MultiPatch so I don't tend to invest much in that.

Philip




--
View this message in context: 
http://octave.1599824.n4.nabble.com/Octave-GIS-integration-tp4667491p4667879.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.



reply via email to

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