Re: [Qgis-user] Projections

2020-10-21 Thread Hernán De Angelis

Mike


For measuring the kind of distances you are mentioning I would suggest 
using ellipsoidal (geodetic) distances rather than projected distances. 
This is because projected distances can become very inaccurate over 
large regions (depending on the particular projection of course).



If measuring areas is important consider an equal area projection, like 
Albers for example, not a conformal one like Lambert.



Hope this helps.


/H.




On 2020-10-22 07:43, MIKE MCGRADY wrote:
I have data on tracked migratory birds, and want accurate measures of 
distance travelled during migration and areas of summering and 
wintering ranges.  These birds are summering in central Asia (mostly 
Kazakhstan and southern Russia), and wintering in Arabia.  Any advice 
on which projection to use?  My guess is Lambert conformal conic.  I'd 
really like to avoid using different projections for different phases 
of the birds' annual cycle, unless absolutely necessary.


M. J. McGrady
Am Rosenhugel 59
A-3500 Krems
Austria

___
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

Re: [Qgis-user] clip geojason QGIS

2020-10-21 Thread Charles Dixon-Paver
>  Convert it to a geopackage first -- geojson is a HORRIBLE format for
large datasets like this, as it's completely unoptimised and has no spatial
index

Just want to add that shapefile itself has size limitations and is not a
good format for these types of large datasets (or anything really), so I
definitely recommended using gpkg.

On Thu, 22 Oct 2020 at 03:52, Nicolas Cadieux 
wrote:

> Hi,
>
> If the clipping operations takes too much time, you could try a spatial
> query. Once you have a field with the states for each building, then you
> can split the file with that field. This may, or may not be faster. Maybe
> also be a problem with building sitting on the border.
>
> Nicolas Cadieux
>
> > Le 21 oct. 2020 à 20:28, Nyall Dawson  a écrit :
> >
> > On Thu, 22 Oct 2020 at 10:23, Nyall Dawson 
> wrote:
> >>
> >>> On Thu, 22 Oct 2020 at 10:15,  wrote:
> >>>
> >>> Nyall,
> >>>
> >>> Thanks for your quick reply. Would I load it first and then save the
> layer as a geopackage to do that? Or do I have to do something more
> elaborate?
> >>
> >> I'd do it from the QGIS browser panel -- right click on the geojson
> >> file and save as.
> >
> > Just to clarify -- that's the "export" option, not "save as".
> >
> > Nyall
> >
> > That'll save some of the initial time required to
> >> load this into QGIS.
> >>
> >> (alternatively the fastest way to convert would be to use ogr2ogr
> >> directly from the command line, if you're comfortable with that!)
> >>
> >> Nyall
> >>
> >>>
> >>> Cheers
> >>>
> >>> Dr Iain Stuart
> >>> JCIS Consultants
> >>> P.O. Box 2397
> >>> Burwood North
> >>> NSW, 2134
> >>>
> >>> (02) 9701 0191
> >>> (0413) 380116 (m)
> >>>
> >>> -Original Message-
> >>> From: Nyall Dawson 
> >>> Sent: Thursday, 22 October 2020 10:41 AM
> >>> To: i...@jcis.net.au
> >>> Cc: qgis-user 
> >>> Subject: Re: [Qgis-user] clip geojason QGIS
> >>>
> >>> On Thu, 22 Oct 2020 at 09:33,  wrote:
> 
>  It seems that Microsoft (of all people) is creating this database of
> building shapes for the known universe. They recently completed Australia
> and made it available. It is in a zipped geojason file – a format that I
> have no idea about.
> 
> 
> 
>  I have loaded it to QGIS and it is huge. It took over 30min to load
> and it takes about 10min to redraw every time and I am not running it on a
> Pentium 4 with 8bits of ram either.
> >>>
> >>> Convert it to a geopackage first -- geojson is a HORRIBLE format for
> large datasets like this, as it's completely unoptimised and has no spatial
> index. Effectively on every redraw QGIS is having to loop through the
> entire 6gb geojson file every time! ouch
> >>>
> >>> Nyall
> >>>
> >>>
> >>>
> 
> 
> 
>  I would like to clip the data to the states of Australia which I have
> a vector files or maybe regions in order to get the dataset smaller so it
> can be more usable.
> 
> 
> 
>  Can you clip geojason files ? or would I have to covert them into
> something like shapefiles? Any ideas on a workflow to do this?
> 
> 
> 
>  BTW I am running an I7-8700 with 16mb RAM and a NVIDIA Quadro P2000.
> 
> 
> 
>  Cheers
> 
> 
> 
>  Dr Iain Stuart
> 
>  JCIS Consultants
> 
>  P.O. Box 2397
> 
>  Burwood North
> 
>  NSW, 2134
> 
> 
> 
>  (02) 9701 0191
>  (0413) 380116 (m)
> 
> 
> 
>  ___
>  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 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

Re: [Qgis-user] Projections

2020-10-21 Thread Paolo Cavallini
I'd suggest using PostGIS>Geography data type.
Cheers.

Il 22/10/20 07:43, MIKE MCGRADY ha scritto:
> I have data on tracked migratory birds, and want accurate measures of
> distance travelled during migration and areas of summering and wintering
> ranges.  These birds are summering in central Asia (mostly Kazakhstan
> and southern Russia), and wintering in Arabia.  Any advice on which
> projection to use?  My guess is Lambert conformal conic.  I'd really
> like to avoid using different projections for different phases of the
> birds' annual cycle, unless absolutely necessary.  
> 
> M. J. McGrady
> Am Rosenhugel 59
> A-3500 Krems
> Austria
> 
> ___
> 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
> 

-- 
Paolo Cavallini
www.faunalia.eu - QGIS.org
training, support, development on QGIS, PostGIS and more
___
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] Shared/common library for PyQGIS scripts

