[QGIS-Developer] Installation Problem on Ubuntu Linux

2022-01-24 Thread Kim Lyon

  
  
Hi,
 I have a basic installation problem with QGIS.

I am setting up an Intel server running Ubuntu Linux 20.04 with an
Apache2 HTTP server for our local volunteer Bush Fire Brigades in
Margaret River, Western Australia.

Everything seems to be operational with the exception of QGIS on the
HTML \ HTTP web server side.

I have created a separate QGIS directory in the home directory area
and have set the user and group ownership to the operating user and
group (administrator). There do not seem to be any permissions
problems.

Within this directory I have placed the projects directory and there
is a qgisserverdb directory.

The default .qgs file is set to /home/qgis/projects/world.qgs .

The QGIS desktop application is installed and is running ok. It
displays the world.qgs file without any problems with the exception
of an older version warning.

If I use either URL

http://qgis/cgi-bin/qgis_mapserv.fcgi?service=WMS=GetCapabilities

or

http://qgis/cgi-bin/qgis_mapserv.fcgi?service=WMS=GetCapabilities=/home/qgis/projects/world.qgs

in the browser (Chromium or Firefox) I get the following error
message :-

   This XML file does not appear to have any style information
associated with it. The document tree is shown below.

followed by the attached XML file.

How do I solve this problem? I have looked extensively on the
Internet and have not been able to find a solution.

Many Thanks

Yours Sincerely

Kim Lyon

kim.lyon@baremetal.systems

MargaretRiver.info





  

http://www.opengis.net/wms 
http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd 
http://www.opengis.net/sld 
http://schemas.opengis.net/sld/1.1.0/sld_capabilities.xsd 
http://www.qgis.org/wms 
http://qgis/cgi-bin/qgis_mapserv.fcgi?MAP=/usr/lib/cgi-bin/projects/world.qgsSERVICE=WMSREQUEST=GetSchemaExtension;
 xmlns="http://www.opengis.net/wms; xmlns:sld="http://www.opengis.net/sld; 
xmlns:qgs="http://www.qgis.org/wms; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;>
 
  WMS
  QGIS Server Demo
  
  
   infoMapAccessService
   QGIS Server World
  
  http://qgis/cgi-bin/qgis_mapserv.fcgi?MAP=/usr/lib/cgi-bin/projects/world.qgs;
 xmlns:xlink="http://www.w3.org/1999/xlink; xlink:type="simple"/>
  
   
Tudor Bărăscu
qgis.org
   
   
tudor.bara...@qtibia.ro
  
  conditions unknown
  None
 
 
  
   
text/xml

 
  
   http://qgis/cgi-bin/qgis_mapserv.fcgi?MAP=/usr/lib/cgi-bin/projects/world.qgs;
 xmlns:xlink="http://www.w3.org/1999/xlink; xlink:type="simple"/>
  
 

   
   
image/jpeg
image/png
image/png; mode=16bit
image/png; mode=8bit
image/png; mode=1bit
application/dxf

 
  
   http://qgis/cgi-bin/qgis_mapserv.fcgi?MAP=/usr/lib/cgi-bin/projects/world.qgs;
 xmlns:xlink="http://www.w3.org/1999/xlink; xlink:type="simple"/>
  
 

   
   
text/plain
text/html
text/xml
application/vnd.ogc.gml
application/vnd.ogc.gml/3.1.1
application/json
application/geo+json

 
  
   http://qgis/cgi-bin/qgis_mapserv.fcgi?MAP=/usr/lib/cgi-bin/projects/world.qgs;
 xmlns:xlink="http://www.w3.org/1999/xlink; xlink:type="simple"/>
  
 

   
   
image/jpeg
image/png
application/json

 
  
   http://qgis/cgi-bin/qgis_mapserv.fcgi?MAP=/usr/lib/cgi-bin/projects/world.qgs;
 xmlns:xlink="http://www.w3.org/1999/xlink; xlink:type="simple"/>
  
 

   
   
