[Qgis-user] getting started with qgis server - countries layer not showing

2020-10-08 Thread Janneke van Dijk

Dear list,

I am following along with the (testing) QGIS server guide/manual hoping 
I can get QGIS server to work on my windows laptop, using 
https://docs.qgis.org/testing/en/docs/server_manual/getting_started.html 
. I've installed XAMPP, and


http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities

seems to be working (I get the capabilities).

I then downloaded the training data (as instructed) from

https://github.com/qgis/QGIS-Training-Data/archive/v2.0.zip

and unzipped them into a folder and set the QGIS_PROJECT_FILE variable 
to point to the world.qgs file. The guide continues with:


http://localhost/qgisserver?
  MAP=/home/qgis/projects/world.qgs&
  LAYERS=countries&
  SERVICE=WMS&
  REQUEST=GetMap&
  CRS=EPSG:4326&
  WIDTH=400&
  HEIGHT=200

In Firefox, when I adjust that to:

https://localhost/cgi-bin/qgis_mapserv.fcgi.exe?LAYERS=airports&SERVICE=WMS&REQUEST=GetMap&CRS=EPSG:4326&WIDTH=400&HEIGHT=200

I get a white rectangle with some airplanes in the top left corner - I 
think that means success (for now at least).


When I replace 'airports' with 'places' it shows the same rectangle, but 
with circles in the top left corner - also success, more or less.


When I replace 'airports' with 'countries' I only get to see the white 
rectangle, and no countries. What could be the reason that I do not get 
to see the countries? How do I go about troubleshooting this? When I 
open the project file directly in QGIS I get to see all the layers and 
they all look as I would expect them to look.


When I open a separate qgis desktop blank project, and start adding the 
layers as WMS I have other issues:


adding each layer with epsg:3857 the layers overlay nicely with each 
other and a google hybrid layer. Adding them with epsg:4326 (and setting 
the project CRS to 4326) it seems as if the map gets squeezed from the 
sides, so the world map looks higher than it is wide (in the example in 
the tutorial it's wider than it's tall). When trying to zoom in on 
Europe it will 'jump' to Asia.


This seems to suggest that the WMS is more or less working (it can be 
reached from the browser) but it needs certain settings to work 
properly? I am entirely new to QGIS server and any pointers to 
understand what it is that I'm looking for would be greatly appreciated. 
Does anyone else working with the same data manage to display the 
countries layer in a browser?


Working with qgis server and desktop LTR from OSGeo4W64 on Windows 10.

Thanks,

Janneke




___
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] bounding box algorithm

2020-10-08 Thread Tudorache, Marian
Hi,

The question is for the developers of QGIS.
In my python classes I use a lot the boundingBox function for QgsGeometry class.
I would like to know if it is possible to see the algorithm for this function.

I found this but it is not really the algorithm

  
858
 QgsRectangle 
QgsGeometry::boundingBox()
 const
  859 {
  860  if ( 
d->geometry
 )
  861  {
  862  return 
d->geometry->boundingBox();
  863  }
  864  return QgsRectangle();
  865 }
  866
Where
I create some polygons with QGIS which are exported to another system which use 
a bounding box formula that gives infinity.
The other system includes a check of the South Pole in the bounding box it also 
takes in consideration the orientation of the polygon coordinates.
It seems in one of the orientation the South Pole is inside the bounding box 
and if I switch the orientation the South Pole is not anymore inside.
QGIS seems to be immune of how the coordinates are oriented. Regardless of the 
order QGIS gives a finite bounding box without having a South Pole inside.

Can someone help me?
Thank you,
Marian
Anyone can help me?



This electronic message, as well as any transmitted files included in the 
electronic message, may contain privileged or confidential information and is 
intended solely for the use of the individual(s) or entity to which it is 
addressed. If you have received this electronic message in error please notify 
the sender immediately and delete the electronic message. Any unauthorized 
copying, disclosure or distribution of the electronic message is strictly 
forbidden. NAV CANADA accepts no liability for any damage caused by any virus 
and/or other malicious code transmitted by this electronic communication.

Le pr?sent message ?lectronique et tout fichier qui peut y ?tre joint peuvent 
contenir des renseignements privil?gi?s ou confidentiels destin?s ? l'usage 
exclusif des personnes ou des organismes ? qui ils s'adressent. Si vous avez 
re?u ce message ?lectronique par erreur, veuillez en informer l'exp?diteur 
imm?diatement et supprimez le. Toute reproduction, divulgation ou distribution 
du pr?sent message ?lectronique est strictement interdite. NAV CANADA n'assume 
aucune responsabilit? en cas de dommage caus? par tout virus ou autre programme 
malveillant transmis par ce message ?lectronique.
___
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] bounding box algorithm