2020-10-21 Thread Nyall Dawson
On Tue, 20 Oct 2020 at 19:40, Raymond Nijssen  wrote:
>
> If the code snippets are not suitable for the cookbook (because they are
> too odd cases and/or they do not match the cookbook chapters) and you
> decide to put them anywhere else, it would be good practice to add the
> QGIS version number somewhere.

If I can make one other suggestion here, it's that someone manages the
collection of scripts with an "iron fist"!

I've seen previous efforts in collecting PyQGIS helper functions tend
to bloat out and become unmanageable because they end up being a
random collection of very mixed quality and utility. I would
personally attribute this to the collection's maintainers being too
friendly, and accepting the majority of contributions sent in. While
it doesn't sound nice to phrase it this way I think having someone be
very picky and selective about the quality and type of submissions
which are permitted into the collection is ultimately a good thing.

Specifically, I'd suggest putting some firm guidelines in place about
what's acceptable, so that submitters know upfront about what type of
scripts will be accepted and there's no misunderstanding. Some ideas
could be:

- No scripts which duplicate inbuilt PyQGIS (or PyQt) functionality.
(E.g. no scripts for a slightly different way of retrieving project
layers vs what QgsProject gives, no reimplementation of built in
widgets such as field selection combo boxes, etc).
- Scripts should rely as heavily as possible on existing PyQGIS
methods in order to minimise the amount of Python code required
- Since it's a PyQGIS based collection, scripts should use QGIS
classes wherever possible, even if the result might be less
performant. E.g. no use of other libraries like shapely, rasterio,
pandas, raw gdal calls, use QgsNetworkAccessManager instead of the
python requests library, etc. If a script is designed to use these
libraries then I'd suggest having a separate collection for them!

Just my 2c :)
Nyall


>
> Raymond
>
> On 20-10-2020 11:20, Charles Dixon-Paver wrote:
> > I agree that the cookbook is a great resource (which is why I put it
> > first on my list), but I think it's better suited to general examples
> > and giving a solid outline of the best practices. If it's not kept
> > concise, it could become a bit of a convoluted mess, in addition to all
> > the broken code issues Richard raises.
> >
> > As much as it provides a place for scripts that have common use cases,
> > there are some scripts I feel are useful to the community that have no
> > place there, nor do they warrant their own plugin.
> >
> > For example, if you wanted to print out a list of all the typefaces used
> > in a project, AFAIK there's a fair number of nested attributes you have
> > to loop through which I expect a novice would find rather challenging.
> > At the same time, this hardly seems a relevant use case for the
> > cookbook. In GIS, I find a lot of people who aren't developers find
> > themselves with a need to leverage code, so having a way to support
> > copy-paste programmers is beneficial in my view, but maybe that's just me.
> >
> >
> >
> > On Tue, 20 Oct 2020 at 10:59, Richard Duivenvoorde  > > wrote:
> >
> > On 10/20/20 10:48 AM, Jorge Gustavo Rocha wrote:
> >  > Hi,
> >  >
> >  > I think the PyQGIS Cookbook is the perfect place to share these
> > scripts. The Cookbook is not the API reference documentation. It is
> > the place to share solutions for common problems using the QGIS API.
> >
> > While I agree with this, note that it currently is not 'simple' to
> > paste some scripts in the cookbook.
> >
> > Because the cookbook became ... uh a mess, because there were
> > non-running old examples in it, the cookbook is now build in a way
> > that the examples IN the cookbook are actually ran/tested
> > (against/in a Docker QGIS instance). This means that if some api
> > changes, the build of the cookbook of the examples using that api
> > would make the build fail. Which is a good check.
> >
> > But... it also means that 'just copy pasting' some handy examples is
> > not so easy. You have to make sure that there is data to work with,
> > or make some mockup first to be able an example etc etc...
> >
> > So: yes, the cookbook is a good place to showoff use of PyQGIS
> > examples (and to show the use of (sometimes not so intuitive) PyQGIS
> > api)... but for practical examples, it takes (for an average PyQGIS
> > user) maybe too much energy?
> >
> > OR (not sure if that is possible) we should add some 'sketchy' page
> > where indeed people can add working examples and which are not
> > tested... (and which will probably become stale and nobody cares to
> > fix them... like the old cookbook examples)
> >
> > Not sure what others think about this though...
> >
> > Regards,
> >
> > Richard Duivenvoorde
> > 

[Qgis-user] Projections

2020-10-21 Thread MIKE MCGRADY
I have data on tracked migratory birds, and want accurate measures of distance 
travelled during migration and areas of summering and wintering ranges.  These 
birds are summering in central Asia (mostly Kazakhstan and southern Russia), 
and wintering in Arabia.  Any advice on which projection to use?  My guess is 
Lambert conformal conic.  I'd really like to avoid using different projections 
for different phases of the birds' annual cycle, unless absolutely necessary.

M. J. McGrady
Am Rosenhugel 59
A-3500 Krems
Austria
___
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] Processing script editor questions

2020-10-21 Thread Nyall Dawson
On Thu, 22 Oct 2020 at 12:02, Vic Kelson  wrote:
>
> Hi All,
>
>
>
> I just love QGIS, but I really dislike the Processing script editor. The 
> colors and font hurt my eyes, and the editor itself is underpowered. Are 
> there alternative ways to write scripts? Can I use a different editor?

Sure -- I recommend Pycharm, it's free and fantastic.

> Can I change the theming of the editor (yellow-on-white comments are awful)?

Wait for the 3.16 release-- this one comes with a bunch of preset
schemes and plugins can provide new ones :D

Nyall

>
>
>
> Help! I have some great projects in mind, but I find the editor unusable as 
> it is.
>
>
>
> Thanks for all your help!
> Vic
>
>
>
> ___
> 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] Processing script editor questions

