[Qgis-user] Announcing ProfileFromLine plugin

Benoit de Cabissole benoit at exigesa.com
Sat Aug 14 06:24:35 PDT 2010


Hello Ricardo,

The usefulness of your plugin is very high. Thanks.

While testing it I've got the following error:

====================================
An error has occured while executing Python code:

Traceback (most recent call last):
  File "C:/.qgis/python/plugins\ProfileFromLine\ProfileFromLineDialog.py", line 43, in accept
    params["interval"], self.ui.progressBar)
  File "C:/.qgis/python/plugins\ProfileFromLine\ProfileFromLine.py", line 129, in create_profile_layer
    fieldMapper, rasterLayers, rasterFieldsStart)
  File "C:/.qgis/python/plugins\ProfileFromLine\ProfileFromLine.py", line 179, in create_new_point
    shapelyPoint = shapelyLine.interpolate(distanceFromLine, normalized)
AttributeError: 'LineString' object has no attribute 'interpolate'

Python version:
2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]


QGIS version:
1.6.0-Trunk Trunk, 14077M
====================================

Any idea why?
The line shapefile in input contains 2 lines (many km long).
The error is the same if I want to only create the points in-memory or if I want to extract raster values from a bunch of rasters.


Another thing, could you tell what is the unit of Sampling interval you are using? Is it in the project units (m, feet, ...) or is it in another unit (the default, 4.00, seems very small to be in metres, but it would depend on the type of project, I suppose)? Also, the sampling interval is limited to 99.99, again, if in the project units, this is a serious limitation. Could you use an 'open' sampling interval?


Cheers,
Benoit



> -----Original Message-----
> From: qgis-user-bounces at lists.osgeo.org
> [mailto:qgis-user-bounces at lists.osgeo.org]On Behalf Of Ricardo Filipe
> Soares Garcia da
> Sent: Friday, 13 August 2010 22:53
> To: qgis-user
> Subject: [Qgis-user] Announcing ProfileFromLine plugin
> 
> 
> Hello list
> 
> I have uploaded a new python plugin called ProfileFromLine.
> This plugin will generate points along lines according to a user
> specified interval and will optionally sample loaded raster(s) at each
> new point's location.
> 
> Each new point will keep all the attributes of its originating line,
> plus any raster values that it had been asked to sample. In addition,
> every point will have a distinct attribute and also an attribute that
> stores the distance along its line since the beginning (the line's
> starting point being according to the original digitizing direction).
> 
> the new points layer is created using the 'memory' provider, and the
> user must manually save it to disk. this seemed like a nice option,
> because you can choose your desired format upon saving.
> 
> The plugin depends on the shapely python package, so you must have it
> installed and accessible on your system. This shouldn't be much of a
> problem on linux and windows (it is available on the osgeo4w packages
> as well). since I don't have a Mac I wouldn't know how easy it is to
> get shapely installed, but I trust it to be just as easy ;)
> 
> I hope that it is useful. Please drop me a message through this
> mailing list if you have any suggestions.
> 
> -- 
> ___________________________ ___ __
> Ricardo Garcia Silva
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
> 




More information about the Qgis-user mailing list