2020-10-08 Thread Thayer Young
 Hi Marian,
I think you are looking at an abstract method, that is implemented differently 
for each type of geometry.So you need to dig deeper into the code to find the 
specific implementation of the bounding box or boundary method for polygons.The 
link below at line 138 gives the boundary method for the multipolygonv2 
geometry.https://qgis.org/api/2.18/qgsmultipolygonv2_8cpp_source.html#l00138

This may not specifically be what you are looking for, but hopefully it will 
help you find it.
-Thayer


Message: 3
Date: Thu, 8 Oct 2020 18:17:25 +
From: "Tudorache, Marian" 
To: "qgis-user@lists.osgeo.org" ,
    "Qgis-user 
    (qgis-user-boun...@lists.osgeo.org)"
    ,
    "qgis-user-requ...@lists.osgeo.org"
    
Subject: [Qgis-user] bounding box algorithm
Message-ID:
    

    
Content-Type: text/plain; charset="utf-8"

Hi,

The question is for the developers of QGIS.
In my python classes I use a lot the boundingBox function for QgsGeometry class.
I would like to know if it is possible to see the algorithm for this function.

I found this but it is not really the algorithm

  
858
 QgsRectangle 
QgsGeometry::boundingBox()
 const
  859 {
  860  if ( 
d->geometry
 )
  861  {
  862  return 
d->geometry->boundingBox();
  863  }
  864  return QgsRectangle();
  865 }
  866
Where
I create some polygons with QGIS which are exported to another system which use 
a bounding box formula that gives infinity.
The other system includes a check of the South Pole in the bounding box it also 
takes in consideration the orientation of the polygon coordinates.
It seems in one of the orientation the South Pole is inside the bounding box 
and if I switch the orientation the South Pole is not anymore inside.
QGIS seems to be immune of how the coordinates are oriented. Regardless of the 
order QGIS gives a finite bounding box without having a South Pole inside.

Can someone help me?
Thank you,
Marian
Anyone can help me?

  ___
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] bounding box algorithm

2020-10-08 Thread Thayer Young
 OK, so forget what I said about geometry specific, I think you want to look in 
the other direction, go up not down:
QgsRectangle QgsAbstractGeometryV2::calculateBoundingBox() const

https://qgis.org/api/2.18/qgsabstractgeometryv2_8cpp_source.html#l00111



On Thursday, October 8, 2020, 03:28:59 PM EDT, Thayer Young 
 wrote:  
 
  Hi Marian,
I think you are looking at an abstract method, that is implemented differently 
for each type of geometry.So you need to dig deeper into the code to find the 
specific implementation of the bounding box or boundary method for polygons.The 
link below at line 138 gives the boundary method for the multipolygonv2 
geometry.https://qgis.org/api/2.18/qgsmultipolygonv2_8cpp_source.html#l00138

This may not specifically be what you are looking for, but hopefully it will 
help you find it.
-Thayer


Message: 3
Date: Thu, 8 Oct 2020 18:17:25 +
From: "Tudorache, Marian" 
To: "qgis-user@lists.osgeo.org" ,
    "Qgis-user 
    (qgis-user-boun...@lists.osgeo.org)"
    ,
    "qgis-user-requ...@lists.osgeo.org"
    
Subject: [Qgis-user] bounding box algorithm
Message-ID:
    

    
Content-Type: text/plain; charset="utf-8"

Hi,

The question is for the developers of QGIS.
In my python classes I use a lot the boundingBox function for QgsGeometry class.
I would like to know if it is possible to see the algorithm for this function.

I found this but it is not really the algorithm

  
858
 QgsRectangle 
QgsGeometry::boundingBox()
 const
  859 {
  860  if ( 
d->geometry
 )
  861  {
  862  return 
d->geometry->boundingBox();
  863  }
  864  return QgsRectangle();
  865 }
  866
Where
I create some polygons with QGIS which are exported to another system which use 
a bounding box formula that gives infinity.
The other system includes a check of the South Pole in the bounding box it also 
takes in consideration the orientation of the polygon coordinates.
It seems in one of the orientation the South Pole is inside the bounding box 
and if I switch the orientation the South Pole is not anymore inside.
QGIS seems to be immune of how the coordinates are oriented. Regardless of the 
order QGIS gives a finite bounding box without having a South Pole inside.

Can someone help me?
Thank you,
Marian
Anyone can help me?

___
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