2020-10-21 Thread Vic Kelson
Hi All, I just love QGIS, but I really dislike the Processing script editor. The colors and font hurt my eyes, and the editor itself is underpowered. Are there alternative ways to write scripts? Can I use a different editor? Can I change the theming of the editor (yellow-on-white comments are awful)? Help! I have some great projects in mind, but I find the editor unusable as it is. Thanks for all your help!Vic 
___
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] clip geojason QGIS

2020-10-21 Thread Nicolas Cadieux
Hi,

If the clipping operations takes too much time, you could try a spatial query. 
Once you have a field with the states for each building, then you can split the 
file with that field. This may, or may not be faster. Maybe also be a problem 
with building sitting on the border.

Nicolas Cadieux

> Le 21 oct. 2020 à 20:28, Nyall Dawson  a écrit :
> 
> On Thu, 22 Oct 2020 at 10:23, Nyall Dawson  wrote:
>> 
>>> On Thu, 22 Oct 2020 at 10:15,  wrote:
>>> 
>>> Nyall,
>>> 
>>> Thanks for your quick reply. Would I load it first and then save the layer 
>>> as a geopackage to do that? Or do I have to do something more elaborate?
>> 
>> I'd do it from the QGIS browser panel -- right click on the geojson
>> file and save as.
> 
> Just to clarify -- that's the "export" option, not "save as".
> 
> Nyall
> 
> That'll save some of the initial time required to
>> load this into QGIS.
>> 
>> (alternatively the fastest way to convert would be to use ogr2ogr
>> directly from the command line, if you're comfortable with that!)
>> 
>> Nyall
>> 
>>> 
>>> Cheers
>>> 
>>> Dr Iain Stuart
>>> JCIS Consultants
>>> P.O. Box 2397
>>> Burwood North
>>> NSW, 2134
>>> 
>>> (02) 9701 0191
>>> (0413) 380116 (m)
>>> 
>>> -Original Message-
>>> From: Nyall Dawson 
>>> Sent: Thursday, 22 October 2020 10:41 AM
>>> To: i...@jcis.net.au
>>> Cc: qgis-user 
>>> Subject: Re: [Qgis-user] clip geojason QGIS
>>> 
>>> On Thu, 22 Oct 2020 at 09:33,  wrote:
 
 It seems that Microsoft (of all people) is creating this database of 
 building shapes for the known universe. They recently completed Australia 
 and made it available. It is in a zipped geojason file – a format that I 
 have no idea about.
 
 
 
 I have loaded it to QGIS and it is huge. It took over 30min to load and it 
 takes about 10min to redraw every time and I am not running it on a 
 Pentium 4 with 8bits of ram either.
>>> 
>>> Convert it to a geopackage first -- geojson is a HORRIBLE format for large 
>>> datasets like this, as it's completely unoptimised and has no spatial 
>>> index. Effectively on every redraw QGIS is having to loop through the 
>>> entire 6gb geojson file every time! ouch
>>> 
>>> Nyall
>>> 
>>> 
>>> 
 
 
 
 I would like to clip the data to the states of Australia which I have a 
 vector files or maybe regions in order to get the dataset smaller so it 
 can be more usable.
 
 
 
 Can you clip geojason files ? or would I have to covert them into 
 something like shapefiles? Any ideas on a workflow to do this?
 
 
 
 BTW I am running an I7-8700 with 16mb RAM and a NVIDIA Quadro P2000.
 
 
 
 Cheers
 
 
 
 Dr Iain Stuart
 
 JCIS Consultants
 
 P.O. Box 2397
 
 Burwood North
 
 NSW, 2134
 
 
 
 (02) 9701 0191
 (0413) 380116 (m)
 
 
 
 ___
 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 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] clip geojason QGIS

2020-10-21 Thread Nyall Dawson
On Thu, 22 Oct 2020 at 10:23, Nyall Dawson  wrote:
>
> On Thu, 22 Oct 2020 at 10:15,  wrote:
> >
> > Nyall,
> >
> > Thanks for your quick reply. Would I load it first and then save the layer 
> > as a geopackage to do that? Or do I have to do something more elaborate?
>
> I'd do it from the QGIS browser panel -- right click on the geojson
> file and save as.

Just to clarify -- that's the "export" option, not "save as".

Nyall