text/xml

 
  
   http://qgis/cgi-bin/qgis_mapserv.fcgi?MAP=/usr/lib/cgi-bin/projects/world.qgs;
 xmlns:xlink="http://www.w3.org/1999/xlink; xlink:type="simple"/>
  
 

   
   
text/xml

 
  
   http://qgis/cgi-bin/qgis_mapserv.fcgi?MAP=/usr/lib/cgi-bin/projects/world.qgs;
 xmlns:xlink="http://www.w3.org/1999/xlink; xlink:type="simple"/>
  
 

   
  
  
   XML
  
  
  
   QGIS Server Demo
   
   
infoMapAccessService
QGIS Server World
   
   CRS:84
   EPSG:3857
   EPSG:900913
   EPSG:4326
   
-189
189
-123
118
   
   
   
   
   
airports
airports
CRS:84
EPSG:3857
EPSG:900913
EPSG:4326

 -175.135635
 179.195443
 -53.781475
 78.246717





 default
 default
 
  image/png
  

Re: [QGIS-Developer] Donations

2022-01-24 Thread Andreas Neumann

Hi Cory,

There is nothing wrong with your feature or bug request (whatever it is 
;-) ) - there is certainly value for it!


But there is a point in the temporal controller in presentation-only 
mode. It covers probably >90% of the use cases - as most many users 
don't edit temporal data, but analyze and present it.


With the same argument you could say - what is the point of having point 
cloud data in QGIS if you can't edit the point cloud data? Or many other 
new features we have in QGIS - that have a value even in cases where a 
new functionality isn't fully implemented in all details.


Andreas

On 2022-01-24 21:10, Cory Albrecht wrote:

Honestly, whether this is a bug or a feature request is debatable, I 
personally think that it is a bug because a user would not expect that 
a basic software action like editing gets broken when the temporal 
controller is active: we should either disable editing in that case or 
make editing work with the controller.


That was my thought, too. Also, what is the point of having a 
presentation-only tool for temporal data in QGIS if you cannot 
practically or effectively edit that temporal data in QGIS as well?


On Mon, Jan 17, 2022 at 10:38 AM Alessandro Pasotti 
 wrote:


Hi,

Honestly, whether this is a bug or a feature request is debatable, I 
personally think that it is a bug because a user would not expect that 
a basic software action like editing gets broken when the temporal 
controller is active: we should either disable editing in that case or 
make editing work with the controller.


Anyway, I just wanted to underline that if this is to be considered a 
feature request it wouldn't be eligible for a grant (that explicitly 
forbids new features).


Kind regards.

On Mon, Jan 17, 2022 at 4:28 PM Andreas Neumann  
wrote:


Hi Cory,

Yes - I would also think that this is not a bug, but a feature request. 
It was never claimed that the temporal controller works fine in 
conjunction with editing tools. The temporal controller was designed as 
a presentation tool and not for editing.


To improve the situation you would have to consult with one of the core 
contributor companies listed at 
https://www.qgis.org/en/site/forusers/commercial_support.html


You could write a specification, ask one of the core contributor 
companies for a quote and finance it yourself. Or you could try to 
write a QEP (QGIS enhancement proposal) and submit it as a QGIS grant 
project. Incidentally, Anita just issued the "Call for participation 
[1]" for the 2022 QGIS grants. If you could find a company that is 
interested in working on this, and team up with them to write a QEP, it 
could be submitted as a QGIS grant. The deadline for the QGIS grants is 
February 13.


This would definitely be more work than what could be covered by 
smaller donations.


Hope this helps,
Andreas

On Mon, 17 Jan 2022 at 01:21, Cory Albrecht  
wrote:


I filed a number of bugs a year ago about various digitising tools that 
no longer worked correctly as a result of the newly implemented Dynamic 
Temporal Controller. Things like the vertex tool and the snapping tool 
that continue to react to invisible features outside of temporal scope 
making it difficult, if not impossible to use those tools with temporal 
data.


The bugs were, unfortunately, reclassified as feature requests, and 
have not been fixed since. I'd like to see them fixed because they 
cause me much difficulty and frustration when I am using QGIS.


