Re: [Qgis-user] Can not change page setting in Printer Composer (Roberto Herrero)

2019-01-06 Thread Roberto Herrero
I'd been trying to modify the settings in the Design-->Page setting   menu.

Following your recommendations I right-clicked on the page and everything
is OK now. I wonder what the purpose of Desing-->Page setting is.

Thank you very much for your help, Garth.

Roberto Herrero

El dom., 6 ene. 2019 a las 22:18, Garth Fletcher ()
escribió:

> Roberto Herrero wrote:
> >  ... I have changed orientation to portrait and saved the
> > modification. However, I get no effect on the page. ...
>
>
> Works OK here under Mac OS X 10.12.6
>
> In print composer, Ctrl-click on page brings up pop-up menu
> from which I select "Page Properties" to bring up a dialog
> where I can set size & orientation. This seems to be the only
> way to access that dialog - it doesn't appear in the normal
> Item Properties dialog.
>
> The settings are preserved when the layout is closed and later
> reopened.
>
> Tested with:
>   QGIS version 3.4.3-Madeira
>   Compiled against Qt 5.11.2
>   Compiled against GDAL/OGR 2.3.2
>   Compiled against GEOS 3.7.0-CAPI-1.11.0
> also tested with
>   QGIS version 3.4.1-Madeira
>   Compiled against Qt 5.11.1
>   Compiled against GDAL/OGR 2.3.2
>   Compiled against GEOS 3.7.0-CAPI-1.11.0
>
> Cordially,
> --
> Garth Fletcher
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Can not change page setting in Printer Composer

2019-01-06 Thread Roberto Herrero
I have defined a new Printer Composer. By default the page size is A4 with
landscape orientation. I have changed orientation to portrait and saved the
modification. However, I get no effect on the page. If I close the Printer
Composer Manager and open the composition again I get that the page
settings are restored to landscape. Same thing happens with any other
setting, like page size.

¿Has anybody observed this behavior?

I am using 3.4.0 Madeira on Fedora Linux.

Thank you very much,

Roberto Herrero
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] AGGREGATES parameter in qgis:aggregate algorithm

2018-12-20 Thread Roberto Herrero
I've been using algorithm qgis:singlepartstomultipart in QGIS 2.18, to pack
in multipart features all those features sharing the same 'LABEL' field.

I've found out that the algorithm is no longer available in QGIS 3. The
replacing algorithm seems to be qgis:aggregate, but it requires a parameter
called AGGREGATES, of the type ParameterAggregates. I have found no
documentation about this parameter in the PyQgis cookbook and no example on
the net.

Any help with this?

Thank you,
Roberto Herrero
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Attribute "cat" in grass7

2018-12-19 Thread Roberto Herrero
I've seen that the grass7 algorithms add an extra attribute called "cat". I
wonder if the behaviour of the algorithms can be modified not to show that
attribute.

Thank you,
Roberto Herrero
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] getFeatures() and fields()

2018-10-30 Thread Roberto Herrero
You are right, Nyall. The problem was the path of the vector layer.

Thank you,
Roberto

El lun., 29 oct. 2018 a las 23:54, Nyall Dawson ()
escribió:

> On Tue, 30 Oct 2018 at 06:39, Roberto Herrero 
> wrote:
> >
> > getFeatures() and fields() do not seem to work in Qgis3.2
>
> They 100% work -- if they didn't, QGIS wouldn't be good for anything
> except wasting some space on your computer ;)
>
> > # Open vector layer
> > LayerName = u'Vector_layer.shp'
> > VectorLayer = qgis.core.QgsVectorLayer(LayerName, 'mylayer', 'ogr')
>
> I suspect this is where the issue sits -- try checking
>
> assert VectorLayer.isValid()
>
> here. My suspicion is that your relative path 'Vector_layer.shp' is
> not working, and will need to be an absolute path.
>
> Nyall
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] getFeatures() and fields()

2018-10-29 Thread Roberto Herrero
getFeatures() and fields() do not seem to work in Qgis3.2

I'm running the following pyqgis script:

=
#!/usr/bin/python
# -*- coding: utf8 -*-

import qgis.core

# Open vector layer
LayerName = u'Vector_layer.shp'
VectorLayer = qgis.core.QgsVectorLayer(LayerName, 'mylayer', 'ogr')
# Get the list of features
featureList = []
for feature in VectorLayer.getFeatures():
featureList.append(feature)
print("Feature list size = " + str(len(featureList)))
# Make a list with the field names
fieldList = VectorLayer.fields()
print("Field list size = " + str(len(fieldList)))
for field in VectorLayer.fields():
print(field.name(), field.typeName())


Both the features and the field list have zero size. However, when loaded
manually, the vector layer contains fields and features.

Any idea?

Thank you very much,
Roberto Herrero
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Setting scale and center in map composer

2018-03-07 Thread Roberto Herrero
Hi QGIS users,

I 'm using PyQGIS to make a map in pdf format with QgsComposerMap, Qpainter
and Qprinter.

I want to set a scale 1:25000, and center the map view around a point with
given coordinates.

Can anybody tell me which commands should I use?

Thanks,
Roberto Herrero
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user