That'll save some of the initial time required to
> load this into QGIS.
>
> (alternatively the fastest way to convert would be to use ogr2ogr
> directly from the command line, if you're comfortable with that!)
>
> Nyall
>
> >
> > Cheers
> >
> > Dr Iain Stuart
> > JCIS Consultants
> > P.O. Box 2397
> > Burwood North
> > NSW, 2134
> >
> > (02) 9701 0191
> > (0413) 380116 (m)
> >
> > -Original Message-
> > From: Nyall Dawson 
> > Sent: Thursday, 22 October 2020 10:41 AM
> > To: i...@jcis.net.au
> > Cc: qgis-user 
> > Subject: Re: [Qgis-user] clip geojason QGIS
> >
> > On Thu, 22 Oct 2020 at 09:33,  wrote:
> > >
> > > It seems that Microsoft (of all people) is creating this database of 
> > > building shapes for the known universe. They recently completed Australia 
> > > and made it available. It is in a zipped geojason file – a format that I 
> > > have no idea about.
> > >
> > >
> > >
> > > I have loaded it to QGIS and it is huge. It took over 30min to load and 
> > > it takes about 10min to redraw every time and I am not running it on a 
> > > Pentium 4 with 8bits of ram either.
> >
> > Convert it to a geopackage first -- geojson is a HORRIBLE format for large 
> > datasets like this, as it's completely unoptimised and has no spatial 
> > index. Effectively on every redraw QGIS is having to loop through the 
> > entire 6gb geojson file every time! ouch
> >
> > Nyall
> >
> >
> >
> > >
> > >
> > >
> > > I would like to clip the data to the states of Australia which I have a 
> > > vector files or maybe regions in order to get the dataset smaller so it 
> > > can be more usable.
> > >
> > >
> > >
> > > Can you clip geojason files ? or would I have to covert them into 
> > > something like shapefiles? Any ideas on a workflow to do this?
> > >
> > >
> > >
> > > BTW I am running an I7-8700 with 16mb RAM and a NVIDIA Quadro P2000.
> > >
> > >
> > >
> > > Cheers
> > >
> > >
> > >
> > > Dr Iain Stuart
> > >
> > > JCIS Consultants
> > >
> > > P.O. Box 2397
> > >
> > > Burwood North
> > >
> > > NSW, 2134
> > >
> > >
> > >
> > > (02) 9701 0191
> > > (0413) 380116 (m)
> > >
> > >
> > >
> > > ___
> > > 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

Re: [Qgis-user] clip geojason QGIS

2020-10-21 Thread Nyall Dawson
On Thu, 22 Oct 2020 at 10:15,  wrote:
>
> Nyall,
>
> Thanks for your quick reply. Would I load it first and then save the layer as 
> a geopackage to do that? Or do I have to do something more elaborate?

I'd do it from the QGIS browser panel -- right click on the geojson
file and save as. That'll save some of the initial time required to
load this into QGIS.

(alternatively the fastest way to convert would be to use ogr2ogr
directly from the command line, if you're comfortable with that!)

Nyall

>
> Cheers
>
> Dr Iain Stuart
> JCIS Consultants
> P.O. Box 2397
> Burwood North
> NSW, 2134
>
> (02) 9701 0191
> (0413) 380116 (m)
>
> -Original Message-
> From: Nyall Dawson 
> Sent: Thursday, 22 October 2020 10:41 AM
> To: i...@jcis.net.au
> Cc: qgis-user 
> Subject: Re: [Qgis-user] clip geojason QGIS
>
> On Thu, 22 Oct 2020 at 09:33,  wrote:
> >
> > It seems that Microsoft (of all people) is creating this database of 
> > building shapes for the known universe. They recently completed Australia 
> > and made it available. It is in a zipped geojason file – a format that I 
> > have no idea about.
> >
> >
> >
> > I have loaded it to QGIS and it is huge. It took over 30min to load and it 
> > takes about 10min to redraw every time and I am not running it on a Pentium 
> > 4 with 8bits of ram either.
>
> Convert it to a geopackage first -- geojson is a HORRIBLE format for large 
> datasets like this, as it's completely unoptimised and has no spatial index. 
> Effectively on every redraw QGIS is having to loop through the entire 6gb 
> geojson file every time! ouch
>
> Nyall
>
>
>
> >
> >
> >
> > I would like to clip the data to the states of Australia which I have a 
> > vector files or maybe regions in order to get the dataset smaller so it can 
> > be more usable.
> >
> >
> >
> > Can you clip geojason files ? or would I have to covert them into something 
> > like shapefiles? Any ideas on a workflow to do this?
> >
> >
> >
> > BTW I am running an I7-8700 with 16mb RAM and a NVIDIA Quadro P2000.
> >
> >
> >
> > Cheers
> >
> >
> >
> > Dr Iain Stuart
> >
> > JCIS Consultants
> >
> > P.O. Box 2397
> >
> > Burwood North
> >
> > NSW, 2134
> >
> >
> >
> > (02) 9701 0191
> > (0413) 380116 (m)
> >
> >
> >
> > ___
> > 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

Re: [Qgis-user] Clipping and keeping RGB scale

2020-10-21 Thread Mauricio Tecles
 
Thank youfor your answer. I agree and realize that. Let me put it another way 
to describemy problem and what I need.

I need bmp(32 bits-RGBA, 2048x2048 pixels) and dds images, that each of them I 
will call apatch. These patches are square, created form (UTM, EPSG:32723) 
5760mx5760m sizecuts of a large RGB composed satellite images.

This iswhat I used to do to create one patch with QGIS:

- From the RGBcomposed image I extracted (clip) a patch. Correct the min and 
max of each bandof the patch to reflect those values of the big RGB composed 
image.

- Zoom tothe patch layer (the only one displayed).

- Crtl-P(print).

- Selectprinter – I have no physical printer, so I used to select Microsoft 
XPSDocument Writer (the only one I could select the paper size defined by user).

- Pagesetup: select “size defined by user”.

- Add anew map to layout (the patch).

(Here Icould change the paper size or not. It would lead to the same good 
result).

- Itemproperties -> Extents: set X min, Y min, X max, Y max to the exact 
extentsof the patch.

- Layout:Resize layout (all margins are set to 0) – the image (the extents of 
the patch)as fit to the entire paper.

- Layout->Exportas Image…, select png and set to 2048x2048 pixels (page width, 
page height).

- Open thepng with Paint.net, save as bmp 32 bits (RGBA) and save as dds.

Myproblems:

- I need to cut at least 400 patches, trimmingeach one to the color scale of 
the big image is hard work, but possible to do. Anautomated (batch file?) to do 
that would be great! 

- The printlayout is not working anymore to fit the paper to the exact size of 
the image (the extents of the patch) (probably after some Windows update), even 
selecting “size defined by user”. Changing theextents and resizing does not 
have the same effect as before. The result is alwaysthe extent in the middle of 
the paper surrounded by a white border.

I have tried to make abigger clip (5x5 patches) then export as bmp 
(Projet->Import/Export->Exportmap to image…) to cut it with Paint.net, but it 
is impossible to match theextent and pixel size precisely. If I set the extent 
it turns to 10242x10242pixels. If I set to 10240x10240 pixels, as it should be, 
it reduces the extent.The same happens trying to export a patch this way.

Is there away to export/transform the tif patches (UTM, EPSG:32723, size: 
5760mx5760m) tobmp (32 bits, 2048x2048 pixels) and dds? (gdal_translate, 
gdal_retile, OSGeo4WShell or other)?

Hints arewelcome!

Thank you,

Mauricio


Em quarta-feira, 21 de outubro de 2020 00:31:17 BRT, 
 escreveu:  
 
  I don't think your issue is with the clip of the rasters, it is with how the 
software you are using sets the scale for the display of the layer.
 
 When you clip a layer in  QGIS or directly with gdal_translate, the default is 
to leave the pixel values exactly as they are, which is generally what you 
want. After all, if the software rescaled the max/min to some fixed value, then 
when you tried to display these side-by-side or reassemble them into a single 
image the values wouldn't make sense. 
 
 The issue you apparently are facing is that by default on loading a raster the 
software you are using finds the min and max value and scales the display to 
span that full range,  which is what QGIS does by default with raster layers. 
(The exact details of the scaling are determine by settings in the Settings -> 
Raster tab.)
 
 Without knowing what your display software is I can't suggest a solution. 
 
 
   ___
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] clip geojason QGIS

2020-10-21 Thread Nyall Dawson
On Thu, 22 Oct 2020 at 09:33,  wrote:
>
> It seems that Microsoft (of all people) is creating this database of building 
> shapes for the known universe. They recently completed Australia and made it 
> available. It is in a zipped geojason file – a format that I have no idea 
> about.
>
>
>
> I have loaded it to QGIS and it is huge. It took over 30min to load and it 
> takes about 10min to redraw every time and I am not running it on a Pentium 4 
> with 8bits of ram either.

Convert it to a geopackage first -- geojson is a HORRIBLE format for
large datasets like this, as it's completely unoptimised and has no
spatial index. Effectively on every redraw QGIS is having to loop
through the entire 6gb geojson file every time! ouch

Nyall



>
>
>
> I would like to clip the data to the states of Australia which I have a 
> vector files or maybe regions in order to get the dataset smaller so it can 
> be more usable.
>
>
>
> Can you clip geojason files ? or would I have to covert them into something 
> like shapefiles? Any ideas on a workflow to do this?
>
>
>
> BTW I am running an I7-8700 with 16mb RAM and a NVIDIA Quadro P2000.
>
>
>
> Cheers
>
>
>
> Dr Iain Stuart
>
> JCIS Consultants
>
> P.O. Box 2397
>
> Burwood North
>
> NSW, 2134
>
>
>
> (02) 9701 0191
> (0413) 380116 (m)
>
>
>
> ___
> 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] clip geojason QGIS