On Sun, Jan 16, 2022 at 12:54 PM Andreas Neumann  
wrote:


Hi Cory,

We don't offer targeted donations where you can influence a specific 
bug fix. If you need that - please contact one of the QGIS commercial 
support providers - see 
https://www.qgis.org/en/site/forusers/commercial_support.html


Primarily one of the "core contributors".

What specific issue do you want to see fixed?

Andreas

On Sun, 16 Jan 2022 at 18:46, Cory Albrecht  
wrote:


Hello,

Whom do I contact to make sure that a donation goes for development 
work on a specific bug or feature? The Donations doesn;t list any 
contacts except for tax deductions. 
___

QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

--

--
Andreas Neumann QGIS.ORG [2] board member (treasurer)


--

--
Andreas Neumann QGIS.ORG [2] board member (treasurer) 
___

QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

--

Alessandro Pasotti
QCooperative:  www.qcooperative.net [3] ItOpen:   www.itopen.it [4]



Links:
--
[1] 
https://blog.qgis.org/2022/01/16/qgis-grants-7-call-for-grant-proposals-2022/

[2] http://QGIS.ORG
[3] https://www.qcooperative.net
[4] 

Re: [QGIS-Developer] Donations

2022-01-24 Thread Cory Albrecht
> Honestly, whether this is a bug or a feature request is debatable, I
personally think that it is a bug because a user would not expect that a
basic software action like editing gets broken when the temporal controller
is active: we should either disable editing in that case or make editing
work with the controller.

That was my thought, too. Also, what is the point of having a
presentation-only tool for temporal data in QGIS if you cannot practically
or effectively edit that temporal data in QGIS as well?

On Mon, Jan 17, 2022 at 10:38 AM Alessandro Pasotti 
wrote:

>
> Hi,
>
> Honestly, whether this is a bug or a feature request is debatable, I
> personally think that it is a bug because a user would not expect that a
> basic software action like editing gets broken when the temporal controller
> is active: we should either disable editing in that case or make editing
> work with the controller.
>
> Anyway, I just wanted to underline that if this is to be considered a
> feature request it wouldn't be eligible for a grant (that explicitly
> forbids new features).
>
> Kind regards.
>
>
> On Mon, Jan 17, 2022 at 4:28 PM Andreas Neumann  wrote:
>
>> Hi Cory,
>>
>> Yes - I would also think that this is not a bug, but a feature request.
>> It was never claimed that the temporal controller works fine in conjunction
>> with editing tools. The temporal controller was designed as a presentation
>> tool and not for editing.
>>
>> To improve the situation you would have to consult with one of the core
>> contributor companies listed at
>> https://www.qgis.org/en/site/forusers/commercial_support.html
>>
>> You could write a specification, ask one of the core contributor
>> companies for a quote and finance it yourself. Or you could try to write a
>> QEP (QGIS enhancement proposal) and submit it as a QGIS grant project.
>> Incidentally, Anita just issued the "Call for participation
>> "
>> for the 2022 QGIS grants. If you could find a company that is interested in
>> working on this, and team up with them to write a QEP, it could be
>> submitted as a QGIS grant. The deadline for the QGIS grants is February 13.
>>
>> This would definitely be more work than what could be covered by smaller
>> donations.
>>
>> Hope this helps,
>> Andreas
>>
>> On Mon, 17 Jan 2022 at 01:21, Cory Albrecht  wrote:
>>
>>> I filed a number of bugs a year ago about various digitising tools that
>>> no longer worked correctly as a result of the newly implemented Dynamic
>>> Temporal Controller. Things like the vertex tool and the snapping tool that
>>> continue to react to invisible features outside of temporal scope making it
>>> difficult, if not impossible to use those tools with temporal data.
>>>
>>> The bugs were, unfortunately, reclassified as feature requests, and have
>>> not been fixed since. I'd like to see them fixed because they cause me much
>>> difficulty and frustration when I am using QGIS.
>>>
>>> On Sun, Jan 16, 2022 at 12:54 PM Andreas Neumann 
>>> wrote:
>>>
 Hi Cory,

 We don't offer targeted donations where you can influence a specific
 bug fix. If you need that - please contact one of the QGIS commercial
 support providers - see
 https://www.qgis.org/en/site/forusers/commercial_support.html

 Primarily one of the "core contributors".

 What specific issue do you want to see fixed?

 Andreas

 On Sun, 16 Jan 2022 at 18:46, Cory Albrecht 
 wrote:

