[Qgis-developer] Help Needed in retrieving file path from the layer name

Carson Farmer carson.farmer at gmail.com
Tue May 18 10:25:36 EDT 2010


If you can get the map layer from the layer registry, then should be
able to use layer.source() (or layer.publicSource() to hide passwords)
to get the layer path information.

Carson

On Tue, May 18, 2010 at 3:04 PM, Bishwarup Banerjee
<bishwarup.banerjee at gmail.com> wrote:
> Dear All,
>
> Is there any way to get the entire file path from the layer name?
> For example:
>
> A user selects a layer inside a combobox, which in turn accesses the map
> layer registry.
> Now I want to know the full path of the layer selected.
> If the layer name through combobox is "xyz"
> Then I want to get "c:/aa/bb/xyz.shp" or the exact location of the layer, in
> the harddisk.
>
> Any help regarding this will be highly helpful and appreciated.
>
> With Warm Regards,
> Sonai
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>



-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/


More information about the Qgis-developer mailing list