2020-10-21 Thread Iain
It seems that Microsoft (of all people) is creating this database of
building shapes for the known universe. They recently completed Australia
and made it available. It is in a zipped geojason file - a format that I
have no idea about.

 

I have loaded it to QGIS and it is huge. It took over 30min to load and it
takes about 10min to redraw every time and I am not running it on a Pentium
4 with 8bits of ram either. 

 

I would like to clip the data to the states of Australia which I have a
vector files or maybe regions in order to get the dataset smaller so it can
be more usable.

 

Can you clip geojason files ? or would I have to covert them into something
like shapefiles? Any ideas on a workflow to do this?

 

BTW I am running an I7-8700 with 16mb RAM and a NVIDIA Quadro P2000.

 

Cheers

 

Dr Iain Stuart

JCIS Consultants 

P.O. Box 2397

Burwood North

NSW, 2134

 

(02) 9701 0191
(0413) 380116 (m)

 

___
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] Have QGIS prompt for profile to use everytime ?

2020-10-21 Thread Fernando M. Roxo da Motta
On Wed, 21 Oct 2020 17:18:05 +0200, Raymond Nijssen
 wrote:


> This script works for me. But I'm not all sure about the way I start
> a new process for QGIS and quit the python script. I think ending the 
> command with an "&" only works on unix kind of systems..

  Perhaps the 'run()' method of subprocess module can be a more
suitable answer:

  https://docs.python.org/3/library/subprocess.html

  HTH.

> 
> ---
> 
> import sys
> import os
> from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout, 
> QComboBox, QPushButton
> 
> # adjust these to your setup:
> qgis_bin = '/home/raymond/git/QGIS/build-master/output/bin/qgis'
> profile_path = '/home/raymond/.local/share/QGIS/QGIS3/profiles'
> 
> 
> def run_qgis():
>  profile_name = cb.currentText()
>  cmd = f'{qgis_bin} --profile {profile_name} &'
>  #print(cmd)
>  w.close()
>  os.system(cmd)
> 
> 
> app = QApplication(sys.argv)
> 
> w = QWidget()
> w.setWindowTitle('Choose QGIS profile')
> 
> l = QVBoxLayout()
> 
> cb = QComboBox()
> for fn in os.scandir(profile_path):
>  if fn.is_dir():
>  cb.addItem(fn.name)
> l.addWidget(cb)
> 
> btn = QPushButton('Run QGIS')
> btn.clicked.connect(run_qgis)
> l.addWidget(btn)
> 
> w.setLayout(l)
> 
> w.show()
> 
> sys.exit(app.exec_())
> 
> ---
> 
> On 21-10-2020 14:00, Raymond Nijssen wrote:
> > Hi Lars,
> > 
> > I don't think you can. You can make a startup.py script that runs
> > every time you start QGIS, but it sits in your profile folder. So
> > when QGIS runs it, QGIS must already be aware of the profile that
> > is being used. Also, changing the profile needs a QGIS restart, so
> > it seems QGIS cannot change profile anymore while running.
> > 
> > Maybe you can make a small python (pyqt?) script that displays a
> > dialog with profile name picker and does a "qgis --profile NAME"
> > for you?
> > 
> > Regards,
> > Raymond
> > 
> > 
> > On 21-10-2020 13:21, Lars I. Nielsen, LIFA A/S wrote:  
> >> Hi list.
> >>
> >> If I have multiple profiles defined, is it possible to have QGIS 
> >> prompt me everytime for which profile to use ?
> >>
> >> I know that I can add “--profile NAME” to the command line, but is 
> >> looking for a way to avoid having multiple start icons.
> >>
> >> Med venlig hilsen
> >>
> >> Lars I. Nielsen, LIFA A/S
> >> GIS-kons., FME+Python Certified Professional
> >> Geoinformatik
> >>
> >> *T*
> >>
> >>
> >>
> >> 6313 6800
> >>
> >>
> >>
> >> *@*
> >>
> >>
> >>
> >> l...@lifa.dk
> >>
> >> *D*
> >>
> >>
> >>
> >> 6313 6849
> >>
> >>
> >>
> >> *W*
> >>
> >>
> >>
> >> www.lifa.dk 
> >>
> >> *M*
> >>
> >>
> >>
> >> *CVR*
> >>
> >>
> >>
> >> 20937289
> >>
> >>
> >> 
> >> Følg os på LinkedIn og læs de seneste nyheder fra LIFA A/S
> >>
> >>
> >> ___
> >> 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 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







  Roxo