> Hello,
>
> Whom do I contact to make sure that a donation goes for development
> work on a specific bug or feature? The Donations doesn;t list any contacts
> except for tax deductions.
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>


 --

 --
 Andreas Neumann
 QGIS.ORG board member (treasurer)

>>>
>>
>> --
>>
>> --
>> Andreas Neumann
>> QGIS.ORG board member (treasurer)
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>
>
> --
> Alessandro Pasotti
> QCooperative:  www.qcooperative.net
> ItOpen:   www.itopen.it
>
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Selecting active mesh layer dataset

2022-01-24 Thread Vincent Cloarec
Hi,

if you want to change the rendering settings use :
https://qgis.org/api/classQgsMeshRendererSettings.html#details
and
https://qgis.org/api/classQgsMeshLayer.html#ada9c8d32c90c0a7030f1a20de6435066

Use this QgsMeshRendererSettings class to set your active dataset group.

Regards.

Le lun. 24 janv. 2022 à 15:18, Brian Haynes  a
écrit :

> Good afternoon,
>
> I am developing a QGIS application in C++ and am looking to overlay
> weather data stored in NetCDF files as mesh layers.  Each file has several
> variables that can be displayed; however it only displays one variable or
> dataset (always the first one in alphabetical order) and I'm not sure how
> to make it so I can choose which variable I want displayed.  For an entire
> layer I know I can call the layer tree node like this:
>
> QString layerName = "Temperature";
> QgsLayerTree *tree = project->instance()->layerTreeRoot(); //project is 
> QgsProject object
> for ( QgsMapLayer *layer: qmc->layers() ) // qmc is QgsMapCanvas object
>
> QgsLayerTreeNode *node = tree->findLayer(layer->id());
>
> if ( layer->name() == layerName )
> {
>node->setItemVisibilityChecked(true);
>
> } else
> {
>node->setItemVisibilityChecked(false);
> }
>
> }
>
> but its parallel for Mesh Layer subsets doesn't work:
>
> QgsMeshLayer *mesh = new QgsMeshLayer("/path/to/file.nc","MyData","mdal");
> QString dataName = "Temperature";
> for ( int : mesh->datasetGroupsIndexes() )
> {
>QgsMeshDatasetIndex did = i;
>QgsMeshDatasetGroupTreeItem *child = tree->childFromDatasetGroupIndex(i);
>
>if ( child->name() == dataName )
>{
>   child->setIsEnabled(true);
>
>} else
>{
>   child->setIsEnabled(false);
>}
> }
>
> I've also tried to set the layer rendering for datasets, but it seems to
> pertain to the entire file (mesh->datasetGroupCount > mesh->datasetCount;
> the renderer only pertains to the dataset (count = 1).  This would be
> helpful to figure out as setting the renderer for different types of data
> (vectors for wind, contours for pressure, etc) is the end goal of this
> application, and would be an upgrade from having to create multiple
> shapefiles/rasters for this data.  There doesn't seem to be many examples
> out there for mesh layer use outside of the QGIS console, not even for
> PyQGIS developers.
>
> Brian
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


[QGIS-Developer] Selecting active mesh layer dataset

2022-01-24 Thread Brian Haynes
Good afternoon,

I am developing a QGIS application in C++ and am looking to overlay weather 
data stored in NetCDF files as mesh layers.  Each file has several variables 
that can be displayed; however it only displays one variable or dataset (always 
the first one in alphabetical order) and I'm not sure how to make it so I can 
choose which variable I want displayed.  For an entire layer I know I can call 
the layer tree node like this:


QString layerName = "Temperature";
QgsLayerTree *tree = project->instance()->layerTreeRoot(); //project is 
QgsProject object

for ( QgsMapLayer *layer: qmc->layers() ) // qmc is QgsMapCanvas object

QgsLayerTreeNode *node = tree->findLayer(layer->id());

if ( layer->name() == layerName )
{
   node->setItemVisibilityChecked(true);

} else
{
   node->setItemVisibilityChecked(false);
}

}