-- 
 Non luctari, ludare ---+ WYSIWYG
Fernando M. Roxo da Motta   | Editor?
Except where explicitly stated I speak on my own behalf.|  VI !!
PU5RXO  | I see text,
 Quis custodiet ipsos custodes?-+ I get text!
 
___
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] Have QGIS prompt for profile to use everytime ?

2020-10-21 Thread Charles Dixon-Paver
I tried to make a quick and dirty cross platform one with zenity that will
work OOTB without worrying about the python environment setup. Didn't work
as planned as the zenity portable app for windows seems a bit glitchy
(there's no way to cancel I could find). Anyway, it should work OOTB on
Gnome, and I share because it might be a handy way for someone to pass
other parameters to a program.

Windows:
--
@echo off
@setlocal enableextensions
@cd /d "%~dp0"
@ SETLOCAL EnableDelayedExpansion
@ if not DEFINED IS_MINIMIZED set IS_MINIMIZED=1 && start "" /min "%~dpnx0"
%* && exit

REM Get Zenity Portable and add it to your PATH
REM or keep it in the batchfile dir https://github.com/maravento/winzenity

Set "profilesDir=%APPDATA%\QGIS\QGIS3\profiles"

Set dirs=

for /f "tokens=* usebackq" %%I in (`dir %profilesDir% /A:D /O:N /B`) do (
  Set "dirs=!dirs! %%I"
)

for /f %%X in ('zenity --entry --timeout 10 --ok-label="OK"
--cancel-label="OK ANYWAY" --title "User Profile" --text "Select your
profile." !dirs!') do (
  Set "selectedProfile=%%X"
  ECHO %ERRORLEVEL%
)

REM if %ERRORLEVEL% == 1 exit

if "!selectedProfile!"=="" (
for /f "tokens=* usebackq" %%F in (`findstr /L /C:"defaultProfile"
%profilesDir%\profiles.ini`) do (
  Set defaultProfile=%%F
  for /F "tokens=2 delims==" %%A in ("!defaultProfile!") do (
Set selectedProfile=%%A
  )
))

%COMSPEC% /C "CALL C:\OSGeo4W64\bin\qgis.bat --profile !selectedProfile!"

EXIT




Linux:

#!/usr/bin/env bash

qgisBin=$(which qgis)

profilesDir=~/.local/share/QGIS/QGIS3/profiles

dirList=$(ls -d $profilesDir/*/)

dirNames=$(for dir in "${dirList[@]}"; do echo "$(basename --suffix=/ -a
$dir)"; done)

dirs=()

for dir in ${dirNames[@]}
do
  dirs=(${dirs[@]} "$dir")
done

selectedProfile=$(zenity --entry --timeout 10 --title "User Profile" --text
"Select your profile." "${dirs[@]}")

# If cancelled, then exit

[[ "$?" != "0" ]] && exit 1

if [ -z "$selectedProfile" ]
then
  selectedProfile=$(awk -F "=" '/defaultProfile/ {print $2}'
$profilesDir/profiles.ini)
fi

$qgisBin --profile $selectedProfile & disown

exit


On Wed, 21 Oct 2020 at 17:18, Raymond Nijssen  wrote:

> This script works for me. But I'm not all sure about the way I start a
> new process for QGIS and quit the python script. I think ending the
> command with an "&" only works on unix kind of systems..
>
> ---
>
> import sys
> import os
> from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout,
> QComboBox, QPushButton
>
> # adjust these to your setup:
> qgis_bin = '/home/raymond/git/QGIS/build-master/output/bin/qgis'
> profile_path = '/home/raymond/.local/share/QGIS/QGIS3/profiles'
>
>
> def run_qgis():
>  profile_name = cb.currentText()
>  cmd = f'{qgis_bin} --profile {profile_name} &'
>  #print(cmd)
>  w.close()
>  os.system(cmd)
>
>
> app = QApplication(sys.argv)
>
> w = QWidget()
> w.setWindowTitle('Choose QGIS profile')
>
> l = QVBoxLayout()
>
> cb = QComboBox()
> for fn in os.scandir(profile_path):
>  if fn.is_dir():
>  cb.addItem(fn.name)
> l.addWidget(cb)
>
> btn = QPushButton('Run QGIS')
> btn.clicked.connect(run_qgis)
> l.addWidget(btn)
>
> w.setLayout(l)
>
> w.show()
>
> sys.exit(app.exec_())
>
> ---
>
> On 21-10-2020 14:00, Raymond Nijssen wrote:
> > Hi Lars,
> >
> > I don't think you can. You can make a startup.py script that runs every
> > time you start QGIS, but it sits in your profile folder. So when QGIS
> > runs it, QGIS must already be aware of the profile that is being used.
> > Also, changing the profile needs a QGIS restart, so it seems QGIS cannot
> > change profile anymore while running.
> >
> > Maybe you can make a small python (pyqt?) script that displays a dialog
> > with profile name picker and does a "qgis --profile NAME" for you?
> >
> > Regards,
> > Raymond
> >
> >
> > On 21-10-2020 13:21, Lars I. Nielsen, LIFA A/S wrote:
> >> Hi list.
> >>
> >> If I have multiple profiles defined, is it possible to have QGIS
> >> prompt me everytime for which profile to use ?
> >>
> >> I know that I can add “--profile NAME” to the command line, but is
> >> looking for a way to avoid having multiple start icons.
> >>
> >> Med venlig hilsen
> >>
> >> Lars I. Nielsen, LIFA A/S
> >> GIS-kons., FME+Python Certified Professional
> >> Geoinformatik
> >>
> >> *T*
> >>
> >>
> >>
> >> 6313 6800
> >>
> >>
> >>
> >> *@*
> >>
> >>
> >>
> >> l...@lifa.dk
> >>
> >> *D*
> >>
> >>
> >>
> >> 6313 6849
> >>
> >>
> >>
> >> *W*
> >>
> >>
> >>
> >> www.lifa.dk 
> >>
> >> *M*
> >>
> >>
> >>
> >> *CVR*
> >>
> >>
> >>
> >> 20937289
> >>
> >>
> >> 
> >> Følg os på LinkedIn og læs de seneste nyheder fra LIFA A/S
> >>
> >>
> >> ___
> >> Qgis-user mailing 

Re: [Qgis-user] Have QGIS prompt for profile to use everytime ?

2020-10-21 Thread Raymond Nijssen
This script works for me. But I'm not all sure about the way I start a 
new process for QGIS and quit the python script. I think ending the 
command with an "&" only works on unix kind of systems..


---

import sys
import os
from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout, 
QComboBox, QPushButton


# adjust these to your setup:
qgis_bin = '/home/raymond/git/QGIS/build-master/output/bin/qgis'
profile_path = '/home/raymond/.local/share/QGIS/QGIS3/profiles'


def run_qgis():
profile_name = cb.currentText()
cmd = f'{qgis_bin} --profile {profile_name} &'
#print(cmd)
w.close()
os.system(cmd)


app = QApplication(sys.argv)

w = QWidget()
w.setWindowTitle('Choose QGIS profile')

l = QVBoxLayout()

cb = QComboBox()
for fn in os.scandir(profile_path):
if fn.is_dir():
cb.addItem(fn.name)
l.addWidget(cb)

btn = QPushButton('Run QGIS')
btn.clicked.connect(run_qgis)
l.addWidget(btn)

w.setLayout(l)

w.show()

sys.exit(app.exec_())

---

On 21-10-2020 14:00, Raymond Nijssen wrote:

Hi Lars,

I don't think you can. You can make a startup.py script that runs every 
time you start QGIS, but it sits in your profile folder. So when QGIS 
runs it, QGIS must already be aware of the profile that is being used. 
Also, changing the profile needs a QGIS restart, so it seems QGIS cannot 
change profile anymore while running.


Maybe you can make a small python (pyqt?) script that displays a dialog 
with profile name picker and does a "qgis --profile NAME" for you?


Regards,
Raymond


On 21-10-2020 13:21, Lars I. Nielsen, LIFA A/S wrote:

Hi list.

If I have multiple profiles defined, is it possible to have QGIS 
prompt me everytime for which profile to use ?


I know that I can add “--profile NAME” to the command line, but is 
looking for a way to avoid having multiple start icons.


Med venlig hilsen

Lars I. Nielsen, LIFA A/S
GIS-kons., FME+Python Certified Professional
Geoinformatik

*T*



6313 6800



*@*



l...@lifa.dk

*D*



6313 6849



*W*



www.lifa.dk 

*M*



*CVR*



20937289



Følg os på LinkedIn og læs de seneste nyheder fra LIFA A/S


___
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 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] Have QGIS prompt for profile to use everytime ?

2020-10-21 Thread Richard Duivenvoorde
On 10/21/20 1:21 PM, Lars I. Nielsen, LIFA A/S wrote:
> Hi list.
> 
> If I have multiple profiles defined, is it possible to have QGIS prompt me 
> everytime for which profile to use ?
> 
> I know that I can add “--profile NAME” to the command line, but is looking 
> for a way to avoid having multiple start icons.

For what I know Nathan (in bcc) was our 'profile'-hero... 
Maybe he can tell if this is an easy 'feature-request' or if that is really 
hard to implement?
Others feel free to chime in, if I am pointing to the wrong person, or you know 
more...  :-)

Regards,

Richard Duivenvoorde
___
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] Have QGIS prompt for profile to use everytime ?

2020-10-21 Thread Charles Dixon-Paver
If you don't want to bother with a full blown python app, on windows you
could pretty easily make a "custom-profile-qgis.cmd" batchfile with
something like the following:



@echo off
@setlocal enableextensions
@cd /d "%~dp0"

Set "MYPROFILE=default"
ECHO Please type the name of your user profile:
Set /P "MYPROFILE="

%COMSPEC% /C "CALL C:\OSGeo4W64\bin\qgis.bat --profile %MYPROFILE% %*"



Changing the QGIS startup batch location of course. You could also probably
extend it easily with https://ss64.com/nt/choice.html

Then your "shortcut" will prompt you for the profile you want to use.

I reckon pulling off the same in bash is also pretty trivial...

Regards

On Wed, 21 Oct 2020 at 14:00, Raymond Nijssen  wrote:

> Hi Lars,
>
> I don't think you can. You can make a startup.py script that runs every
> time you start QGIS, but it sits in your profile folder. So when QGIS
> runs it, QGIS must already be aware of the profile that is being used.
> Also, changing the profile needs a QGIS restart, so it seems QGIS cannot
> change profile anymore while running.
>
> Maybe you can make a small python (pyqt?) script that displays a dialog
> with profile name picker and does a "qgis --profile NAME" for you?
>
> Regards,
> Raymond
>
>
> On 21-10-2020 13:21, Lars I. Nielsen, LIFA A/S wrote:
> > Hi list.
> >
> > If I have multiple profiles defined, is it possible to have QGIS prompt
> > me everytime for which profile to use ?
> >
> > I know that I can add “--profile NAME” to the command line, but is
> > looking for a way to avoid having multiple start icons.
> >
> > Med venlig hilsen
> >
> > Lars I. Nielsen, LIFA A/S
> > GIS-kons., FME+Python Certified Professional
> > Geoinformatik
> >
> > *T*
> >
> >
> >
> > 6313 6800
> >
> >
> >
> > *@*
> >
> >
> >
> > l...@lifa.dk
> >
> > *D*
> >
> >
> >
> > 6313 6849
> >
> >
> >
> > *W*
> >
> >
> >
> > www.lifa.dk 
> >
> > *M*
> >
> >
> >
> > *CVR*
> >
> >
> >
> > 20937289
> >
> >
> > 
> > Følg os på LinkedIn og læs de seneste nyheder fra LIFA A/S
> >
> >
> > ___
> > 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 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] Have QGIS prompt for profile to use everytime ?

2020-10-21 Thread Raymond Nijssen

Hi Lars,

I don't think you can. You can make a startup.py script that runs every 
time you start QGIS, but it sits in your profile folder. So when QGIS 
runs it, QGIS must already be aware of the profile that is being used. 
Also, changing the profile needs a QGIS restart, so it seems QGIS cannot 
change profile anymore while running.


Maybe you can make a small python (pyqt?) script that displays a dialog 
with profile name picker and does a "qgis --profile NAME" for you?


Regards,
Raymond


On 21-10-2020 13:21, Lars I. Nielsen, LIFA A/S wrote:

Hi list.

If I have multiple profiles defined, is it possible to have QGIS prompt 
me everytime for which profile to use ?


I know that I can add “--profile NAME” to the command line, but is 
looking for a way to avoid having multiple start icons.


Med venlig hilsen

Lars I. Nielsen, LIFA A/S
GIS-kons., FME+Python Certified Professional
Geoinformatik

*T*



6313 6800



*@*



l...@lifa.dk

*D*



6313 6849



*W*



www.lifa.dk 

*M*



*CVR*



20937289



Følg os på LinkedIn og læs de seneste nyheder fra LIFA A/S


___
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] Have QGIS prompt for profile to use everytime ?

2020-10-21 Thread Lars I. Nielsen, LIFA A/S
Hi list.

If I have multiple profiles defined, is it possible to have QGIS prompt me 
everytime for which profile to use ?

I know that I can add "--profile NAME" to the command line, but is looking for 
a way to avoid having multiple start icons.


Med venlig hilsen

Lars I. Nielsen, LIFA A/S
GIS-kons., FME+Python Certified Professional
Geoinformatik
[cid:image001.gif@01D6A7AC.CF171BE0]
T
6313 6800
@
l...@lifa.dk
D
6313 6849
W
www.lifa.dk
M
CVR
20937289

[cid:image002.png@01D6A7AC.CF171BE0]
Følg os på LinkedIn og læs de seneste nyheder fra LIFA A/S
___
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] OSGeo4W: Processing not loading after Update

2020-10-21 Thread Kai Borgolte
Hi,

I just did a full update in OSGeo4W on two machines. QGIS was updated
from 3.12 to 3.14.16. Now I get an error message at QGIS start with
stacktrace.

Any suggestions please?


Konnte Erweiterung 'processing' nicht laden

ModuleNotFoundError: No module named '_osr'
Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\osgeo\osr.py", line
14, in swig_import_helper
return importlib.import_module(mname)
  File "C:\OSGEO4~1\apps\Python37\lib\importlib\__init__.py", line 127,
in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1006, in _gcd_import
  File "", line 983, in _find_and_load
  File "", line 967, in _find_and_load_unlocked
  File "", line 670, in _load_unlocked
  File "", line 583, in module_from_spec
  File "", line 1043, in create_module
  File "", line 219, in _call_with_frames_removed
ImportError: DLL load failed: Die angegebene Prozedur wurde nicht gefunden.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 312, in
loadPlugin
__import__(packageName)
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 792, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/OSGEO4~1/apps/qgis/./python/plugins\processing\__init__.py",
line 35, in
from processing.tools.raster import *  # NOQA
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 792, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
  File
"C:/OSGEO4~1/apps/qgis/./python/plugins\processing\tools\raster.py",
line 26, in
from osgeo import gdal
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 792, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\osgeo\gdal.py", line
1756, in
import osgeo.ogr
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 792, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\osgeo\ogr.py", line
260, in
import osgeo.osr
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 792, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\osgeo\osr.py", line
17, in
_osr = swig_import_helper()
  File "C:\OSGEO4~1\apps\Python37\lib\site-packages\osgeo\osr.py", line
16, in swig_import_helper
return importlib.import_module('_osr')
  File "C:\OSGEO4~1\apps\Python37\lib\importlib\__init__.py", line 127,
in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_osr'


Python-Version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC
v.1914 64 bit (AMD64)]
QGIS-Version: 3.14.16-Pi Pi, df27394552

Python-Pfad:
C:/OSGEO4~1/apps/qgis/./python
C:/Users/User/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/User/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/OSGEO4~1/apps/qgis/./python/plugins
C:\OSGEO4~1\apps\Python37
C:\OSGEO4~1\apps\Python37\Scripts
C:\OSGeo4W64\bin\python37.zip
C:\OSGEO4~1\apps\Python37\DLLs
C:\OSGEO4~1\apps\Python37\lib
C:\OSGeo4W64\bin
C:\OSGEO4~1\apps\Python37\lib\site-packages
C:\OSGEO4~1\apps\Python37\lib\site-packages\win32
C:\OSGEO4~1\apps\Python37\lib\site-packages\win32\lib
C:\OSGEO4~1\apps\Python37\lib\site-packages\Pythonwin
C:/Users/User/AppData/Roaming/QGIS/QGIS3\profiles\default/python

--
Kai Borgolte, Bonn
___
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