but its parallel for Mesh Layer subsets doesn't work:


QgsMeshLayer *mesh = new QgsMeshLayer("/path/to/file.nc","MyData","mdal");
QString dataName = "Temperature";

for ( int : mesh->datasetGroupsIndexes() )
{
   QgsMeshDatasetIndex did = i;
   QgsMeshDatasetGroupTreeItem *child = tree->childFromDatasetGroupIndex(i);

   if ( child->name() == dataName )
   {
  child->setIsEnabled(true);

   } else
   {
  child->setIsEnabled(false);
   }
}

I've also tried to set the layer rendering for datasets, but it seems to 
pertain to the entire file (mesh->datasetGroupCount > mesh->datasetCount; the 
renderer only pertains to the dataset (count = 1).  This would be helpful to 
figure out as setting the renderer for different types of data (vectors for 
wind, contours for pressure, etc) is the end goal of this application, and 
would be an upgrade from having to create multiple shapefiles/rasters for this 
data.  There doesn't seem to be many examples out there for mesh layer use 
outside of the QGIS console, not even for PyQGIS developers.

Brian
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] MultiPart post network request stopped working in master

2022-01-24 Thread Alessandro Pasotti
Hi Raymond,

can you please file a bug and assign it to me, I'll have a look.



On Sat, Jan 22, 2022 at 1:32 PM Raymond Nijssen 
wrote:

> Dear all,
>
> One of my plugins stopped working in QGIS master, because some of the
> requests seem invalid. I spent quite some time on debugging but cannot
> find the problem.
>
> This script runs in 3.22.3 but not ion 3.23. It uploads an xml file to a
> validation service. It should print: {'successful': True, 'errors': [],
> 'warnings': []}
>
> Anyone a clue? I'm feeling that the best way would be using the
> QgsBlockingNetworkRequest post() function but that does not seem to work
> with a QHttpMultiPart variable.
>
> Thanks!
> Raymond
>
>
>
> import json
>
> manager = QgsNetworkAccessManager.instance()
>
> url = QUrl('https://connect.aerius.nl/api/v7/utility/validate')
>
> request = QNetworkRequest(url)
>
> multi_part = QHttpMultiPart(QHttpMultiPart.FormDataType)
>
> file_parts = []
> gml_fn =
>
> '/home/raymond/terglobo/projecten/aerius/202007_calc_input_plugin/demodata/test_20220121/test_kort.gml'
>
> file_parts.append({'name': 'filePart', 'file_name': gml_fn, 'file_type':
> 'application/gml+xml'})
>
> for fp in file_parts:
>  file = QFile(fp['file_name'])
>  file_part = QHttpPart()
>  file_part.setHeader(QNetworkRequest.ContentTypeHeader,
> QVariant(fp['file_type']))
>  name = fp['name']
>  file_part.setHeader(QNetworkRequest.ContentDispositionHeader,
>  QVariant(f'form-data; name="{name}";
> filename="{QFileInfo(file).fileName()}"'))
>  file.open(QIODevice.ReadOnly)
>  file_part.setBodyDevice(file)
>  file.setParent(multi_part)
>  multi_part.append(file_part)
>
> # This line already fires an invalid request in qgis 3.23:
> reply = manager.post(request, multi_part)
>
>
> # In qgis 3.22 the request is ok. The rest of the code will wait for the
> json
> # reply and display it.
>
>
> # make request blocking
> loop = QEventLoop()
> reply.finished.connect(loop.quit)
> loop.exec_()
>
>
> bstr = reply.readAll()
> result_dict = json.loads(bytes(bstr))
> print(result_dict)
>
>
>
>
>
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>


-- 
Alessandro Pasotti
QCooperative:  www.qcooperative.net
ItOpen:   www.itopen.it
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer